2
## 01_ldap21bind.dpatch by Guido Trotter <ultrotter@debian.org>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Bind to the LDAP server using protocol version 3, so to be able
6
## DP: to check both slapd 2.0 and 2.1
9
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
13
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
17
-patch) patch $patch_opts -p1 < $0;;
18
-unpatch) patch $patch_opts -p1 -R < $0;;
20
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
27
diff -urNad /home/ultrotter/tmp/nagios/nagios-plugins-1.3.1/plugins/check_ldap.c nagios-plugins-1.3.1/plugins/check_ldap.c
28
--- /home/ultrotter/tmp/nagios/nagios-plugins-1.3.1/plugins/check_ldap.c 2003-01-29 07:16:15.000000000 +0100
29
+++ nagios-plugins-1.3.1/plugins/check_ldap.c 2003-08-31 13:46:22.000000000 +0200
31
unsigned int ld_port = DEFAULT_PORT;
32
int warn_time = UNDEFINED;
33
int crit_time = UNDEFINED;
37
main (int argc, char *argv[])
39
return STATE_CRITICAL;
42
+ version = LDAP_VERSION3;
43
+ ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version);
45
/* bind to the ldap server */
46
if (ldap_bind_s (ld, ld_binddn, ld_passwd, LDAP_AUTH_SIMPLE) !=