Commit c944b920 by Dwight Engen Committed by Serge Hallyn

oracle template: fix selinux context on symlinks in /dev

This fixes sshd getting an avc on traversing the /dev/ptmx symlink (was default_t) Signed-off-by: 's avatarDwight Engen <dwight.engen@oracle.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 67e5a20a
......@@ -288,6 +288,10 @@ EOF
if [ $container_rootfs != "/" -a -d $dev_path ]; then
rm -rf $dev_path
mkdir -p $dev_path
if which chcon >/dev/null 2>&1 ; then
# ensure symlinks created in /dev have the right context
chcon -t device_t $dev_path
fi
fi
mknod -m 666 $dev_path/null c 1 3
mknod -m 666 $dev_path/zero c 1 5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment