- if (pw->pw_passwd == '\0') {
- return (UPAP_AUTHACK);
- }
-
-#ifdef HAS_SHADOW
- if (pw->pw_passwd) {
- if (pw->pw_passwd[0] == '@') {
- if (pw_auth (pw->pw_passwd+1, pw->pw_name, PW_PPP, NULL)) {
- return (UPAP_AUTHNAK);
- }
- } else {
- epasswd = pw_encrypt(passwd, pw->pw_passwd);
- if (strcmp(epasswd, pw->pw_passwd)) {
- return (UPAP_AUTHNAK);
- }
- }
- /* check the age of the password entry */
- if (spwd && (isexpired (pw, spwd) != 0)) {
+ if (pw->pw_passwd != NULL && *pw->pw_passwd != '\0') {
+ epasswd = crypt(passwd, pw->pw_passwd);
+ if (strcmp(epasswd, pw->pw_passwd) != 0) {