summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-04-25 13:11:16 -0400
committerStephen Gallagher <sgallagh@redhat.com>2011-04-27 11:47:24 -0400
commit3156735c3183fbd8c674d4605cf0d09bea54edd4 (patch)
tree1a2b2d521e1c5fd962a0674d888098e05236b43c /src/providers
parent2ffb41c6a16892fccc39fcae7f203bccb8c72dfc (diff)
downloadsssd-3156735c3183fbd8c674d4605cf0d09bea54edd4.tar.gz
sssd-3156735c3183fbd8c674d4605cf0d09bea54edd4.tar.bz2
sssd-3156735c3183fbd8c674d4605cf0d09bea54edd4.zip
Log the LDAP message type we're processing
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_async.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index ed85a910..b96bbdea 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -207,6 +207,61 @@ static void sdap_process_result(struct tevent_context *ev, void *pvt)
sdap_process_message(ev, sh, msg);
}
+static const char *sdap_ldap_result_str(int msgtype)
+{
+ switch (msgtype) {
+ case LDAP_RES_BIND:
+ return "LDAP_RES_BIND";
+
+ case LDAP_RES_SEARCH_ENTRY:
+ return "LDAP_RES_SEARCH_ENTRY";
+
+ case LDAP_RES_SEARCH_REFERENCE:
+ return "LDAP_RES_SEARCH_REFERENCE";
+
+ case LDAP_RES_SEARCH_RESULT:
+ return "LDAP_RES_SEARCH_RESULT";
+
+ case LDAP_RES_MODIFY:
+ return "LDAP_RES_MODIFY";
+
+ case LDAP_RES_ADD:
+ return "LDAP_RES_ADD";
+
+ case LDAP_RES_DELETE:
+ return "LDAP_RES_DELETE";
+
+ case LDAP_RES_MODDN:
+ /* These are the same result
+ case LDAP_RES_MODRDN:
+ case LDAP_RES_RENAME:
+ */
+ return "LDAP_RES_RENAME";
+
+ case LDAP_RES_COMPARE:
+ return "LDAP_RES_COMPARE";
+
+ case LDAP_RES_EXTENDED:
+ return "LDAP_RES_EXTENDED";
+
+ case LDAP_RES_INTERMEDIATE:
+ return "LDAP_RES_INTERMEDIATE";
+
+ case LDAP_RES_ANY:
+ return "LDAP_RES_ANY";
+
+ case LDAP_RES_UNSOLICITED:
+ return "LDAP_RES_UNSOLICITED";
+
+ default:
+ /* Unmatched, fall through */
+ break;
+ }
+
+ /* Unknown result type */
+ return "Unknown result type!";
+}
+
/* process a messgae calling the right operation callback.
* msg is completely taken care of (including freeeing it)
* NOTE: this function may even end up freeing the sdap_handle
@@ -248,6 +303,8 @@ static void sdap_process_message(struct tevent_context *ev,
return;
}
+ DEBUG(9, ("Message type: [%s]\n", sdap_ldap_result_str(msgtype)));
+
switch (msgtype) {
case LDAP_RES_SEARCH_ENTRY:
/* go and process entry */