diff options
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -78,8 +78,8 @@ allowed_user(struct passwd * pw) | |||
78 | #ifdef WITH_AIXAUTHENTICATE | 78 | #ifdef WITH_AIXAUTHENTICATE |
79 | char *loginmsg; | 79 | char *loginmsg; |
80 | #endif /* WITH_AIXAUTHENTICATE */ | 80 | #endif /* WITH_AIXAUTHENTICATE */ |
81 | #if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \ | 81 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) && \ |
82 | !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE) | 82 | defined(HAS_SHADOW_EXPIRE) |
83 | struct spwd *spw; | 83 | struct spwd *spw; |
84 | time_t today; | 84 | time_t today; |
85 | #endif | 85 | #endif |
@@ -88,10 +88,10 @@ allowed_user(struct passwd * pw) | |||
88 | if (!pw || !pw->pw_name) | 88 | if (!pw || !pw->pw_name) |
89 | return 0; | 89 | return 0; |
90 | 90 | ||
91 | #if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \ | 91 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) && \ |
92 | !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE) | 92 | defined(HAS_SHADOW_EXPIRE) |
93 | #define DAY (24L * 60 * 60) /* 1 day in seconds */ | 93 | #define DAY (24L * 60 * 60) /* 1 day in seconds */ |
94 | if ((spw = getspnam(pw->pw_name)) != NULL) { | 94 | if (!options.use_pam && (spw = getspnam(pw->pw_name)) != NULL) { |
95 | today = time(NULL) / DAY; | 95 | today = time(NULL) / DAY; |
96 | debug3("allowed_user: today %d sp_expire %d sp_lstchg %d" | 96 | debug3("allowed_user: today %d sp_expire %d sp_lstchg %d" |
97 | " sp_max %d", (int)today, (int)spw->sp_expire, | 97 | " sp_max %d", (int)today, (int)spw->sp_expire, |