From mboxrd@z Thu Jan 1 00:00:00 1970 From: cpebenito@tresys.com (Christopher J. PeBenito) Date: Tue, 9 Oct 2012 10:14:02 -0400 Subject: [refpolicy] [PATCH v1] Changes to the miscfiles policy module In-Reply-To: <1349441808-23943-1-git-send-email-dominick.grift@gmail.com> References: <1349441808-23943-1-git-send-email-dominick.grift@gmail.com> Message-ID: <5074312A.70907@tresys.com> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com On 10/05/12 08:56, Dominick Grift wrote: > The file context for /var/cache/man will be handled by mandb > > Change various miscfiles man interfaces to include relevant mandb > interface calls I'm not sure that this is the right way to do. If you have miscfiles and not mandb, then you have a mislabeled /var/cache/man. I looked at your mandb.fc, and the entrypoint looks like a script; what is actually running? makewhatis? > Signed-off-by: Dominick Grift > diff --git a/policy/modules/system/miscfiles.fc b/policy/modules/system/miscfiles.fc > index 9116567..016974b 100644 > --- a/policy/modules/system/miscfiles.fc > +++ b/policy/modules/system/miscfiles.fc > @@ -77,7 +77,6 @@ > > /var/cache/fontconfig(/.*)? gen_context(system_u:object_r:fonts_cache_t,s0) > /var/cache/fonts(/.*)? gen_context(system_u:object_r:tetex_data_t,s0) > -/var/cache/man(/.*)? gen_context(system_u:object_r:man_t,s0) > > /var/named/chroot/etc/pki(/.*)? gen_context(system_u:object_r:cert_t,s0) > > diff --git a/policy/modules/system/miscfiles.if b/policy/modules/system/miscfiles.if > index 926ba65..518f940 100644 > --- a/policy/modules/system/miscfiles.if > +++ b/policy/modules/system/miscfiles.if > @@ -491,6 +491,10 @@ > > allow $1 man_t:dir search_dir_perms; > files_search_usr($1) > + > + optional_policy(` > + mandb_search_cache($1) > + ') > ') > > ######################################## > @@ -531,6 +535,10 @@ > allow $1 man_t:dir list_dir_perms; > read_files_pattern($1, man_t, man_t) > read_lnk_files_pattern($1, man_t, man_t) > + > + optional_policy(` > + mandb_read_cache_content($1) > + ') > ') > > ######################################## > @@ -557,6 +565,10 @@ > delete_dirs_pattern($1, man_t, man_t) > delete_files_pattern($1, man_t, man_t) > delete_lnk_files_pattern($1, man_t, man_t) > + > + optional_policy(` > + mandb_delete_cache_content($1) > + ') > ') > > ######################################## > @@ -578,6 +590,10 @@ > manage_dirs_pattern($1, man_t, man_t) > manage_files_pattern($1, man_t, man_t) > read_lnk_files_pattern($1, man_t, man_t) > + > + optional_policy(` > + mandb_manage_cache_content($1) > + ') > ') > > ######################################## > _______________________________________________ > refpolicy mailing list > refpolicy at oss.tresys.com > http://oss.tresys.com/mailman/listinfo/refpolicy > -- Chris PeBenito Tresys Technology, LLC www.tresys.com | oss.tresys.com