system/miscfiles: Also accept the path /usr/share/postgresql-$version
PATCH 1/1 system/miscfiles: Also accept the path /usr/share/postgresql-$version
Currently, miscfiles.fc expects postgresql's files to sit in /usr/share/postgresql/, but gentoo uses /usr/share/postgresql-$version/.
services/postgresql.fc already recognizes similarily versioned dirs in /usr/lib/.
--- policy/modules/system/miscfiles.fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
policy/modules/system/miscfiles.fc +1 -1
@@ -56,7 +56,7 @@ ifdef(`distro_redhat',` /usr/share/ghostscript/fonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) /usr/share/locale(/.*)? gen_context(system_u:object_r:locale_t,s0) /usr/share/man(/.*)? gen_context(system_u:object_r:man_t,s0) -/usr/share/postgresql/[^/]*/man(/.*)? gen_context(system_u:object_r:man_t,s0) +/usr/share/postgresql/?[^/]*/man(/.*)? gen_context(system_u:object_r:man_t,s0) /usr/share/X11/locale(/.*)? gen_context(system_u:object_r:locale_t,s0) /usr/share/zoneinfo(/.*)? gen_context(system_u:object_r:locale_t,s0)
Signature · 1 line
2.13.0
PATCH 1/1 system/miscfiles: Also accept the path /usr/share/postgresql-$version
Quoted 14 lines · Luis Ressel via refpolicy
Currently, miscfiles.fc expects postgresql's files to sit in
/usr/share/postgresql/, but gentoo uses/usr/share/postgresql-$version/.services/postgresql.fc already recognizes similarily versioned dirs in
/usr/lib/.--- policy/modules/system/miscfiles.fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)policy/modules/system/miscfiles.fc +0
-0
policy/modules/system/miscfiles.fc ifdef(`distro_redhat',` · line 61
Quoted 7 lines
policy/modules/system/miscfiles.fc +1
-1@@ -56,7 +56,7 @@ ifdef(`distro_redhat',` /usr/share/ghostscript/fonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) /usr/share/locale(/.*)? gen_context(system_u:object_r:locale_t,s0) /usr/share/man(/.*)? gen_context(system_u:object_r:man_t,s0) -/usr/share/postgresql/[^/]*/man(/.*)? gen_context(system_u:object_r:man_t,s0) +/usr/share/postgresql/?[^/]*/man(/.*)? gen_context(system_u:object_r:man_t,s0) /usr/share/X11/locale(/.*)? gen_context(system_u:object_r:locale_t,s0) /usr/share/zoneinfo(/.*)? gen_context(system_u:object_r:locale_t,s0)
I wonder if it makes more sense to generalize this by changing /usr/man(/.*)? to /usr/(.*/)?man(/.*)? instead.
Signature · 1 line
Chris PeBenito
PATCH 1/1 system/miscfiles: Also accept the path /usr/share/postgresql-$version
Quoted 2 lines · On Tue, 6 Jun 2017 20:09:56 -0400 Chris PeBenito <[email protected]> wrote:
I wonder if it makes more sense to generalize this by changing /usr/man(/.*)? to /usr/(.*/)?man(/.*)? instead.
I suppose you mean "/usr/share/(.*/)?man(/.*)?"? Your regex would also match "man" directories in /usr/lib/, but it wouldn't apply to them anyway, since the "/usr/lib(/.*)?" fc supersedes it.
We could of course add a second fc for that, "/usr/lib/(.*/)?man(/.*)?", but I'm not sure whether it's worth it, since there are few man directories in /usr/lib
(only /usr/lib/erlang/man on my system, plus the false positive /usr/lib/swipl-7.2.3/xpce/man), and every domain is allowed to access lib_t anyway.
Regards,
Luis Ressel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20170607/826ed5f4/attachment.bin
PATCH 1/1 system/miscfiles: Also accept the path /usr/share/postgresql-$version
Sorry, I'd missed we also have fc's for /usr/man, /usr/local/man and /usr/X11R6/man. Now I agree that "/usr/(.*/)?man(/.*)?" would make sense.
Regards,
Luis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20170607/892a537e/attachment.bin