Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5022598ybv; Mon, 17 Feb 2020 10:35:03 -0800 (PST) X-Google-Smtp-Source: APXvYqzAedRvA3laZ+djXxFh0/YxxWMyYPuf6VttyHPMJ25xqh5iwt+2pYDtP2WUHP+UFB5sM267 X-Received: by 2002:aca:eccd:: with SMTP id k196mr201672oih.95.1581964503191; Mon, 17 Feb 2020 10:35:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581964503; cv=none; d=google.com; s=arc-20160816; b=XKEQulhCn61ZwWlk3LXeDvy7+VrXCFgYCDeH6Tpzfcq9yFYV2yH44bXp7B0Nhuslsl Yh6kFtAeGV0InQ6ia2EQgCZq7+yNyCOAG9fephp+bM61ByzkZXRSR2/w1bJC8rODTMv2 OxByg5Rn1yPDG4a5m0P7ZZ5AboWFoZmWjdOf1ukcwJHkyWt0SA1fsiNyJLaby0SPYVIR YO3Wj5FMmiY+o2GgwmCMdLvkk1fEqlq6D9H0uXdhncuTus237J8j8cu36HuiUjqc43m8 6myKNc56+MjbT4iaEBs3wtNTiI+O/thCTfcwT8s4fxGJCNvGzM3V9Em26zy1R9tLSE/4 3iHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=frnIfWtJhxgbb4AlVb3iBu6KIn9LJ+yuJCaNEEem+S4=; b=oBT1m9Q62sQwsYN3t9kPH87M7vffuDsTOBQ+bnEufShjVafXwYFI0zAV9FJ0gxsh40 rnQfQguZ9ybQ+K+82DrSVGkr+WEWWrWM89lU0ixbG4yEpZQy3GRrRnV3BuMVMNMTayus Sr+Z2z/b1UwX2YpBwYsdPqvVTaVcT9fiZOXVRmpmE7nLoMENvN0a3eSyNCXAlHspRm1p Ka+ac0BnL1xDqM/gmaGliwb4rOatioPvMmTFZLzeNMi660QJhyKqt+w6hfliOK9GSezq VJGJhTa0erJKlXMEuMd2kA9+f2AFVvp1huaPDy0533mXoebnaN95NlwSbvHJDPASnm9H /2ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=NIH35uJ0; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si530386otj.114.2020.02.17.10.35.01; Mon, 17 Feb 2020 10:35:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=NIH35uJ0; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729315AbgBQSem (ORCPT + 13 others); Mon, 17 Feb 2020 13:34:42 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:37803 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727179AbgBQSem (ORCPT ); Mon, 17 Feb 2020 13:34:42 -0500 Received: by mail-qk1-f193.google.com with SMTP id c188so17088790qkg.4 for ; Mon, 17 Feb 2020 10:34:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=frnIfWtJhxgbb4AlVb3iBu6KIn9LJ+yuJCaNEEem+S4=; b=NIH35uJ0QZjM75rTvhSYR02v2awrCNI3wFW3OQD2jDEs1YjIjB+U38VtDS5iJTrTX1 zGNGzBhWT0lISMqKwEMx7olKsv3IUxcJbstdc4kOC59bWN6PUwmxKopFJmTXFEWuM67y eJhuLFIBEucbB2cMRquA5IQWuG1UsPLz8Rjo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=frnIfWtJhxgbb4AlVb3iBu6KIn9LJ+yuJCaNEEem+S4=; b=FCEoEIPiJ4g3ew5dkRF6hdI7/EcMnEU2unlT1vZo6FYEvF1Xxn+v6tytiVGxx2vm2k LMdNBA3fFQFgLEht6qJJBufrpM5bLrTwTv4fbV6HuC6mAHJ1h954Ot5utJ5W3ebE1ZyL joB0xS3jN0wwLX3WgD/i7ps4uYQp+P0IKKnd9QPIT0nqb7YWvzmjlayFRNmnerxcUhIL o8d4s0rkBGAKUbXjtjnD+HKSeju+Jm+Aa/3FJCebJDz1kGHL/F6v3wnPobkpFQeUU9UL tuCFqOeSqhfK9MzFlZf1VHZs622G+uLoeZ3Bem4hDMmpfVKsEFrv6VY5CwADCy0rDQSs TFgA== X-Gm-Message-State: APjAAAUH2FxM0He/lhDRsgYBabI/2Xoo2XMkHz8Jy3ADqVmqvzABeHVK 287CehZWvvDYQAN0/MTt0qKwAc/nups= X-Received: by 2002:a05:620a:6b6:: with SMTP id i22mr14745373qkh.301.1581964480210; Mon, 17 Feb 2020 10:34:40 -0800 (PST) Received: from fedora.pebenito.net (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id n191sm653378qkn.6.2020.02.17.10.34.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Feb 2020 10:34:39 -0800 (PST) Subject: Re: [PATCH 04/10] cron: watch cron spool To: Jason Zaman , selinux-refpolicy@vger.kernel.org References: <20200216200319.39337-1-jason@perfinion.com> <20200216200319.39337-4-jason@perfinion.com> From: Chris PeBenito Message-ID: <22cc478b-158f-1db5-615f-68815bd2ae3c@ieee.org> Date: Mon, 17 Feb 2020 13:28:02 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200216200319.39337-4-jason@perfinion.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 2/16/20 3:03 PM, Jason Zaman wrote: > avc: denied { watch } for pid=7402 comm="crond" path="/var/spool/cron/crontabs" dev="zfs" ino=7627 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cron_spool_t:s0 tclass=dir permissive=0 > avc: denied { watch } for pid=7402 comm="crond" path="/etc/cron.d" dev="zfs" ino=60131 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:system_cron_spool_t:s0 tclass=dir permissive=0 > avc: denied { watch } for pid=7402 comm="crond" path="/etc/crontab" dev="zfs" ino=1749860 scontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tcontext=system_u:object_r:system_cron_spool_t:s0 tclass=file permissive=0 > Signed-off-by: Jason Zaman > --- > policy/modules/services/cron.te | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/policy/modules/services/cron.te b/policy/modules/services/cron.te > index 46b64016..dbbd9dbf 100644 > --- a/policy/modules/services/cron.te > +++ b/policy/modules/services/cron.te > @@ -228,6 +228,7 @@ manage_files_pattern(crond_t, crond_runtime_t, crond_runtime_t) > files_pid_filetrans(crond_t, crond_runtime_t, file) > > manage_files_pattern(crond_t, cron_spool_t, cron_spool_t) > +allow crond_t cron_spool_t:dir watch; > > manage_dirs_pattern(crond_t, crond_tmp_t, crond_tmp_t) > manage_files_pattern(crond_t, crond_tmp_t, crond_tmp_t) > @@ -235,10 +236,13 @@ files_tmp_filetrans(crond_t, crond_tmp_t, { dir file }) > > list_dirs_pattern(crond_t, system_cron_spool_t, system_cron_spool_t) > read_files_pattern(crond_t, system_cron_spool_t, system_cron_spool_t) > +allow crond_t system_cron_spool_t:dir watch; > +allow crond_t system_cron_spool_t:file watch; > > rw_dirs_pattern(crond_t, user_cron_spool_t, user_cron_spool_t) > manage_files_pattern(crond_t, user_cron_spool_t, user_cron_spool_t) > manage_lnk_files_pattern(crond_t, user_cron_spool_t, user_cron_spool_t) > +allow crond_t user_cron_spool_t:dir watch; > > manage_files_pattern(crond_t, user_cron_spool_log_t, user_cron_spool_log_t) Merged. -- Chris PeBenito