[sudo-workers] Add LDAP debuging to ldap.c

Steven Soulen soulen3 at gmail.com
Tue Apr 14 08:13:37 MDT 2015


Hi Todd,

I had some flaky LDAP servers cause me some headaches. Can you please add a
the following print statements to plugins/sudoers/ldap.c?

--- /tmp/sudo/plugins/sudoers/ldap.c  2015-03-24 11:15:24.000000000 -0500
+++ plugins/sudoers/ldap.c  2015-03-24 11:21:48.000000000 -0500
@@ -1431,6 +1431,7 @@
      NULL, 0, NULL, NULL, tvp, 0, &result);
  if (rc != LDAP_SUCCESS) {
      DPRINTF1("nothing found for '%s'", filt);
+     DPRINTF1("ldap search returned with: '%s'", ldap_err2string(rc) );
      if (result)
    ldap_msgfree(result);
      sudo_efree(filt);
@@ -3260,6 +3261,7 @@
        NULL, 0, NULL, NULL, tvp, 0, &result);
    if (rc != LDAP_SUCCESS) {
        DPRINTF1("nothing found for '%s'", filt);
+       DPRINTF1("ldap search returned with: '%s'", ldap_err2string(rc) );
        continue;
    }
    lres->user_matches = true;


Thanks,
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldap.patch
Type: application/octet-stream
Size: 691 bytes
Desc: not available
URL: <http://www.sudo.ws/pipermail/sudo-workers/attachments/20150414/43f929a6/attachment.obj>


More information about the sudo-workers mailing list