summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-11-21 23:48:55 +1100
committerDamien Miller <djm@mindrot.org>2003-11-21 23:48:55 +1100
commita8e06cef35c205e1aa562513c6d034a10c8c9a6d (patch)
treecf8bdb4466f553088c020b9179cabd6eaf196075 /auth.c
parent8c5e91c03fdd2693f0635f8b2a9904bffc94ce16 (diff)
- djm@cvs.openbsd.org 2003/11/21 11:57:03
[everything] unexpand and delete whitespace at EOL; ok markus@ (done locally and RCS IDs synced)
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/auth.c b/auth.c
index fcafae861..a8cf0ce20 100644
--- a/auth.c
+++ b/auth.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth.c,v 1.50 2003/09/23 20:17:11 markus Exp $"); 26RCSID("$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 }