Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jan 1999 04:17:29 -0800 (PST)
From:      "Eugene M. Kim" <astralblue@usa.net>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/9538: mtree(8) fails/malfunctions on certain 8-bit filenames
Message-ID:  <Pine.BSF.4.02A.9901170354270.24302-200000@gw1.pl.cp>

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

>Number:         9538
>Category:       bin
>Synopsis:       mtree(8) fails/malfunctions on certain 8-bit filenames
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 17 04:20:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Eugene M. Kim
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
N/A
>Environment:

FreeBSD gw1.pl.cp 3.0-CURRENT FreeBSD 3.0-CURRENT #2: Sun Jan 10 23:52:23 PST 1999 root@gw1.pl.cp:/pubfs/1/root/usr.src/sys/compile/GW-PL  i386

>Description:

The recent change in mtree(8)'s behavior (escaping filenames using
strvis(3)/strunvis(3)) opened two bugs.

Because the special characters '/', '*', '?' and '[' are checked before
the `spec' filename is strunvis(3)'ed, the corresponding metacharacters
(M-/, M-* and so on) are misinterpreted.  The misinterpretation of M-/
triggers the no-embedded-slash check and chokes mtree -d to death, and
others make mtree -d fnmatch() filenames against the spec while it
should not.

>How-To-Repeat:

Make files with offending characters in their name and run ``mtree |
mtree -d'' in the directory.  mtree -d will die upon a filename with 
M-/.

>Fix:
	
Apply the attached patch from /usr.  Note that this patch is
backward-compatible with the previous strvis/strunvis version, since
strunvis() understands both old and new format.

-- 
Eugene M. Kim <astralblue@usa.net>

"Is your music unpopular?  Make it popular; make music
which people like, or make people who like your music."

--0-523022815-916575449=:24302
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="50.mtree"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSF.4.02A.9901170417290.24302@gw1.pl.cp>
Content-Description: 
Content-Disposition: attachment; filename="50.mtree"

ZGlmZiAtY3Igc3JjL3Vzci5zYmluL210cmVlL2NyZWF0ZS5jIHNyYy91c3Iu
c2Jpbi9tdHJlZS5uZXcvY3JlYXRlLmMNCioqKiBzcmMvdXNyLnNiaW4vbXRy
ZWUvY3JlYXRlLmMJVHVlIEphbiAxMiAwMjozMzozNyAxOTk5DQotLS0gc3Jj
L3Vzci5zYmluL210cmVlLm5ldy9jcmVhdGUuYwlTdW4gSmFuIDE3IDA0OjA1
OjAwIDE5OTkNCioqKioqKioqKioqKioqKg0KKioqIDE0NCwxNTAgKioqKg0K
ICAJZXNjYXBlZF9uYW1lID0gY2FsbG9jKDEsIHAtPmZ0c19uYW1lbGVuICog
NCAgKyAgMSk7DQogIAlpZiAoZXNjYXBlZF9uYW1lID09IE5VTEwpDQogIAkJ
ZXJyeCgxLCAic3RhdGYoKTogY2FsbG9jKCkgZmFpbGVkIik7DQohIAlzdHJ2
aXMoZXNjYXBlZF9uYW1lLCBwLT5mdHNfbmFtZSwgVklTX1dISVRFKTsNCiAg
DQogIAlpZiAoaWZsYWcgfHwgU19JU0RJUihwLT5mdHNfc3RhdHAtPnN0X21v
ZGUpKQ0KICAJCW9mZnNldCA9IHByaW50ZigiJSpzJXMiLCBpbmRlbnQsICIi
LCBlc2NhcGVkX25hbWUpOw0KLS0tIDE0NCwxNTAgLS0tLQ0KICAJZXNjYXBl
ZF9uYW1lID0gY2FsbG9jKDEsIHAtPmZ0c19uYW1lbGVuICogNCAgKyAgMSk7
DQogIAlpZiAoZXNjYXBlZF9uYW1lID09IE5VTEwpDQogIAkJZXJyeCgxLCAi
c3RhdGYoKTogY2FsbG9jKCkgZmFpbGVkIik7DQohIAlzdHJ2aXMoZXNjYXBl
ZF9uYW1lLCBwLT5mdHNfbmFtZSwgVklTX1dISVRFIHwgVklTX09DVEFMKTsN
CiAgDQogIAlpZiAoaWZsYWcgfHwgU19JU0RJUihwLT5mdHNfc3RhdHAtPnN0
X21vZGUpKQ0KICAJCW9mZnNldCA9IHByaW50ZigiJSpzJXMiLCBpbmRlbnQs
ICIiLCBlc2NhcGVkX25hbWUpOw0K
--0-523022815-916575449=:24302--
>Release-Note:
>Audit-Trail:
>Unformatted:
   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.
   Send mail to mime@docserver.cac.washington.edu for more info.
 
 --0-523022815-916575449=:24302
 Content-Type: TEXT/PLAIN; charset=US-ASCII
 
 

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?Pine.BSF.4.02A.9901170354270.24302-200000>