base-files: chmod 1777 /var/lock

Per FHS 3.0, /var/lock is the location for lock files [1].
However its current permissions (755) are too restrictive
for use by unprivileged processes.
Debian and Ubuntu set them to 1777, and now so do we.

[1] <https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlockLockFiles>

Signed-off-by: Deomid Ryabkov <rojer@rojer.me>
[fixed typo in commit message, had to remove "rojer" due to git hooks]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This commit is contained in:
Deomid Ryabkov 2021-10-23 16:22:39 +03:00 committed by Christian Lamparter
parent ac4a21141a
commit 430f691943
1 changed files with 3 additions and 2 deletions

View File

@ -21,9 +21,10 @@ boot() {
[ -f /proc/mounts ] || /sbin/mount_root
[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
mkdir -p /var/run
mkdir -p /var/log
mkdir -p /var/lock
chmod 1777 /var/lock
mkdir -p /var/log
mkdir -p /var/run
mkdir -p /var/state
mkdir -p /var/tmp
mkdir -p /tmp/.uci