From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- .../66460-nagios-plugins-1.3.1-check-ldap.patch | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 web/attachments/66460-nagios-plugins-1.3.1-check-ldap.patch (limited to 'web/attachments/66460-nagios-plugins-1.3.1-check-ldap.patch') diff --git a/web/attachments/66460-nagios-plugins-1.3.1-check-ldap.patch b/web/attachments/66460-nagios-plugins-1.3.1-check-ldap.patch new file mode 100644 index 0000000..31bf7d1 --- /dev/null +++ b/web/attachments/66460-nagios-plugins-1.3.1-check-ldap.patch @@ -0,0 +1,67 @@ +--- ./plugins/check_ldap.c~ 2003-01-29 06:16:15.000000000 +0000 ++++ ./plugins/check_ldap.c 2003-10-22 11:10:44.000000000 +0100 +@@ -45,8 +45,6 @@ + char *ld_attr = ld_defattr; + char *ld_host = ""; + char *ld_base = ""; +-char *ld_passwd = NULL; +-char *ld_binddn = NULL; + unsigned int ld_port = DEFAULT_PORT; + int warn_time = UNDEFINED; + int crit_time = UNDEFINED; +@@ -74,20 +72,12 @@ + time (&time0); + + /* initialize ldap */ +- if (!(ld = ldap_open (ld_host, ld_port))) { ++ if (!(ld = ldap_init (ld_host, ld_port))) { + /*ldap_perror(ld, "ldap_open"); */ + printf ("Could not connect to the server at port %i\n", ld_port); + return STATE_CRITICAL; + } + +- /* bind to the ldap server */ +- if (ldap_bind_s (ld, ld_binddn, ld_passwd, LDAP_AUTH_SIMPLE) != +- LDAP_SUCCESS) { +- /*ldap_perror(ld, "ldap_bind"); */ +- printf ("Could not bind to the ldap-server\n"); +- return STATE_CRITICAL; +- } +- + /* do a search of all objectclasses in the base dn */ + if (ldap_search_s (ld, ld_base, LDAP_SCOPE_BASE, ld_attr, NULL, 0, &result) + != LDAP_SUCCESS) { +@@ -140,8 +130,6 @@ + {"host", required_argument, 0, 'H'}, + {"base", required_argument, 0, 'b'}, + {"attr", required_argument, 0, 'a'}, +- {"bind", required_argument, 0, 'D'}, +- {"pass", required_argument, 0, 'P'}, + {"port", required_argument, 0, 'p'}, + {"warn", required_argument, 0, 'w'}, + {"crit", required_argument, 0, 'c'}, +@@ -159,9 +147,9 @@ + + while (1) { + #ifdef HAVE_GETOPT_H +- c = getopt_long (argc, argv, "hVt:c:w:H:b:p:a:D:P:", longopts, &option_index); ++ c = getopt_long (argc, argv, "hVt:c:w:H:b:p:a:", longopts, &option_index); + #else +- c = getopt (argc, argv, "+?hVt:c:w:H:b:p:a:D:P:"); ++ c = getopt (argc, argv, "+?hVt:c:w:H:b:p:a:"); + #endif + + if (c == -1 || c == EOF) +@@ -191,12 +179,6 @@ + case 'a': + ld_attr = optarg; + break; +- case 'D': +- ld_binddn = optarg; +- break; +- case 'P': +- ld_passwd = optarg; +- break; + case 'w': + warn_time = atoi (optarg); + break; -- cgit v1.2.3-74-g34f1