diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2015-03-23 15:40:19 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2015-08-07 15:17:52 -0400 |
commit | 77130536eba3eee4406014a647e33692b1d1c813 (patch) | |
tree | e8274325e4b238b35e0b2ffe4de2bd4f72774b44 | |
parent | 54875dcb50f5e40fc86d6fe98dde244bfe4751af (diff) | |
download | meta-selinux-77130536eba3eee4406014a647e33692b1d1c813.tar.gz |
udev: restorecon /run to allow mdadm creating /run/mdadm
This change bases on the factors during bootup:
a. the default type for /run is var_run_t;
b. the type for /run will be changed to tmpfs_t after tmpfs mounted;
c. the type for /run will be fixed after populate-volatile.sh run.
udev service is started in b->c period, fix the type for /run from
udev init script to remove:
avc: denied { write } for pid=294 comm="mdadm" \
name="/" dev="tmpfs" ino=10581 \
scontext=system_u:system_r:mdadm_t:s0-s15:c0.c1023 \
tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r-- | recipes-core/udev/udev/init | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/recipes-core/udev/udev/init b/recipes-core/udev/udev/init index 66359f2..bb8b95b 100644 --- a/recipes-core/udev/udev/init +++ b/recipes-core/udev/udev/init | |||
@@ -61,6 +61,9 @@ case "$1" in | |||
61 | # /var/volatile/tmp directory to be available. | 61 | # /var/volatile/tmp directory to be available. |
62 | mkdir -p /var/volatile/tmp | 62 | mkdir -p /var/volatile/tmp |
63 | 63 | ||
64 | # restorecon /run early to allow mdadm creating dir /run/mdadm | ||
65 | test ! -x /sbin/restorecon || /sbin/restorecon -F /run | ||
66 | |||
64 | # Cache handling. | 67 | # Cache handling. |
65 | # A list of files which are used as a criteria to judge whether the udev cache could be reused. | 68 | # A list of files which are used as a criteria to judge whether the udev cache could be reused. |
66 | CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices /proc/atags" | 69 | CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices /proc/atags" |