diff options
author | Tim Rice <tim@multitalents.net> | 2003-01-08 20:04:27 -0800 |
---|---|---|
committer | Tim Rice <tim@multitalents.net> | 2003-01-08 20:04:27 -0800 |
commit | 458c6bfa10bb370487e9e27f540e1a7e7a5909cc (patch) | |
tree | 28a6e73ac47406d9372ceb00005439dee20a0d1b | |
parent | d0d7a8b27b4cc9faaa4d8e4112d5d1fe759b0939 (diff) |
[auth.c] declare today at top of allowed_user() to keep older compilers happy.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | auth.c | 5 |
2 files changed, 7 insertions, 3 deletions
@@ -16,7 +16,8 @@ | |||
16 | - (djm) Update README to reflect AIX's status as a well supported platform. | 16 | - (djm) Update README to reflect AIX's status as a well supported platform. |
17 | From dtucker@zip.com.au | 17 | From dtucker@zip.com.au |
18 | - (tim) [Makefile.in configure.ac] replace fixpath with sed script. Patch | 18 | - (tim) [Makefile.in configure.ac] replace fixpath with sed script. Patch |
19 | by Mo DeJong. | 19 | - (tim) [auth.c] declare today at top of allowed_user() to keep |
20 | older compilers happy. | ||
20 | 21 | ||
21 | 20030107 | 22 | 20030107 |
22 | - (djm) Bug #401: Work around Linux breakage with IPv6 mapped addresses. | 23 | - (djm) Bug #401: Work around Linux breakage with IPv6 mapped addresses. |
@@ -962,4 +963,4 @@ | |||
962 | save auth method before monitor_reset_key_state(); bugzilla bug #284; | 963 | save auth method before monitor_reset_key_state(); bugzilla bug #284; |
963 | ok provos@ | 964 | ok provos@ |
964 | 965 | ||
965 | $Id: ChangeLog,v 1.2555 2003/01/09 01:22:59 tim Exp $ | 966 | $Id: ChangeLog,v 1.2556 2003/01/09 04:04:27 tim Exp $ |
@@ -80,6 +80,9 @@ allowed_user(struct passwd * pw) | |||
80 | #endif /* WITH_AIXAUTHENTICATE */ | 80 | #endif /* WITH_AIXAUTHENTICATE */ |
81 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) | 81 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) |
82 | struct spwd *spw; | 82 | struct spwd *spw; |
83 | #if !defined(USE_PAM) && defined(HAS_SHADOW_EXPIRE) | ||
84 | time_t today; | ||
85 | #endif | ||
83 | #endif | 86 | #endif |
84 | 87 | ||
85 | /* Shouldn't be called if pw is NULL, but better safe than sorry... */ | 88 | /* Shouldn't be called if pw is NULL, but better safe than sorry... */ |
@@ -106,7 +109,7 @@ allowed_user(struct passwd * pw) | |||
106 | #if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \ | 109 | #if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \ |
107 | !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE) | 110 | !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE) |
108 | #define DAY (24L * 60 * 60) /* 1 day in seconds */ | 111 | #define DAY (24L * 60 * 60) /* 1 day in seconds */ |
109 | time_t today = time(NULL) / DAY; | 112 | today = time(NULL) / DAY; |
110 | debug3("allowed_user: today %d sp_expire %d sp_lstchg %d" | 113 | debug3("allowed_user: today %d sp_expire %d sp_lstchg %d" |
111 | " sp_max %d", (int)today, (int)spw->sp_expire, | 114 | " sp_max %d", (int)today, (int)spw->sp_expire, |
112 | (int)spw->sp_lstchg, (int)spw->sp_max); | 115 | (int)spw->sp_lstchg, (int)spw->sp_max); |