summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pam/pam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pam/pam.c b/pam/pam.c
index 2e61f74..2fe6023 100644
--- a/pam/pam.c
+++ b/pam/pam.c
@@ -563,7 +563,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh,int flags,int argc,const char **argv)
/* 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 */