summaryrefslogtreecommitdiff
path: root/usr.bin/passwd
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-06-30 16:00:30 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-06-30 16:00:30 +0000
commitb643bb9badf4a995d989b8daf3e33ba8ee6ffda2 (patch)
tree87720e8aa60a5b4230d0072dfd2b3d422d7dd1cd /usr.bin/passwd
parent46239127052c30fac93140fbe021cdd151fdac8a (diff)
warnx?/errx? paranoia (use "%s" not a bare string unless it is a
constant). These are not security holes but it is worth fixing them anyway both for robustness and so folks looking for examples in the tree are not misled into doing something potentially dangerous. Furthermore, it is a bad idea to assume that pathnames will not include '%' in them and that error routines don't return strings with '%' in them (especially in light of the possibility of locales).
Diffstat (limited to 'usr.bin/passwd')
-rw-r--r--usr.bin/passwd/yp_passwd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/passwd/yp_passwd.c b/usr.bin/passwd/yp_passwd.c
index 112e9feef1c..fd7f362c72e 100644
--- a/usr.bin/passwd/yp_passwd.c
+++ b/usr.bin/passwd/yp_passwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yp_passwd.c,v 1.12 1998/07/13 02:15:01 deraadt Exp $ */
+/* $OpenBSD: yp_passwd.c,v 1.13 2000/06/30 16:00:20 millert Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -34,7 +34,7 @@
*/
#ifndef lint
/*static char sccsid[] = "from: @(#)yp_passwd.c 1.0 2/2/93";*/
-static char rcsid[] = "$OpenBSD: yp_passwd.c,v 1.12 1998/07/13 02:15:01 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: yp_passwd.c,v 1.13 2000/06/30 16:00:20 millert Exp $";
#endif /* not lint */
#ifdef YP
@@ -72,7 +72,7 @@ pw_error(name, err, eval)
int err, eval;
{
if(err)
- warn(name);
+ warn("%s", name);
warnx("YP passwd database unchanged.");
exit(eval);