summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-10-30 10:48:43 +0000
committerphk <phk@FreeBSD.org>2003-10-30 10:48:43 +0000
commit039259050de63c3af4206421efcf7961d48c52c0 (patch)
tree95f0e85c6ce2e6373c7b58a0fc79e5577c948251 /usr.sbin/mtree
parent69589e7dad671b33a698a42f11511835e1d39e5a (diff)
downloadFreeBSD-src-039259050de63c3af4206421efcf7961d48c52c0.zip
FreeBSD-src-039259050de63c3af4206421efcf7961d48c52c0.tar.gz
Fix bug in mtree(8)'s create mode where files or directories with had
names containing glob(3) expressions would appear verbatim in the output. If such an mtree file were used by mtree in update mode, wrong things would happen.
Diffstat (limited to 'usr.sbin/mtree')
-rw-r--r--usr.sbin/mtree/create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c
index ff1b07f..0a7d792 100644
--- a/usr.sbin/mtree/create.c
+++ b/usr.sbin/mtree/create.c
@@ -154,7 +154,7 @@ statf(int indent, FTSENT *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 | VIS_OCTAL);
+ strvis(escaped_name, p->fts_name, VIS_WHITE | VIS_OCTAL | VIS_GLOB);
if (iflag || S_ISDIR(p->fts_statp->st_mode))
offset = printf("%*s%s", indent, "", escaped_name);
OpenPOWER on IntegriCloud