summaryrefslogtreecommitdiff
path: root/server/providers
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-04-24 11:08:35 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-04-27 07:04:06 -0400
commit9ed4394fb569d64a61e27784a73e2068393e7fa0 (patch)
tree0e870d446b5b0adb8ff49e07daf4ee6333912ed7 /server/providers
parent1cabd594f224825bd0eae543216d87801091c33c (diff)
downloadsssd-9ed4394fb569d64a61e27784a73e2068393e7fa0.tar.gz
sssd-9ed4394fb569d64a61e27784a73e2068393e7fa0.tar.bz2
sssd-9ed4394fb569d64a61e27784a73e2068393e7fa0.zip
handle pam acct_mgmt, setcred and open/close_session before user bind in ldap backend
Diffstat (limited to 'server/providers')
-rw-r--r--server/providers/ldap_be.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/providers/ldap_be.c b/server/providers/ldap_be.c
index 2c075bd0..e6547025 100644
--- a/server/providers/ldap_be.c
+++ b/server/providers/ldap_be.c
@@ -456,6 +456,23 @@ static void sdap_pam_loop(struct tevent_context *ev, struct tevent_fd *te,
}
} while( (msg=ldap_next_message(lr->ldap, msg)) != NULL );
+ switch (lr->pd->cmd) {
+ case SSS_PAM_AUTHENTICATE:
+ case SSS_PAM_CHAUTHTOK:
+ break;
+ case SSS_PAM_ACCT_MGMT:
+ case SSS_PAM_SETCRED:
+ case SSS_PAM_OPEN_SESSION:
+ case SSS_PAM_CLOSE_SESSION:
+ pam_status = PAM_SUCCESS;
+ goto done;
+ break;
+ default:
+ DEBUG(1, ("Unknown pam command %d.\n", lr->pd->cmd));
+ pam_status = PAM_SYSTEM_ERR;
+ goto done;
+ }
+
ret = sdap_bind(lr);
if (ret != LDAP_SUCCESS) {
DEBUG(1, ("sdap_bind failed.\n"));