Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jan 2000 17:07:50 +0900 (JST)
From:      kjm@rins.ryukoku.ac.jp
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   conf/15901: vi tmpfile recovery script bug (from BUGTRAQ)
Message-ID:  <200001050807.RAA60396@ideon.st.ryukoku.ac.jp>

next in thread | raw e-mail | index | archive | help

>Number:         15901
>Category:       conf
>Synopsis:       vi tmpfile recovery script (/etc/rc) cannot handle space-containded-filename.
>Confidential:   yes
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan  5 00:10:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     KOJIMA Hajime
>Release:        FreeBSD 3.3-RELEASE i386
>Organization:
Ryukoku University
>Environment:

	N/A

>Description:

	Vi tmpfile recovery script (a part of /etc/rc) cannot handle
	space-containded-filename correctly.  

>How-To-Repeat:

	See BUGTRAQ posting

<http://www.securityfocus.com/templates/archive.pike?list=1&date=1999-12-29&msg=19991231143208.94AD11F5E8@lists.securityfocus.com>;

	for more detail.

>Fix:

	for FreeBSD-current:

--- branches/-current/src/etc/rc	Mon Dec 27 20:11:10 1999
+++ rc	Wed Jan  5 16:45:27 2000
@@ -442,7 +442,7 @@
 		# Unmodified nvi editor backup files either have the
 		# execute bit set or are zero length.  Delete them.
 		if [ -x "${i}" -o ! -s "${i}" ]; then
-			rm -f ${i}
+			rm -f "${i}"
 		fi
 	done
 
@@ -461,9 +461,9 @@
 			# Else send mail to the user.
 			recfile=`awk '/^X-vi-recover-path:/{print $2}' < ${i}`
 			if [ -n "${recfile}" -a -s "${recfile}" ]; then
-				sendmail -t < ${i}
+				sendmail -t < "${i}"
 			else
-				rm -f ${i}
+				rm -f "${i}"
 			fi
 		done
 	fi

----
KOJIMA Hajime - Ryukoku University, Seta, Ootsu, Shiga, 520-2194 Japan
[Office] kjm@rins.ryukoku.ac.jp, http://www.st.ryukoku.ac.jp/~kjm/

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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001050807.RAA60396>