Module Name:    src
Committed By:   christos
Date:           Fri Oct  5 01:28:20 UTC 2012

Modified Files:
        src/usr.sbin/mtree: spec.c

Log Message:
Encode literal global characters in files.  Otherwise the results of
updating a directory using the resulting spec will be surprising.

See http://svnweb.freebsd.org/base/head/usr.sbin/mtree/test/test00.sh
for test cases.
(brooks)


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/usr.sbin/mtree/spec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/mtree/spec.c
diff -u src/usr.sbin/mtree/spec.c:1.82 src/usr.sbin/mtree/spec.c:1.83
--- src/usr.sbin/mtree/spec.c:1.82	Thu Oct  4 21:19:54 2012
+++ src/usr.sbin/mtree/spec.c	Thu Oct  4 21:28:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: spec.c,v 1.82 2012/10/05 01:19:54 christos Exp $	*/
+/*	$NetBSD: spec.c,v 1.83 2012/10/05 01:28:20 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = "@(#)spec.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: spec.c,v 1.82 2012/10/05 01:19:54 christos Exp $");
+__RCSID("$NetBSD: spec.c,v 1.83 2012/10/05 01:28:20 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -415,7 +415,8 @@ dump_nodes(const char *dir, NODE *root, 
 char *
 vispath(const char *path)
 {
-	const char extra[] = { ' ', '\t', '\n', '\\', '#', '\0' };
+	const char extra[] = { ' ', '\t', '\n', '\\', '#', '*', '?', '[',
+	    '#', '\0' };
 	static char pathbuf[4*MAXPATHLEN + 1];
 
 	strsvis(pathbuf, path, VIS_CSTYLE, extra);

Reply via email to