It is dangerous to use globbing like so in startup scripts:
rm -f /tmp/.X11-unix/* If /tmp/.X11-unix didn't already exist, a user could symlink it to a directory with files that he wants to wipe out, and wait for next reboot. Reported by: lumpy <lumpy@the.whole.net>
This commit is contained in:
parent
a39bc9aac5
commit
dfc4c48df7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96218
4
etc/rc
4
etc/rc
@ -520,7 +520,9 @@ esac
|
||||
# Remove X lock files, since they will prevent you from restarting X11
|
||||
# after a system crash.
|
||||
#
|
||||
rm -f /tmp/.X*-lock /tmp/.X11-unix/*
|
||||
rm -f /tmp/.X*-lock
|
||||
rm -fr /tmp/.X11-unix
|
||||
mkdir -m 1777 /tmp/.X11-unix
|
||||
|
||||
# Snapshot any kernel -c changes back to disk here <someday>.
|
||||
# This has changed with ELF and /kernel.config.
|
||||
|
Loading…
Reference in New Issue
Block a user