diff options
| author | Joe MacDonald <joe@deserted.net> | 2019-04-08 13:50:40 -0400 |
|---|---|---|
| committer | Joe MacDonald <joe@deserted.net> | 2019-04-12 15:28:38 -0400 |
| commit | d6686698444616b9857a15bb514400f8a629e7ed (patch) | |
| tree | 2ec0f484ec0a7d748ae4b9201d9179d622e727db /recipes-security/refpolicy/refpolicy-git/0033-refpolicy-minimum-make-sysadmin-module-optional.patch | |
| parent | a6a3cadb1ef3203a123d8f5f9df27832f55b2ce3 (diff) | |
| download | meta-selinux-d6686698444616b9857a15bb514400f8a629e7ed.tar.gz | |
refpolicy: update to 2.20190201 and git HEAD policies
Additionally, the README has fallen out of date, update it to reflect the
current reality of layer dependencies.
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, 67 insertions, 0 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 new file mode 100644 index 0000000..09a16fb --- /dev/null +++ b/recipes-security/refpolicy/refpolicy-git/0033-refpolicy-minimum-make-sysadmin-module-optional.patch | |||
| @@ -0,0 +1,67 @@ | |||
| 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 | |||
