Add LDAP debuging to ldap.c
Steven Soulen <[email protected]>
| Newsgroups | gmane.comp.tools.sudo.devel |
|---|---|
| Message-ID | <CANBekJsx-LP-NR0dAJEjbK9hW_-G9LuFo=iztJaJBFDjEJgUhA@mail.gmail.com> |
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
____________________________________________________________
sudo-workers mailing list <[email protected]>
For list information, options, or to unsubscribe, visit:
http://www.sudo.ws/mailman/listinfo/sudo-workers
ldap.patch
(application/octet-stream, 691 B)
--- /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;