X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/beb54af10082dc588132b2c0d32e050028b72c78..78ed81a334dab56aa7a876792a473d67d4359c25:/usr.bin/passwd/local_passwd.c diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c index 2e1eb538c1..a196127fb5 100644 --- a/usr.bin/passwd/local_passwd.c +++ b/usr.bin/passwd/local_passwd.c @@ -91,13 +91,9 @@ getnewpasswd(pw) (void)printf("Changing local password for %s.\n", pw->pw_name); - if (uid && pw->pw_passwd && -#ifdef DES + if (uid && pw->pw_passwd && *pw->pw_passwd && strcmp(crypt(getpass("Old password:"), pw->pw_passwd), pw->pw_passwd)) { -#else - strcmp(getpass("Old password:"), pw->pw_passwd)) { -#endif errno = EACCES; pw_error(NULL, 1, 1); } @@ -131,11 +127,7 @@ getnewpasswd(pw) #else to64(&salt[0], random(), 2); #endif -#ifdef DES return(crypt(buf, salt)); -#else - return(buf); -#endif } static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */