Date: Fri, 5 Mar 2010 06:20:03 GMT From: Jaakko Heinonen <jh@FreeBSD.org> To: freebsd-rc@FreeBSD.org Subject: Re: conf/141258: /etc/rc.d/tmp may act incorrectly based on unprivleged local user actions Message-ID: <201003050620.o256K3aY023352@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/141258; it has been noted by GNATS.
From: Jaakko Heinonen <jh@FreeBSD.org>
To: bug-followup@FreeBSD.org, jon@passki.us
Cc:
Subject: Re: conf/141258: /etc/rc.d/tmp may act incorrectly based on
unprivleged local user actions
Date: Fri, 5 Mar 2010 08:15:40 +0200
Here is a proposed minimal fix for the problem. mktemp(1) should be
available because the script requires mountcritremote. (Can someone
confirm this?)
%%%
Index: etc/rc.d/tmp
===================================================================
--- etc/rc.d/tmp (revision 204194)
+++ etc/rc.d/tmp (working copy)
@@ -51,8 +51,8 @@ case "${tmpmfs}" in
[Nn][Oo])
;;
*)
- if /bin/mkdir -p /tmp/.diskless 2> /dev/null; then
- rmdir /tmp/.diskless
+ if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then
+ rmdir ${_tmpdir}
else
if [ -h /tmp ]; then
echo "*** /tmp is a symlink to a non-writable area!"
%%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003050620.o256K3aY023352>
