bin/126324: [patch] rc.d/tmp: Prevent mounting /tmp in second time

Kris Kennaway kris at FreeBSD.org
Thu Aug 7 10:40:03 UTC 2008


The following reply was made to PR bin/126324; it has been noted by GNATS.

From: Kris Kennaway <kris at FreeBSD.org>
To: Alex Kozlov <spam at rm-rf.kiev.ua>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: bin/126324: [patch] rc.d/tmp: Prevent mounting /tmp in second
 time
Date: Thu, 07 Aug 2008 12:34:41 +0200

 Alex Kozlov wrote:
 
 > Index: src/etc/rc.d/tmp
 > @@ -43,6 +43,7 @@
 >  #
 >  case "${tmpmfs}" in
 >  [Yy][Ee][Ss])
 > +	/sbin/umount /tmp 2>/dev/null && echo /tmp was already mounted!
 >  	mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
 >  	chmod 01777 /tmp
 >  	;;
 > @@ -57,6 +58,7 @@
 >  			echo "dropping into shell, ^D to continue anyway."
 >  			/bin/sh
 >  		else
 > +			/sbin/umount /tmp 2>/dev/null && echo /tmp was already mounted!
 >  			mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
 >  			chmod 01777 /tmp
 >  		fi
 
 This will destroy any files the admin may have deliberately created on 
 /tmp after dropping to single user mode.
 
 Kris


More information about the freebsd-bugs mailing list