fix error message when user doesn't know the old passwd
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 4 Mar 1991 08:12:30 +0000 (00:12 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 4 Mar 1991 08:12:30 +0000 (00:12 -0800)
SCCS-vsn: usr.bin/passwd/local_passwd.c 5.3

usr/src/usr.bin/passwd/local_passwd.c

index acb8447..24940a5 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)local_passwd.c     5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)local_passwd.c     5.3 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -69,14 +69,14 @@ getnewpasswd(pw)
            strcmp(crypt(getpass("Old password:"), pw->pw_passwd),
            pw->pw_passwd)) {
                errno = EACCES;
            strcmp(crypt(getpass("Old password:"), pw->pw_passwd),
            pw->pw_passwd)) {
                errno = EACCES;
-               pw_error(tempname, 1, 1);
+               pw_error(NULL, 1, 1);
        }
 
        for (buf[0] = '\0', tries = 0;;) {
                p = getpass("New password:");
                if (!*p) {
                        (void)printf("Password unchanged.\n");
        }
 
        for (buf[0] = '\0', tries = 0;;) {
                p = getpass("New password:");
                if (!*p) {
                        (void)printf("Password unchanged.\n");
-                       pw_error((char *)NULL, 0, 0);
+                       pw_error(NULL, 0, 0);
                }
                if (strlen(p) <= 5 && (uid != 0 || ++tries < 2)) {
                        (void)printf("Please enter a longer password.\n");
                }
                if (strlen(p) <= 5 && (uid != 0 || ++tries < 2)) {
                        (void)printf("Please enter a longer password.\n");