SELinux-Refpolicy Archive on lore.kernel.org
 help / color / Atom feed
From: Chris PeBenito <pebenito@ieee.org>
To: Jason Zaman <jason@perfinion.com>, selinux-refpolicy@vger.kernel.org
Subject: Re: [PATCH 03/10] accountsd: Add watch perms
Date: Mon, 17 Feb 2020 13:27:22 -0500
Message-ID: <8d91a6d5-7d65-ab4b-79c3-1dc2bdc627e5@ieee.org> (raw)
In-Reply-To: <20200216200319.39337-3-jason@perfinion.com>

On 2/16/20 3:03 PM, Jason Zaman wrote:
> avc:  denied  { watch } for  pid=7134 comm="gmain" path="/var/log" dev="zfs" ino=7092 scontext=system_u:system_r:accounts _t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_log_t:s0 tclass=dir permissive=0
> avc:  denied  { watch } for  pid=7134 comm="gmain" path="/etc" dev="zfs" ino=1436 scontext=system_u:system_r:accountsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=0
> Signed-off-by: Jason Zaman <jason@perfinion.com>
> ---
>   policy/modules/services/accountsd.te |  2 ++
>   policy/modules/system/logging.if     | 18 ++++++++++++++++++
>   2 files changed, 20 insertions(+)
> 
> diff --git a/policy/modules/services/accountsd.te b/policy/modules/services/accountsd.te
> index 9bf5962a..2e13e943 100644
> --- a/policy/modules/services/accountsd.te
> +++ b/policy/modules/services/accountsd.te
> @@ -40,6 +40,7 @@ dev_read_sysfs(accountsd_t)
>   
>   files_read_mnt_files(accountsd_t)
>   files_read_usr_files(accountsd_t)
> +files_watch_etc_dirs(accountsd_t)
>   
>   fs_getattr_xattr_fs(accountsd_t)
>   fs_list_inotifyfs(accountsd_t)
> @@ -54,6 +55,7 @@ miscfiles_read_localization(accountsd_t)
>   logging_list_logs(accountsd_t)
>   logging_send_syslog_msg(accountsd_t)
>   logging_set_loginuid(accountsd_t)
> +logging_watch_generic_logs_dir(accountsd_t)
>   
>   userdom_read_user_tmp_files(accountsd_t)
>   userdom_read_user_home_content_files(accountsd_t)
> diff --git a/policy/modules/system/logging.if b/policy/modules/system/logging.if
> index 9c7a0dba..b2bba984 100644
> --- a/policy/modules/system/logging.if
> +++ b/policy/modules/system/logging.if
> @@ -1224,6 +1224,24 @@ interface(`logging_manage_generic_logs',`
>   	manage_files_pattern($1, var_log_t, var_log_t)
>   ')
>   
> +########################################
> +## <summary>
> +##	Watch generic log dirs.
> +## </summary>
> +## <param name="domain">
> +##	<summary>
> +##	Domain allowed access.
> +##	</summary>
> +## </param>
> +#
> +interface(`logging_watch_generic_logs_dir',`
> +	gen_require(`
> +		type var_log_t;
> +	')
> +
> +	allow $1 var_log_t:dir watch;
> +')
> +
>   ########################################
>   ## <summary>
>   ##	All of the rules required to administrate

Merged.

-- 
Chris PeBenito

  reply index

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-16 20:03 [PATCH 01/10] fstools: add zfs-auto-snapshot Jason Zaman
2020-02-16 20:03 ` [PATCH 02/10] udev: Add watch perms Jason Zaman
2020-02-17 18:27   ` Chris PeBenito
2020-02-16 20:03 ` [PATCH 03/10] accountsd: " Jason Zaman
2020-02-17 18:27   ` Chris PeBenito [this message]
2020-02-16 20:03 ` [PATCH 04/10] cron: watch cron spool Jason Zaman
2020-02-17 18:28   ` Chris PeBenito
2020-02-16 20:03 ` [PATCH 05/10] colord: add watch perms Jason Zaman
2020-02-17 18:27   ` Chris PeBenito
2020-02-16 20:03 ` [PATCH 06/10] policykit devicekit: Add " Jason Zaman
2020-02-17 18:28   ` Chris PeBenito
2020-02-16 20:03 ` [PATCH 07/10] userdomain: Add watch on home dirs Jason Zaman
2020-02-17 18:31   ` Chris PeBenito
2020-02-16 20:03 ` [PATCH 08/10] dbus: add watch perms Jason Zaman
2020-02-17 18:28   ` Chris PeBenito
2020-02-16 20:03 ` [PATCH 09/10] chromium: watch etc dirs Jason Zaman
2020-02-16 20:03 ` [PATCH 10/10] gpg: add watch perms for agent Jason Zaman
2020-02-17 18:26 ` [PATCH 01/10] fstools: add zfs-auto-snapshot Chris PeBenito
  -- strict thread matches above, loose matches on Subject: below --
2020-02-16  8:54 Jason Zaman
2020-02-16  8:54 ` [PATCH 03/10] accountsd: Add watch perms Jason Zaman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d91a6d5-7d65-ab4b-79c3-1dc2bdc627e5@ieee.org \
    --to=pebenito@ieee.org \
    --cc=jason@perfinion.com \
    --cc=selinux-refpolicy@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

SELinux-Refpolicy Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux-refpolicy/0 selinux-refpolicy/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux-refpolicy selinux-refpolicy/ https://lore.kernel.org/selinux-refpolicy \
		selinux-refpolicy@vger.kernel.org
	public-inbox-index selinux-refpolicy

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux-refpolicy


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git