summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--auth-sia.c53
2 files changed, 4 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index 58cb16454..fe2f0c5ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120090828
2 - dtucker [auth-sia.c] Roll back the change for bug #1241 as it apparently
3 causes problems in some Tru64 configurations.
4
120090820 520090820
2 - (dtucker) [includes.h] Bug #1634: do not include system glob.h if we're not 6 - (dtucker) [includes.h] Bug #1634: do not include system glob.h if we're not
3 using it since the type conflicts can cause problems on FreeBSD. Patch 7 using it since the type conflicts can cause problems on FreeBSD. Patch
diff --git a/auth-sia.c b/auth-sia.c
index debf30201..a9e1c258c 100644
--- a/auth-sia.c
+++ b/auth-sia.c
@@ -34,10 +34,6 @@
34#include <unistd.h> 34#include <unistd.h>
35#include <stdarg.h> 35#include <stdarg.h>
36#include <string.h> 36#include <string.h>
37#include <sys/types.h>
38#include <sys/security.h>
39#include <prot.h>
40#include <time.h>
41 37
42#include "ssh.h" 38#include "ssh.h"
43#include "key.h" 39#include "key.h"
@@ -53,52 +49,6 @@ extern ServerOptions options;
53extern int saved_argc; 49extern int saved_argc;
54extern char **saved_argv; 50extern char **saved_argv;
55 51
56static int
57sia_password_change_required(const char *user)
58{
59 struct es_passwd *acct;
60 time_t pw_life;
61 time_t pw_date;
62
63 set_auth_parameters(saved_argc, saved_argv);
64
65 if ((acct = getespwnam(user)) == NULL) {
66 error("Couldn't access protected database entry for %s", user);
67 endprpwent();
68 return (0);
69 }
70
71 /* If forced password change flag is set, honor it */
72 if (acct->uflg->fg_psw_chg_reqd && acct->ufld->fd_psw_chg_reqd) {
73 endprpwent();
74 return (1);
75 }
76
77 /* Obtain password lifetime; if none, it can't have expired */
78 if (acct->uflg->fg_expire)
79 pw_life = acct->ufld->fd_expire;
80 else if (acct->sflg->fg_expire)
81 pw_life = acct->sfld->fd_expire;
82 else {
83 endprpwent();
84 return (0);
85 }
86
87 /* Offset from last change; if none, it must be expired */
88 if (acct->uflg->fg_schange)
89 pw_date = acct->ufld->fd_schange + pw_life;
90 else {
91 endprpwent();
92 return (1);
93 }
94
95 endprpwent();
96
97 /* If expiration date is prior to now, change password */
98
99 return (pw_date <= time((time_t *) NULL));
100}
101
102int 52int
103sys_auth_passwd(Authctxt *authctxt, const char *pass) 53sys_auth_passwd(Authctxt *authctxt, const char *pass)
104{ 54{
@@ -126,9 +76,6 @@ sys_auth_passwd(Authctxt *authctxt, const char *pass)
126 76
127 sia_ses_release(&ent); 77 sia_ses_release(&ent);
128 78
129 authctxt->force_pwchange = sia_password_change_required(
130 authctxt->user);
131
132 return (1); 79 return (1);
133} 80}
134 81