aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount_unionfs/mount_unionfs.c
diff options
context:
space:
mode:
authorSteve Price <steve@FreeBSD.org>1997-08-23 21:25:24 +0000
committerSteve Price <steve@FreeBSD.org>1997-08-23 21:25:24 +0000
commit5b9062772d6f47c582ec306f95bc51f74ac7dd42 (patch)
tree6522c31d65de8fed60fdab919047ee2f68b6b722 /sbin/mount_unionfs/mount_unionfs.c
parentfae3ea2cedbcd6ff00f25210eb7dbc4ce56303b3 (diff)
downloadsrc-5b9062772d6f47c582ec306f95bc51f74ac7dd42.tar.gz
src-5b9062772d6f47c582ec306f95bc51f74ac7dd42.zip
Protect against target containing a '%' which might be misinterpreted
by err(3). PR: bin/3864
Notes
Notes: svn path=/head/; revision=28629
Diffstat (limited to 'sbin/mount_unionfs/mount_unionfs.c')
-rw-r--r--sbin/mount_unionfs/mount_unionfs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sbin/mount_unionfs/mount_unionfs.c b/sbin/mount_unionfs/mount_unionfs.c
index 699a01c83199..07ba69253b2d 100644
--- a/sbin/mount_unionfs/mount_unionfs.c
+++ b/sbin/mount_unionfs/mount_unionfs.c
@@ -35,13 +35,18 @@
*/
#ifndef lint
-char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1992, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
+#if 0
static char sccsid[] = "@(#)mount_union.c 8.5 (Berkeley) 3/27/94";
+#else
+static const char rcsid[] =
+ "$Id$";
+#endif
#endif /* not lint */
#include <sys/param.h>
@@ -127,7 +132,7 @@ main(argc, argv)
errx(EX_OSERR, "union filesystem is not available");
if (mount(vfc.vfc_name, source, mntflags, &args))
- err(EX_OSERR, target);
+ err(EX_OSERR, "%s", target);
exit(0);
}