FreeBSD Bugzilla – Attachment 62543 Details for
Bug 93473
[patch] Let pam_unix(8) use "passwordtime" from login.conf(5) to set next password expiry date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
passwordtime.diff
passwordtime.diff (text/plain), 1.63 KB, created by
Björn König
on 2006-02-17 11:20:03 UTC
(
hide
)
Description:
passwordtime.diff
Filename:
MIME Type:
Creator:
Björn König
Created:
2006-02-17 11:20:03 UTC
Size:
1.63 KB
patch
obsolete
>--- src/lib/libpam/modules/pam_unix/pam_unix.c.orig Fri Feb 17 11:28:12 2006 >+++ src/lib/libpam/modules/pam_unix/pam_unix.c Fri Feb 17 11:30:27 2006 >@@ -371,11 +371,21 @@ > if ((old_pwd = pw_dup(pwd)) == NULL) > return (PAM_BUF_ERR); > >- pwd->pw_change = 0; > lc = login_getclass(pwd->pw_class); > if (login_setcryptfmt(lc, password_hash, NULL) == NULL) > openpam_log(PAM_LOG_ERROR, > "can't set password cipher, relying on default"); >+ >+ /* set password expiry date */ >+ pwd->pw_change = 0; >+ if (lc != NULL) { >+ time_t period; >+ period = login_getcaptime(lc, "passwordtime", 0, 0); >+ if (period > (time_t)0) { >+ pwd->pw_change = time(NULL) + period; >+ } >+ } >+ > login_close(lc); > makesalt(salt); > pwd->pw_passwd = crypt(new_pass, salt); >--- src/lib/libutil/login.conf.5.orig Sun Feb 27 23:24:24 2005 >+++ src/lib/libutil/login.conf.5 Fri Feb 17 11:38:04 2006 >@@ -253,6 +253,9 @@ > NIS server should probably use "des". > .It "passwd_prompt string The password prompt presented by > .Xr login 1 >+.It "passwordtime time Used by >+.Xr pam_unix 8 >+to set next password expiry date. > .It "times.allow list List of time periods during which > logins are allowed. > .It "times.deny list List of time periods during which logins are >@@ -388,9 +391,6 @@ > .Xr passwd 1 > will warn the user if an all lower case password is entered. > .It "monthtime time Maximum login time per month. >-.It "passwordtime time Used by >-.Xr passwd 1 >-to set next password expiry date. > .It "refreshtime time New time allowed on account refresh. > .It "refreshperiod str How often account time is refreshed. > .It "sessiontime time Maximum login time per session.
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 93473
: 62543