Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3-0]: src/lib/libpam/modules/pam_unix Pull up following revision(...



details:   https://anonhg.NetBSD.org/src/rev/fa96b70c5406
branches:  netbsd-3-0
changeset: 579242:fa96b70c5406
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 12 12:30:24 2006 +0000

description:
Pull up following revision(s) (requested by jnemeth in ticket #1370):
        lib/libpam/modules/pam_unix/pam_unix.c: revision 1.11
PR/30730 force changing password via chsh fails
PR/33502 password aging not working
copy old_pwd to new_pwd before modifying

diffstat:

 lib/libpam/modules/pam_unix/pam_unix.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r df388739816e -r fa96b70c5406 lib/libpam/modules/pam_unix/pam_unix.c
--- a/lib/libpam/modules/pam_unix/pam_unix.c    Mon Jun 12 12:19:27 2006 +0000
+++ b/lib/libpam/modules/pam_unix/pam_unix.c    Mon Jun 12 12:30:24 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pam_unix.c,v 1.5.2.4.2.1 2006/03/20 17:37:33 riz Exp $ */
+/*     $NetBSD: pam_unix.c,v 1.5.2.4.2.2 2006/06/12 12:30:24 tron Exp $        */
 
 /*-
  * Copyright 1998 Juniper Networks, Inc.
@@ -40,7 +40,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.49 2004/02/10 10:13:21 des Exp $");
 #else
-__RCSID("$NetBSD: pam_unix.c,v 1.5.2.4.2.1 2006/03/20 17:37:33 riz Exp $");
+__RCSID("$NetBSD: pam_unix.c,v 1.5.2.4.2.2 2006/06/12 12:30:24 tron Exp $");
 #endif
 
 
@@ -404,7 +404,7 @@
 pam_sm_chauthtok(pam_handle_t *pamh, int flags,
     int argc __unused, const char *argv[] __unused)
 {
-       struct passwd *pwd, old_pwd;
+       struct passwd *pwd, new_pwd, old_pwd;
        login_cap_t *lc;
        const char *user, *passwd_db, *new_pass, *old_pass, *p;
        int retval, tries, min_pw_len = 0, pw_expiry = 0;
@@ -600,6 +600,8 @@
                        return (PAM_SERVICE_ERR);
                }
 
+               new_pwd = old_pwd;
+               pwd = &new_pwd;
                pwd->pw_passwd = crypt(new_pass, salt);
                pwd->pw_change = pw_expiry ? pw_expiry + time(NULL) : 0;
 



Home | Main Index | Thread Index | Old Index