authlogin: allow pam_domain to read /usr/share/pam#1123
Conversation
|
I also hit this issue. I don't know if this is what is intended by upstream, but the PAM ebuild is now installing files that used to be in EDIT: A file equivalence rule will do exactly what we need. |
|
I think the change was intentional but the commit message didn't get updated. If you look at the bugs/pr the Pam commit is from, it seems they were OK with it. Please feel free to have a go: I'm happy to try but I'm wading through a bunch of avcs and learning as I go so I don't mind if you take it over! |
Oh hm, that makes it a little tricky.
subs_dist sounds good to me however:
I still think (in the future) ideally we should move to a private type. In my opinion, given the nature of PAM configuration files, they should not be etc_t as that's a bit too broad. So a private type with |
PAM 1.7.2 makes the vendordir build option the default. This puts PAM's config files in /usr/share/pam rather than /etc. Unfortunately this makes the default file contexts for these files usr_t which breaks many things. Fix this by adding a file equivalence rule for /usr/share/pam. Bug: https://bugs.gentoo.org/973082 Closes: SELinuxProject#1123 Signed-off-by: Kenton Groombridge <concord@gentoo.org>
|
The |
.. by allowing /usr overall. pam installs these configuration files there
as its `vendordir`. It also does this since aea30822e2fa6f87faf2541da140f69dfdfee728.
(I think that commit message isn't quite right: it seems to do this regardless
of libeconf support.)
This comes from auth_use_pam which sudo and su use:
```
AVC avc: denied { getattr } for pid=239941 comm="su" path="/usr/share/pam/security/faillock.conf" dev="dm-0" ino=3227904748
scontext=staff_u:sysadm_r:sysadm_su_t:s0-s0:c0.c1023
tcontext=system_u:object_r:usr_t:s0
tclass=file
AVC avc: denied { read } for pid=239938 comm="sudo" name="pam_env.conf" dev="dm-0" ino=3227906195
scontext=staff_u:staff_r:staff_sudo_t:s0-s0:c0.c1023
tcontext=system_u:object_r:usr_t:s0
tclass=file
```
This is a followup to 169f725.
Bug: https://bugs.gentoo.org/973082
See-also: SELinuxProject#1125
Signed-off-by: Sam James <sam@gentoo.org>
Per SELinuxProject#1125 (comment), pam_namespace tries /etc/security/namespace.init then /usr/share/pam/security/namespace.init, so it needs to be bin_t. Closes: SELinuxProject#1125 Signed-off-by: Sam James <sam@gentoo.org>
.. by allowing /usr overall. pam installs these configuration files there as its
vendordir. It also does this since aea30822e2fa6f87faf2541da140f69dfdfee728.(I think that commit message isn't quite right: it seems to do this regardless of libeconf support.)
This comes from auth_use_pam which sudo and su use:
This is a followup to 169f725.
Bug: https://bugs.gentoo.org/973082