diff options
author | nectar <nectar@FreeBSD.org> | 2002-05-08 14:47:44 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-05-08 14:47:44 +0000 |
commit | 751111934cd8bddabf510003da9dddb2dd3cd9e9 (patch) | |
tree | 7463e75760ccf31bd2dd72d6181809981e9b3a77 /etc/rc | |
parent | db8d7fd8ddda5de7a2da275024e1447315babdfb (diff) | |
download | FreeBSD-src-751111934cd8bddabf510003da9dddb2dd3cd9e9.zip FreeBSD-src-751111934cd8bddabf510003da9dddb2dd3cd9e9.tar.gz |
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>
Diffstat (limited to 'etc/rc')
-rw-r--r-- | etc/rc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. |