Bugzilla – Attachment 5 Details for
Bug 14
Can't change expired /etc/shadow password without PAM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
add suggested patch
passwd.patch (text/plain), 1.46 KB, created by
Dave Dykstra
on 2001-11-10 08:17:16 AEDT
(
hide
)
Description:
add suggested patch
Filename:
MIME Type:
Creator:
Dave Dykstra
Created:
2001-11-10 08:17:16 AEDT
Size:
1.46 KB
patch
obsolete
>--- auth.c.O Fri Oct 12 14:42:38 2001 >+++ auth.c Tue Oct 16 11:18:36 2001 >@@ -49,6 +49,9 @@ > #include "uidswap.h" > #include "tildexpand.h" > >+/* set when password has expired */ >+int forced_passwd_change = 0; >+ > /* import */ > extern ServerOptions options; > >@@ -90,7 +93,7 @@ > /* Check password expiry */ > if ((spw->sp_lstchg >= 0) && (spw->sp_max >= 0) && > (days > (spw->sp_lstchg + spw->sp_max))) >- return 0; >+ forced_passwd_change = 1; > } > #else > /* Shouldn't be called if pw is NULL, but better safe than sorry... */ >--- auth.h.O Thu Aug 23 13:18:52 2001 >+++ auth.h Fri Oct 12 15:00:10 2001 >@@ -40,6 +40,9 @@ > #include <krb5.h> > #endif > >+/* set when password has expired */ >+extern int forced_passwd_change; >+ > typedef struct Authctxt Authctxt; > typedef struct KbdintDevice KbdintDevice; > >--- session.c.O Fri Oct 12 14:42:41 2001 >+++ session.c Tue Oct 16 11:15:48 2001 >@@ -656,7 +656,21 @@ > void > do_exec(Session *s, const char *command) > { >- if (forced_command) { >+ if (forced_passwd_change) { >+ char *user = s->pw->pw_name; >+ char *msg; >+ >+ if (s->ttyfd == -1) { >+ packet_disconnect("Password for %.100s has expired and cannot be changed without a pty", user); >+ return; >+ } >+ >+ msg = "Password for %.100s has expired, running 'passwd' to reset it"; >+ command = "passwd"; >+ log(msg, user); >+ packet_send_debug(msg, user); >+ >+ } else if (forced_command) { > original_command = command; > command = forced_command; > debug("Forced command '%.900s'", command); >
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 14
:
5
|
199
|
200
|
201
|
205
|
215
|
234
|
240
|
248
|
278
|
540
|
541
|
542
|
543
|
544