diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-02-10 13:01:14 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-02-10 13:01:14 +1100 |
commit | 9df3defdbb122c406072760e07859a3b4ebf567e (patch) | |
tree | 53444d450b96ce33715e16374ee97e1b72ebbb6e /auth.c | |
parent | e3dba82dd44c165716ce2a81157b6c2f269fc0af (diff) |
- (dtucker) [LICENCE Makefile.in auth-passwd.c auth-shadow.c auth.c auth.h
defines.h] Bug #14: Use do_pwchange to support password expiry and force
change for platforms using /etc/shadow. ok djm@
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -106,25 +106,6 @@ allowed_user(struct passwd * pw) | |||
106 | logit("Account %.100s has expired", pw->pw_name); | 106 | logit("Account %.100s has expired", pw->pw_name); |
107 | return 0; | 107 | return 0; |
108 | } | 108 | } |
109 | |||
110 | #if defined(__hpux) && !defined(HAVE_SECUREWARE) | ||
111 | if (iscomsec() && spw->sp_min == 0 && spw->sp_max == 0 && | ||
112 | spw->sp_warn == 0) | ||
113 | disabled = 1; /* Trusted Mode: expiry disabled */ | ||
114 | #endif | ||
115 | |||
116 | if (!disabled && spw->sp_lstchg == 0) { | ||
117 | logit("User %.100s password has expired (root forced)", | ||
118 | pw->pw_name); | ||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | if (!disabled && spw->sp_max != -1 && | ||
123 | today > spw->sp_lstchg + spw->sp_max) { | ||
124 | logit("User %.100s password has expired (password aged)", | ||
125 | pw->pw_name); | ||
126 | return 0; | ||
127 | } | ||
128 | } | 109 | } |
129 | #endif /* HAS_SHADOW_EXPIRE */ | 110 | #endif /* HAS_SHADOW_EXPIRE */ |
130 | #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ | 111 | #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ |