Skip to content

Commit

Permalink
Fix broken password changes for local users
Browse files Browse the repository at this point in the history
  • Loading branch information
sgallagher committed Dec 18, 2009
1 parent d41919b commit 41a6e52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/responder/pam/pam_LOCAL_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ static void local_handler_callback(void *pvt, int ldb_status,
switch (pd->cmd) {
case SSS_PAM_AUTHENTICATE:
case SSS_PAM_CHAUTHTOK:
if (pd->cmd == SSS_PAM_CHAUTHTOK && lreq->preq->cctx->priv == 1) {
case SSS_PAM_CHAUTHTOK_PRELIM:
if ((pd->cmd == SSS_PAM_CHAUTHTOK ||
pd->cmd == SSS_PAM_CHAUTHTOK_PRELIM) &&
lreq->preq->cctx->priv == 1) {
/* TODO: maybe this is a candiate for an explicit audit message. */
DEBUG(4, ("allowing root to reset a password.\n"));
break;
Expand Down Expand Up @@ -417,6 +420,8 @@ static void local_handler_callback(void *pvt, int ldb_status,
break;
case SSS_PAM_CLOSE_SESSION:
break;
case SSS_PAM_CHAUTHTOK_PRELIM:
break;
default:
lreq->error = EINVAL;
DEBUG(1, ("Unknown PAM task [%d].\n"));
Expand Down

0 comments on commit 41a6e52

Please sign in to comment.