|
Lines 69-76
Link Here
|
| 69 |
return retval; |
69 |
return retval; |
| 70 |
if ((pwd = getpwnam(user)) != NULL) { |
70 |
if ((pwd = getpwnam(user)) != NULL) { |
| 71 |
encrypted = crypt(password, pwd->pw_passwd); |
71 |
encrypted = crypt(password, pwd->pw_passwd); |
| 72 |
if (password[0] == '\0' && pwd->pw_passwd[0] != '\0') |
72 |
if (password[0] == '\0') { |
|
|
73 |
if (pwd->pw_passwd[0] != '\0') { |
| 73 |
encrypted = ":"; |
74 |
encrypted = ":"; |
|
|
75 |
} else { |
| 76 |
encrypted = ""; |
| 77 |
} |
| 78 |
} |
| 74 |
|
79 |
|
| 75 |
retval = strcmp(encrypted, pwd->pw_passwd) == 0 ? |
80 |
retval = strcmp(encrypted, pwd->pw_passwd) == 0 ? |
| 76 |
PAM_SUCCESS : PAM_AUTH_ERR; |
81 |
PAM_SUCCESS : PAM_AUTH_ERR; |