summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShrikant Bobade <shrikant_bobade@mentor.com>2016-08-29 19:08:07 +0530
committerJoe MacDonald <joe_macdonald@mentor.com>2016-09-01 14:30:47 -0400
commit01556456a076d4e96d8a292872ea277580df26ce (patch)
treeb9714ca7698f8051c1e1a1ed5c17b2007bef51a2
parent0e03715dfe5f76ba01e391cfdc7592a6c0792f2b (diff)
downloadmeta-selinux-01556456a076d4e96d8a292872ea277580df26ce.tar.gz
refpolicy-minimum: systemd: mount: enable required refpolicy booleans
enable required refpolicy booleans for these modules mount: allow_mount_anyfile & systemd:systemd_tmpfiles_manage_all Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--recipes-security/refpolicy/refpolicy-minimum/0006-refpolicy-minimum-systemd-mount-enable-requiried-ref.patch47
-rw-r--r--recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb1
2 files changed, 48 insertions, 0 deletions
diff --git a/recipes-security/refpolicy/refpolicy-minimum/0006-refpolicy-minimum-systemd-mount-enable-requiried-ref.patch b/recipes-security/refpolicy/refpolicy-minimum/0006-refpolicy-minimum-systemd-mount-enable-requiried-ref.patch
new file mode 100644
index 0000000..bf7b980
--- /dev/null
+++ b/recipes-security/refpolicy/refpolicy-minimum/0006-refpolicy-minimum-systemd-mount-enable-requiried-ref.patch
@@ -0,0 +1,47 @@
1refpolicy-minimum: systemd: mount: enable required refpolicy booleans
2
3enable required refpolicy booleans for these modules
4
5i. mount: allow_mount_anyfile
6without enabling this boolean we are getting below avc denial
7
8audit(): avc: denied { mounton } for pid=462 comm="mount" path="/run/media
9/mmcblk2p1" dev="tmpfs" ino=11523 scontext=system_u:system_r:mount_t:s0
10tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=dir permissive=0
11
12This avc can be allowed using the boolean 'allow_mount_anyfile'
13allow mount_t initrc_var_run_t:dir mounton;
14
15ii. systemd : systemd_tmpfiles_manage_all
16without enabling this boolean we are not getting access to mount systemd
17essential tmpfs during bootup, also not getting access to create audit.log
18
19audit(): avc: denied { search } for pid=168 comm="systemd-tmpfile" name=
20"sys" dev="proc" ino=4026531855 scontext=system_u:system_r:systemd_tmpfiles
21_t:s0 tcontext=system_u:object_r:sysctl_t:s0 tclass=dir permissive=0
22
23 ls /var/log
24 /var/log -> volatile/log
25:~#
26
27Upstream-Status: Pending
28
29Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
30
31--- a/policy/booleans.conf
32+++ b/policy/booleans.conf
33@@ -1156,12 +1156,12 @@ racoon_read_shadow = false
34 #
35 # Allow the mount command to mount any directory or file.
36 #
37-allow_mount_anyfile = false
38+allow_mount_anyfile = true
39
40 #
41 # Enable support for systemd-tmpfiles to manage all non-security files.
42 #
43-systemd_tmpfiles_manage_all = false
44+systemd_tmpfiles_manage_all = true
45
46 #
47 # Allow users to connect to mysql
diff --git a/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb b/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb
index 9c806c4..1647c28 100644
--- a/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb
+++ b/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb
@@ -77,4 +77,5 @@ SYSTEMD_REFPOLICY_PATCHES = " \
77 file://0003-refpolicy-minimum-systemd-mount-logging-authlogin-ad.patch \ 77 file://0003-refpolicy-minimum-systemd-mount-logging-authlogin-ad.patch \
78 file://0004-refpolicy-minimum-locallogin-add-allow-rules-for-typ.patch \ 78 file://0004-refpolicy-minimum-locallogin-add-allow-rules-for-typ.patch \
79 file://0005-refpolicy-minimum-init-fix-reboot-with-systemd-as-in.patch \ 79 file://0005-refpolicy-minimum-init-fix-reboot-with-systemd-as-in.patch \
80 file://0006-refpolicy-minimum-systemd-mount-enable-requiried-ref.patch \
80 " 81 "