FreeBSD Bugzilla – Attachment 16272 Details for
Bug 29897
[patch] pam_unix(8) loginclass passwd_prompt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.36 KB, created by
Ilmar S. Habibulin
on 2001-08-20 12:40:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Ilmar S. Habibulin
Created:
2001-08-20 12:40:02 UTC
Size:
2.36 KB
patch
obsolete
>diff -ruiN pam_unix/CVS/Root pam_unix.new/CVS/Root >--- pam_unix/CVS/Root Mon Aug 20 14:44:29 2001 >+++ pam_unix.new/CVS/Root Mon Aug 13 13:23:14 2001 >@@ -1 +1 @@ >-/mnt/cvs/FreeBSD >+/mnt/cvs >diff -ruiN pam_unix/pam_unix.c pam_unix.new/pam_unix.c >--- pam_unix/pam_unix.c Mon Jul 9 22:20:50 2001 >+++ pam_unix.new/pam_unix.c Mon Aug 20 14:45:30 2001 >@@ -23,7 +23,7 @@ > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * >- * $FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.7 2001/07/09 18:20:50 markm Exp $ >+ * $FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.7 2001/07/09 18:20:50 markm Exp $ - this version > */ > > #include <sys/types.h> >@@ -41,7 +41,7 @@ > > #include "pam_mod_misc.h" > >-#define PASSWORD_PROMPT "Password:" >+#define DEFAULT_PASSWORD_PROMPT "Password:" > #define DEFAULT_WARN (2L * 7L * 86400L) /* Two weeks */ > > enum { PAM_OPT_AUTH_AS_SELF=PAM_OPT_STD_MAX, PAM_OPT_NULLOK }; >@@ -52,6 +52,8 @@ > { NULL, 0 } > }; > >+ >+ > /* > * authentication management > */ >@@ -64,6 +66,8 @@ > int retval; > const char *password, *user; > char *encrypted; >+ login_cap_t *lc; >+ char *passwd_prompt=DEFAULT_PASSWORD_PROMPT; > > pam_std_option(&options, other_options, argc, argv); > >@@ -84,6 +88,21 @@ > > PAM_LOG("Doing real authentication"); > >+ lc = login_getclass(NULL); >+/***************************************** >+ * >+ * I don't understand why prompts should be default for all login classes >+ * I think that lc = login_getpwclass(pwd) is more flexiable solution >+ * >+ * lc = login_getclass(NULL); >+ * lc = login_getpwclass(pwd); >+ */ >+ passwd_prompt = login_getcapstr(lc, "passwd_prompt", >+ DEFAULT_PASSWORD_PROMPT, >+ DEFAULT_PASSWORD_PROMPT); >+ login_close(lc); >+ lc = NULL; >+ > if (pwd->pw_passwd[0] == '\0' > && pam_test_option(&options, PAM_OPT_NULLOK, NULL)) { > /* >@@ -94,7 +113,7 @@ > PAM_RETURN(PAM_SUCCESS); > } > else { >- retval = pam_get_pass(pamh, &password, PASSWORD_PROMPT, >+ retval = pam_get_pass(pamh, &password, passwd_prompt, > &options); > if (retval != PAM_SUCCESS) > PAM_RETURN(retval); >@@ -118,7 +137,7 @@ > * User unknown. > * Encrypt a dummy password so as to not give away too much. > */ >- retval = pam_get_pass(pamh, &password, PASSWORD_PROMPT, >+ retval = pam_get_pass(pamh, &password, passwd_prompt, > &options); > if (retval != PAM_SUCCESS) > PAM_RETURN(retval);
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 29897
: 16272