diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2020-07-07 16:29:12 +0800 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2020-07-14 18:56:06 -0400 |
commit | 15fed8756aa4828fa12a3d813754b4ca65a7607d (patch) | |
tree | f12c257abba3e21ec17f7fb97e74c615ab9ff18f /recipes-security/refpolicy/refpolicy-git/0033-refpolicy-minimum-make-sysadmin-module-optional.patch | |
parent | 7d3b1347ae949c7208482694fd773e4bc3f321b4 (diff) | |
download | meta-selinux-15fed8756aa4828fa12a3d813754b4ca65a7607d.tar.gz |
refpolicy: update to 20200229+git
* Drop obsolete and unused patches.
* Rebase patches.
* Add patches to make systemd and sysvinit can work with all policy types.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'recipes-security/refpolicy/refpolicy-git/0033-refpolicy-minimum-make-sysadmin-module-optional.patch')
-rw-r--r-- | recipes-security/refpolicy/refpolicy-git/0033-refpolicy-minimum-make-sysadmin-module-optional.patch | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/recipes-security/refpolicy/refpolicy-git/0033-refpolicy-minimum-make-sysadmin-module-optional.patch b/recipes-security/refpolicy/refpolicy-git/0033-refpolicy-minimum-make-sysadmin-module-optional.patch deleted file mode 100644 index 09a16fb..0000000 --- a/recipes-security/refpolicy/refpolicy-git/0033-refpolicy-minimum-make-sysadmin-module-optional.patch +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | From a45624beb571ad5dadfca95d53ff69925c9f628c Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | ||
3 | Date: Fri, 5 Apr 2019 11:53:28 -0400 | ||
4 | Subject: [PATCH 33/34] refpolicy/minimum: make sysadmin module optional | ||
5 | |||
6 | init and locallogin modules have a depend for sysadm module because | ||
7 | they have called sysadm interfaces(sysadm_shell_domtrans). Since | ||
8 | sysadm is not a core module, we could make the sysadm_shell_domtrans | ||
9 | calls optionally by optional_policy. | ||
10 | |||
11 | So, we could make the minimum policy without sysadm module. | ||
12 | |||
13 | Upstream-Status: pending | ||
14 | |||
15 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
16 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
17 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> | ||
18 | --- | ||
19 | policy/modules/system/init.te | 16 +++++++++------- | ||
20 | policy/modules/system/locallogin.te | 4 +++- | ||
21 | 2 files changed, 12 insertions(+), 8 deletions(-) | ||
22 | |||
23 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te | ||
24 | index 2e6b57a6..d8696580 100644 | ||
25 | --- a/policy/modules/system/init.te | ||
26 | +++ b/policy/modules/system/init.te | ||
27 | @@ -448,13 +448,15 @@ ifdef(`init_systemd',` | ||
28 | modutils_domtrans(init_t) | ||
29 | ') | ||
30 | ',` | ||
31 | - tunable_policy(`init_upstart',` | ||
32 | - corecmd_shell_domtrans(init_t, initrc_t) | ||
33 | - ',` | ||
34 | - # Run the shell in the sysadm role for single-user mode. | ||
35 | - # causes problems with upstart | ||
36 | - ifndef(`distro_debian',` | ||
37 | - sysadm_shell_domtrans(init_t) | ||
38 | + optional_policy(` | ||
39 | + tunable_policy(`init_upstart',` | ||
40 | + corecmd_shell_domtrans(init_t, initrc_t) | ||
41 | + ',` | ||
42 | + # Run the shell in the sysadm role for single-user mode. | ||
43 | + # causes problems with upstart | ||
44 | + ifndef(`distro_debian',` | ||
45 | + sysadm_shell_domtrans(init_t) | ||
46 | + ') | ||
47 | ') | ||
48 | ') | ||
49 | ') | ||
50 | diff --git a/policy/modules/system/locallogin.te b/policy/modules/system/locallogin.te | ||
51 | index a56f3d1f..4c679ff3 100644 | ||
52 | --- a/policy/modules/system/locallogin.te | ||
53 | +++ b/policy/modules/system/locallogin.te | ||
54 | @@ -266,7 +266,9 @@ userdom_use_unpriv_users_fds(sulogin_t) | ||
55 | userdom_search_user_home_dirs(sulogin_t) | ||
56 | userdom_use_user_ptys(sulogin_t) | ||
57 | |||
58 | -sysadm_shell_domtrans(sulogin_t) | ||
59 | +optional_policy(` | ||
60 | + sysadm_shell_domtrans(sulogin_t) | ||
61 | +') | ||
62 | |||
63 | # by default, sulogin does not use pam... | ||
64 | # sulogin_pam might need to be defined otherwise | ||
65 | -- | ||
66 | 2.19.1 | ||
67 | |||