diff options
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth.c,v 1.50 2003/09/23 20:17:11 markus Exp $"); | 26 | RCSID("$OpenBSD: auth.c,v 1.51 2003/11/21 11:57:02 djm Exp $"); |
27 | 27 | ||
28 | #ifdef HAVE_LOGIN_H | 28 | #ifdef HAVE_LOGIN_H |
29 | #include <login.h> | 29 | #include <login.h> |
@@ -129,7 +129,7 @@ allowed_user(struct passwd * pw) | |||
129 | #endif /* HAS_SHADOW_EXPIRE */ | 129 | #endif /* HAS_SHADOW_EXPIRE */ |
130 | #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ | 130 | #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ |
131 | 131 | ||
132 | /* grab passwd field for locked account check */ | 132 | /* grab passwd field for locked account check */ |
133 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) | 133 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) |
134 | if (spw != NULL) | 134 | if (spw != NULL) |
135 | passwd = spw->sp_pwdp; | 135 | passwd = spw->sp_pwdp; |
@@ -137,7 +137,7 @@ allowed_user(struct passwd * pw) | |||
137 | passwd = pw->pw_passwd; | 137 | passwd = pw->pw_passwd; |
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | /* check for locked account */ | 140 | /* check for locked account */ |
141 | if (!options.use_pam && passwd && *passwd) { | 141 | if (!options.use_pam && passwd && *passwd) { |
142 | int locked = 0; | 142 | int locked = 0; |
143 | 143 | ||
@@ -249,7 +249,7 @@ allowed_user(struct passwd * pw) | |||
249 | if ((pw->pw_uid != 0) && (geteuid() == 0)) { | 249 | if ((pw->pw_uid != 0) && (geteuid() == 0)) { |
250 | char *msg; | 250 | char *msg; |
251 | 251 | ||
252 | if (loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &msg) != 0) { | 252 | if (loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &msg) != 0) { |
253 | int loginrestrict_errno = errno; | 253 | int loginrestrict_errno = errno; |
254 | 254 | ||
255 | if (msg && *msg) { | 255 | if (msg && *msg) { |
@@ -259,7 +259,7 @@ allowed_user(struct passwd * pw) | |||
259 | pw->pw_name, msg); | 259 | pw->pw_name, msg); |
260 | } | 260 | } |
261 | /* Don't fail if /etc/nologin set */ | 261 | /* Don't fail if /etc/nologin set */ |
262 | if (!(loginrestrict_errno == EPERM && | 262 | if (!(loginrestrict_errno == EPERM && |
263 | stat(_PATH_NOLOGIN, &st) == 0)) | 263 | stat(_PATH_NOLOGIN, &st) == 0)) |
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |