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 27824165f..055a03629 100644 --- a/auth-passwd.c +++ b/auth-passwd.c | |||
@@ -111,6 +111,9 @@ auth_password(struct passwd * pw, const char *password) | |||
111 | #ifdef HAVE_GETPWANAM | 111 | #ifdef HAVE_GETPWANAM |
112 | struct passwd_adjunct *spw; | 112 | struct passwd_adjunct *spw; |
113 | #endif | 113 | #endif |
114 | # ifdef HAVE_HPUX_TRUSTED_SYSTEM_PW | ||
115 | struct pr_passwd *prpw; | ||
116 | #endif | ||
114 | #ifdef WITH_AIXAUTHENTICATE | 117 | #ifdef WITH_AIXAUTHENTICATE |
115 | char *authmsg; | 118 | char *authmsg; |
116 | char *loginmsg; | 119 | char *loginmsg; |
@@ -167,12 +170,17 @@ auth_password(struct passwd * pw, const char *password) | |||
167 | } | 170 | } |
168 | #endif | 171 | #endif |
169 | 172 | ||
173 | # ifdef HAVE_HPUX_TRUSTED_SYSTEM_PW | ||
174 | prpw = getprpwnam(pw->pw_name); | ||
175 | pw_password = prpw->ufld.fd_encrypt; | ||
176 | #else | ||
177 | pw_password = pw->pw_passwd; | ||
178 | #endif | ||
179 | |||
170 | /* Check for users with no password. */ | 180 | /* Check for users with no password. */ |
171 | if (strcmp(password, "") == 0 && strcmp(pw->pw_passwd, "") == 0) | 181 | if (strcmp(password, "") == 0 && strcmp(pw_password, "") == 0) |
172 | return 1; | 182 | return 1; |
173 | 183 | ||
174 | pw_password = pw->pw_passwd; | ||
175 | |||
176 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) | 184 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) |
177 | spw = getspnam(pw->pw_name); | 185 | spw = getspnam(pw->pw_name); |
178 | if (spw != NULL) | 186 | if (spw != NULL) |