Date: Mon, 16 Apr 2001 22:49:07 -0700 From: Dima Dorfman <dima@unixfreak.org> To: current@freebsd.org Cc: kris@freebsd.org Subject: Cosmetic bug in pw_util.c (with patch) Message-ID: <20010417054907.CA7C83E09@bazooka.unixfreak.org>
next in thread | raw e-mail | index | archive | help
Revision 1.18 of pw_util.c (fix for security advisory "chpass" 00:58)
introduces a cosmetic bug which manifests itself as such:
> passwd
Changing local password for dima.
Old password:
passwd: (null): Permission denied
^^^^^^^^^
passwd: /etc/master.passwd: unchanged
Only machines *not* using NIS will display this, since passwd(1) acts
differently when changing an NIS password. Trivial patch to fix this
is attached below.
Thanks,
Dima Dorfman
dima@unixfreak.org
Index: pw_util.c
===================================================================
RCS file: /st/src/FreeBSD/src/usr.sbin/vipw/pw_util.c,v
retrieving revision 1.18
diff -u -r1.18 pw_util.c
--- pw_util.c 2000/07/12 00:49:40 1.18
+++ pw_util.c 2001/04/17 05:41:38
@@ -249,8 +249,12 @@
#ifdef YP
extern int _use_yp;
#endif /* YP */
- if (err)
- warn("%s", name);
+ if (err) {
+ if (name != NULL)
+ warn("%s", name);
+ else
+ warn(NULL);
+ }
#ifdef YP
if (_use_yp)
warnx("NIS information unchanged");
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010417054907.CA7C83E09>
