diff options
Diffstat (limited to 'auth-passwd.c')
-rw-r--r-- | auth-passwd.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/auth-passwd.c b/auth-passwd.c index 27824165..055a0362 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -111,6 +111,9 @@ auth_password(struct passwd * pw, const char *password) #ifdef HAVE_GETPWANAM struct passwd_adjunct *spw; #endif +# ifdef HAVE_HPUX_TRUSTED_SYSTEM_PW + struct pr_passwd *prpw; +#endif #ifdef WITH_AIXAUTHENTICATE char *authmsg; char *loginmsg; @@ -167,12 +170,17 @@ auth_password(struct passwd * pw, const char *password) } #endif +# ifdef HAVE_HPUX_TRUSTED_SYSTEM_PW + prpw = getprpwnam(pw->pw_name); + pw_password = prpw->ufld.fd_encrypt; +#else + pw_password = pw->pw_passwd; +#endif + /* Check for users with no password. */ - if (strcmp(password, "") == 0 && strcmp(pw->pw_passwd, "") == 0) + if (strcmp(password, "") == 0 && strcmp(pw_password, "") == 0) return 1; - pw_password = pw->pw_passwd; - #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) spw = getspnam(pw->pw_name); if (spw != NULL) |