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
                                        [EMAIL PROTECTED]


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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to