Bugzilla – Attachment 968 Details for
Bug 848
OpenSSH_3.8.1p1 - passwd -f does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for honouring expired passwords in HP-UX
passwd-expiry.patch (text/plain), 1.76 KB, created by
senthilkumar
on 2005-09-27 02:42:19 AEST
(
hide
)
Description:
Patch for honouring expired passwords in HP-UX
Filename:
MIME Type:
Creator:
senthilkumar
Created:
2005-09-27 02:42:19 AEST
Size:
1.76 KB
patch
obsolete
>--- openssh-4.2p1/auth-shadow.c 2005-07-17 12:34:47.000000000 +0530 >+++ openssh-4.2p1-pwagefix/auth-shadow.c 2005-09-26 17:44:50.000000000 +0530 >@@ -87,11 +87,31 @@ > const char *user = ctxt->pw->pw_name; > char buf[256]; > time_t today; >- int daysleft, disabled = 0; >+ int daysleft, i=0, j=3, disabled = 0, age_info[3]; >+ long pwage; > > if ((spw = getspnam((char *)user)) == NULL) { >- error("Could not get shadow information for %.100s", user); >- return 0; >+ spw=(struct spwd *)xmalloc(sizeof(struct spwd)); >+ >+ spw->sp_namp = ctxt->pw->pw_name; >+ spw->sp_pwdp = ctxt->pw->pw_passwd; >+ >+ if (strlen(ctxt->pw->pw_age) > 0) { >+ pwage = a64l(ctxt->pw->pw_age); >+ for(i=0;i<j;i++) >+ { >+ if(i<2) >+ age_info[i]=(pwage >> j*i*2) & 077; >+ else >+ age_info[i]=(pwage >> j*i*2); >+ } >+ >+ /* HP-UX passwd command rounds of expiry days to nearest week */ >+ >+ spw->sp_max = age_info[0] * 7; >+ spw->sp_min = age_info[1] * 7; >+ spw->sp_lstchg = age_info[2] * 7; >+ } > } > > today = time(NULL) / DAY; >diff -Nur openssh-4.2p1/misc.c openssh-4.2p1-pwagefix/misc.c >--- openssh-4.2p1/misc.c 2005-07-14 12:35:02.000000000 +0530 >+++ openssh-4.2p1-pwagefix/misc.c 2005-09-26 16:45:27.000000000 +0530 >@@ -170,6 +170,7 @@ > #endif > copy->pw_dir = xstrdup(pw->pw_dir); > copy->pw_shell = xstrdup(pw->pw_shell); >+ copy->pw_age = xstrdup(pw->pw_age); > return copy; > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 848
:
609
|
610
|
611
|
612
|
613
|
615
| 968