diff options
author | Kevin Steves <stevesk@pobox.com> | 2001-02-05 12:42:17 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2001-02-05 12:42:17 +0000 |
commit | ef4eea9badfb65f05ac24f786b710cc3f27f0e43 (patch) | |
tree | f54abef181ccd6ad5285a5c16b4c159d8b74e932 /auth-passwd.c | |
parent | d2ddda4efab29fd8663757634773fa10e557e0f3 (diff) |
- stevesk@cvs.openbsd.org 2001/02/04 08:32:27
[many files; did this manually to our top-level source dir]
unexpand and remove end-of-line whitespace; ok markus@
Diffstat (limited to 'auth-passwd.c')
-rw-r--r-- | auth-passwd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/auth-passwd.c b/auth-passwd.c index 541aca607..9f763267f 100644 --- a/auth-passwd.c +++ b/auth-passwd.c | |||
@@ -118,7 +118,7 @@ auth_password(struct passwd * pw, const char *password) | |||
118 | * Empty password is only possible on NT if the user has _really_ | 118 | * Empty password is only possible on NT if the user has _really_ |
119 | * an empty password and authentication is done, though. | 119 | * an empty password and authentication is done, though. |
120 | */ | 120 | */ |
121 | if (!is_winnt) | 121 | if (!is_winnt) |
122 | #endif | 122 | #endif |
123 | if (*password == '\0' && options.permit_empty_passwd == 0) | 123 | if (*password == '\0' && options.permit_empty_passwd == 0) |
124 | return 0; | 124 | return 0; |
@@ -155,13 +155,13 @@ auth_password(struct passwd * pw, const char *password) | |||
155 | */ | 155 | */ |
156 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) | 156 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) |
157 | spw = getspnam(pw->pw_name); | 157 | spw = getspnam(pw->pw_name); |
158 | if (spw != NULL) | 158 | if (spw != NULL) |
159 | pw_password = spw->sp_pwdp; | 159 | pw_password = spw->sp_pwdp; |
160 | #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ | 160 | #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ |
161 | 161 | ||
162 | #ifdef HAVE_SCO_PROTECTED_PW | 162 | #ifdef HAVE_SCO_PROTECTED_PW |
163 | spw = getprpwnam(pw->pw_name); | 163 | spw = getprpwnam(pw->pw_name); |
164 | if (spw != NULL) | 164 | if (spw != NULL) |
165 | pw_password = spw->ufld.fd_encrypt; | 165 | pw_password = spw->ufld.fd_encrypt; |
166 | #endif /* HAVE_SCO_PROTECTED_PW */ | 166 | #endif /* HAVE_SCO_PROTECTED_PW */ |
167 | 167 | ||
@@ -189,7 +189,7 @@ auth_password(struct passwd * pw, const char *password) | |||
189 | encrypted_password = md5_crypt(password, salt); | 189 | encrypted_password = md5_crypt(password, salt); |
190 | else | 190 | else |
191 | encrypted_password = crypt(password, salt); | 191 | encrypted_password = crypt(password, salt); |
192 | #else /* HAVE_MD5_PASSWORDS */ | 192 | #else /* HAVE_MD5_PASSWORDS */ |
193 | # ifdef __hpux | 193 | # ifdef __hpux |
194 | if (iscomsec()) | 194 | if (iscomsec()) |
195 | encrypted_password = bigcrypt(password, salt); | 195 | encrypted_password = bigcrypt(password, salt); |
@@ -198,7 +198,7 @@ auth_password(struct passwd * pw, const char *password) | |||
198 | # else | 198 | # else |
199 | encrypted_password = crypt(password, salt); | 199 | encrypted_password = crypt(password, salt); |
200 | # endif /* __hpux */ | 200 | # endif /* __hpux */ |
201 | #endif /* HAVE_MD5_PASSWORDS */ | 201 | #endif /* HAVE_MD5_PASSWORDS */ |
202 | 202 | ||
203 | /* Authentication is accepted if the encrypted passwords are identical. */ | 203 | /* Authentication is accepted if the encrypted passwords are identical. */ |
204 | return (strcmp(encrypted_password, pw_password) == 0); | 204 | return (strcmp(encrypted_password, pw_password) == 0); |