summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2003-01-08 20:04:27 -0800
committerTim Rice <tim@multitalents.net>2003-01-08 20:04:27 -0800
commit458c6bfa10bb370487e9e27f540e1a7e7a5909cc (patch)
tree28a6e73ac47406d9372ceb00005439dee20a0d1b
parentd0d7a8b27b4cc9faaa4d8e4112d5d1fe759b0939 (diff)
[auth.c] declare today at top of allowed_user() to keep older compilers happy.
-rw-r--r--ChangeLog5
-rw-r--r--auth.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index af4ec49e..db9c94f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,7 +16,8 @@
- (djm) Update README to reflect AIX's status as a well supported platform.
From dtucker@zip.com.au
- (tim) [Makefile.in configure.ac] replace fixpath with sed script. Patch
- by Mo DeJong.
+ - (tim) [auth.c] declare today at top of allowed_user() to keep
+ older compilers happy.
20030107
- (djm) Bug #401: Work around Linux breakage with IPv6 mapped addresses.
@@ -962,4 +963,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@
-$Id: ChangeLog,v 1.2555 2003/01/09 01:22:59 tim Exp $
+$Id: ChangeLog,v 1.2556 2003/01/09 04:04:27 tim Exp $
diff --git a/auth.c b/auth.c
index 48586cc5..c6e5a173 100644
--- a/auth.c
+++ b/auth.c
@@ -80,6 +80,9 @@ allowed_user(struct passwd * pw)
#endif /* WITH_AIXAUTHENTICATE */
#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
struct spwd *spw;
+#if !defined(USE_PAM) && defined(HAS_SHADOW_EXPIRE)
+ time_t today;
+#endif
#endif
/* Shouldn't be called if pw is NULL, but better safe than sorry... */
@@ -106,7 +109,7 @@ allowed_user(struct passwd * pw)
#if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \
!defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
#define DAY (24L * 60 * 60) /* 1 day in seconds */
- time_t today = time(NULL) / DAY;
+ today = time(NULL) / DAY;
debug3("allowed_user: today %d sp_expire %d sp_lstchg %d"
" sp_max %d", (int)today, (int)spw->sp_expire,
(int)spw->sp_lstchg, (int)spw->sp_max);