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

Alex Kozlov spam at rm-rf.kiev.ua
Thu Aug 7 02:40:02 UTC 2008


>Number:         126324
>Category:       bin
>Synopsis:       [patch]  rc.d/tmp: Prevent mounting /tmp in second time
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 07 02:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Alex Kozlov
>Release:        FreeBSD 6.3
>Organization:
private
>Environment:
>Description:
Prevent mounting /tmp in second time after switching to singleuser and back.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

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


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list