summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_access.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-01-08 17:12:17 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-01-09 12:32:03 +0100
commit91ab35daf713e146dfae53a67f6b86b424c897d5 (patch)
tree5d44255c3d6be2b6712b96a966f338b2fa938608 /src/providers/ldap/sdap_access.c
parent6ac0feca0cdc66fc8d8a612e25d37a49d27c0233 (diff)
downloadsssd-91ab35daf713e146dfae53a67f6b86b424c897d5.tar.gz
sssd-91ab35daf713e146dfae53a67f6b86b424c897d5.tar.xz
sssd-91ab35daf713e146dfae53a67f6b86b424c897d5.zip
LDAP: Add a new error code for malformed access control filtersssd-1.11.2-23.el7
https://fedorahosted.org/sssd/ticket/2164 The patch adds a new error code and special cases the new code so that access is denied and a nicer log message is shown.
Diffstat (limited to 'src/providers/ldap/sdap_access.c')
-rw-r--r--src/providers/ldap/sdap_access.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c
index f0df24e7f..29e83eb43 100644
--- a/src/providers/ldap/sdap_access.c
+++ b/src/providers/ldap/sdap_access.c
@@ -855,9 +855,15 @@ static void sdap_access_filter_get_access_done(struct tevent_req *subreq)
}
} else if (dp_error == DP_ERR_OFFLINE) {
ret = sdap_access_filter_decide_offline(req);
+ } else if (ret == ERR_INVALID_FILTER) {
+ sss_log(SSS_LOG_ERR,
+ "Malformed access control filter [%s]\n", state->filter);
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("Malformed access control filter [%s]\n", state->filter));
+ ret = ERR_ACCESS_DENIED;
} else {
DEBUG(1, ("sdap_get_generic_send() returned error [%d][%s]\n",
- ret, strerror(ret)));
+ ret, sss_strerror(ret)));
}
goto done;