diff options
author | jkoshy <jkoshy@FreeBSD.org> | 1999-01-18 06:58:25 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 1999-01-18 06:58:25 +0000 |
commit | 6d86b58d3a740bf8907da31a1a54c1361413e43d (patch) | |
tree | 7807025b1e5ea4b732670dc5ab4f9f363eef5108 /usr.sbin/mtree | |
parent | 149693fff833d634bfacdb86cf4cbe121ecce35b (diff) | |
download | FreeBSD-src-6d86b58d3a740bf8907da31a1a54c1361413e43d.zip FreeBSD-src-6d86b58d3a740bf8907da31a1a54c1361413e43d.tar.gz |
Move to a uniform '\ooo' (VIS_OCTAL) encoding for special characters.
The previous commit broke mtree(8) when file names using certain 8-bit
characters ended up being encoded with '/', '*', and other shell
metacharacters.
PR: bin/9538
Submitted by: "Eugene M. Kim" <astralblue@usa.net>
Reviewed by: jkoshy
Bug-missed-last-time-by: jkoshy
Diffstat (limited to 'usr.sbin/mtree')
-rw-r--r-- | usr.sbin/mtree/create.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c index e5fbe20..47a5e39 100644 --- a/usr.sbin/mtree/create.c +++ b/usr.sbin/mtree/create.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: create.c,v 1.11 1998/08/02 14:41:34 bde Exp $"; + "$Id: create.c,v 1.12 1999/01/12 02:58:23 jkoshy Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -144,7 +144,7 @@ statf(indent, p) escaped_name = calloc(1, p->fts_namelen * 4 + 1); if (escaped_name == NULL) errx(1, "statf(): calloc() failed"); - strvis(escaped_name, p->fts_name, VIS_WHITE); + strvis(escaped_name, p->fts_name, VIS_WHITE | VIS_OCTAL); if (iflag || S_ISDIR(p->fts_statp->st_mode)) offset = printf("%*s%s", indent, "", escaped_name); |