diff options
author | Jason Zaman <jason@perfinion.com> | 2014-08-13 10:50:34 +0400 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2014-08-13 10:02:20 -0500 |
commit | 6f080e9c1a2a9b9c308cdc03f9cf782c4ce4d440 (patch) | |
tree | b9eb7c29ba8dca8818b12b3d40d3d892d7cca8ed /sh | |
parent | 2c265e13c60be0ed583a871ca12a22e4d379a7c0 (diff) |
tmpfiles: Move relabelling before any other calls for device nodes
Device nodes are normally never device_t so this type does not
have many permissions. After the mknod, the device should have
its label corrected before any other operations (like chmod).
Diffstat (limited to 'sh')
-rwxr-xr-x | sh/tmpfiles.sh.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in index 63c5d142..85385453 100755 --- a/sh/tmpfiles.sh.in +++ b/sh/tmpfiles.sh.in @@ -65,8 +65,8 @@ _b() { local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6 if [ ! -e "$path" ]; then dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:} - dryrun_or_real chown $uid:$gid $path _restorecon "$path" + dryrun_or_real chown $uid:$gid $path fi } @@ -75,8 +75,8 @@ _c() { local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6 if [ ! -e "$path" ]; then dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:} - dryrun_or_real chown $uid:$gid $path _restorecon "$path" + dryrun_or_real chown $uid:$gid $path fi } |