lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1445 - nss-pam-ldapd/pam

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1445 - nss-pam-ldapd/pam



Author: arthur
Date: Sat Apr 30 11:15:09 2011
New Revision: 1445
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1445

Log:
do not attempt to change password as root when changing an expired password

Modified:
   nss-pam-ldapd/pam/pam.c

Modified: nss-pam-ldapd/pam/pam.c
==============================================================================
--- nss-pam-ldapd/pam/pam.c     Sat Apr 30 10:39:12 2011        (r1444)
+++ nss-pam-ldapd/pam/pam.c     Sat Apr 30 11:15:09 2011        (r1445)
@@ -563,7 +563,7 @@
     /* see if the user is trying to modify another user's password */
     pwent=getpwnam(username);
     myuid=getuid();
-    if ((pwent!=NULL)&&(pwent->pw_uid!=myuid))
+    if 
((pwent!=NULL)&&(pwent->pw_uid!=myuid)&&(!(flags&PAM_CHANGE_EXPIRED_AUTHTOK)))
     {
       /* we are root so we can test if nslcd will allow us to change the
          user's password without the admin password */
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits