diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-01 22:38:57 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-03 11:40:05 +0100 |
commit | f56f9267469fe6556fc946036db003b5ca85a7eb (patch) | |
tree | ac90329b642f008098bc8279552f191e1e3327bc /nslcd/myldap.c | |
parent | 5fce062a92b4838d976a412f88781ca12168ff77 (diff) |
return the password policy bind information via PAM
Diffstat (limited to 'nslcd/myldap.c')
-rw-r--r-- | nslcd/myldap.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c index db58e9a..c564f4b 100644 --- a/nslcd/myldap.c +++ b/nslcd/myldap.c @@ -1037,6 +1037,17 @@ void myldap_set_credentials(MYLDAP_SESSION *session, const char *dn, session->bindpw[sizeof(session->bindpw) - 1] = '\0'; } +/* Get bind ppolicy results from the last bind operation. This function + returns a NSLCD_PAM_* code and optional message. */ +void myldap_get_policy_response(MYLDAP_SESSION *session, int *response, + const char **message) +{ + if (response != NULL) + *response = session->policy_response; + if (message != NULL) + *message = session->policy_message; +} + static int do_try_search(MYLDAP_SEARCH *search) { int rc; |