From owner-freebsd-bugs Sun Jan 17 04:20:06 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA11353 for freebsd-bugs-outgoing; Sun, 17 Jan 1999 04:20:06 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA11306 for ; Sun, 17 Jan 1999 04:20:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id EAA15969; Sun, 17 Jan 1999 04:20:01 -0800 (PST) Received: from gw1.pl.cp (redion.nttmcl.com [216.69.69.40]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA11156 for ; Sun, 17 Jan 1999 04:17:51 -0800 (PST) (envelope-from astralblue@usa.net) Received: from localhost (gene@localhost) by gw1.pl.cp (8.9.1/8.9.1) with SMTP id EAA24453 for ; Sun, 17 Jan 1999 04:17:30 -0800 (PST) (envelope-from astralblue@usa.net) Message-Id: Date: Sun, 17 Jan 1999 04:17:29 -0800 (PST) From: "Eugene M. Kim" To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/9538: mtree(8) fails/malfunctions on certain 8-bit filenames Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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 "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: 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