commit: 1308dbe2fce172abaee054dbeaa489cb0ca60a94
Author: Kenton Groombridge <me <AT> concord <DOT> sh>
AuthorDate: Wed Nov 10 17:14:46 2021 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Thu Mar 31 02:40:53 2022 +0000
URL:
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=1308dbe2
sudo: fixes for polyinstantiation
PAM can be configured to allow sudo to unmount/remount private tmp
directories when invoked. Allow this access if enabled.
Signed-off-by: Kenton Groombridge <me <AT> concord.sh>
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
policy/modules/admin/sudo.if | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/policy/modules/admin/sudo.if b/policy/modules/admin/sudo.if
index d4249ec0..fb2c8333 100644
--- a/policy/modules/admin/sudo.if
+++ b/policy/modules/admin/sudo.if
@@ -145,6 +145,12 @@ template(`sudo_role_template',`
userdom_dontaudit_search_user_home_content($1_sudo_t)
userdom_dontaudit_search_user_home_dirs($1_sudo_t)
+ tunable_policy(`allow_polyinstantiation',`
+ allow $1_sudo_t self:capability sys_admin;
+ fs_mount_xattr_fs($1_sudo_t)
+ fs_unmount_xattr_fs($1_sudo_t)
+ ')
+
tunable_policy(`sudo_allow_user_exec_domains',`
allow $1_sudo_t $3:key search;