From d474d12b52b583c648fcb04c39e7921417b226e2 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 30 Oct 2003 10:48:43 +0000 Subject: [PATCH] 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. --- usr.sbin/mtree/create.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c index ff1b07ffd0a0..0a7d792f0117 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);