Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/admin/
Date: Thu, 31 Mar 2022 03:31:38
Message-Id: 1648694453.1308dbe2fce172abaee054dbeaa489cb0ca60a94.perfinion@gentoo
1 commit: 1308dbe2fce172abaee054dbeaa489cb0ca60a94
2 Author: Kenton Groombridge <me <AT> concord <DOT> sh>
3 AuthorDate: Wed Nov 10 17:14:46 2021 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 31 02:40:53 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=1308dbe2
7
8 sudo: fixes for polyinstantiation
9
10 PAM can be configured to allow sudo to unmount/remount private tmp
11 directories when invoked. Allow this access if enabled.
12
13 Signed-off-by: Kenton Groombridge <me <AT> concord.sh>
14 Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
15
16 policy/modules/admin/sudo.if | 6 ++++++
17 1 file changed, 6 insertions(+)
18
19 diff --git a/policy/modules/admin/sudo.if b/policy/modules/admin/sudo.if
20 index d4249ec0..fb2c8333 100644
21 --- a/policy/modules/admin/sudo.if
22 +++ b/policy/modules/admin/sudo.if
23 @@ -145,6 +145,12 @@ template(`sudo_role_template',`
24 userdom_dontaudit_search_user_home_content($1_sudo_t)
25 userdom_dontaudit_search_user_home_dirs($1_sudo_t)
26
27 + tunable_policy(`allow_polyinstantiation',`
28 + allow $1_sudo_t self:capability sys_admin;
29 + fs_mount_xattr_fs($1_sudo_t)
30 + fs_unmount_xattr_fs($1_sudo_t)
31 + ')
32 +
33 tunable_policy(`sudo_allow_user_exec_domains',`
34 allow $1_sudo_t $3:key search;