Code

pst3.c must not use nagiosplug/gnulib includes
[nagiosplug.git] / plugins / check_ldap.c
index d0134a09293e698c20ea114192f77abb29a77b2b..400d74ad7655f38bdba16a722b7b76e5076ab625 100644 (file)
@@ -5,8 +5,6 @@
 * License: GPL
 * Copyright (c) 2000-2008 Nagios Plugins Development Team
 * 
-* Last Modified: $Date$
-* 
 * Description:
 * 
 * This file contains the check_ldap plugin
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
-* $Id$
 * 
 *****************************************************************************/
 
 /* progname may be check_ldaps */
 char *progname = "check_ldap";
-const char *revision = "$Revision$";
 const char *copyright = "2000-2008";
 const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
@@ -40,6 +36,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
 #include "utils.h"
 
 #include <lber.h>
+#define LDAP_DEPRECATED 1
 #include <ldap.h>
 
 enum {
@@ -195,7 +192,7 @@ main (int argc, char *argv[])
                        LDAP_SUCCESS) {
                if (verbose)
                        ldap_perror(ld, "ldap_bind");
-               printf (_("Could not bind to the ldap-server\n"));
+               printf (_("Could not bind to the LDAP server\n"));
                return STATE_CRITICAL;
        }
 
@@ -289,7 +286,7 @@ process_arguments (int argc, char **argv)
                        print_help ();
                        exit (STATE_OK);
                case 'V':                                                                       /* version */
-                       print_revision (progname, revision);
+                       print_revision (progname, NP_VERSION);
                        exit (STATE_OK);
                case 't':                                                                       /* timeout period */
                        if (!is_intnonneg (optarg))
@@ -377,7 +374,7 @@ validate_arguments ()
        if (ld_host==NULL || strlen(ld_host)==0)
                usage4 (_("Please specify the host name\n"));
 
-       if (ld_base==NULL || strlen(ld_base)==0)
+       if (ld_base==NULL)
                usage4 (_("Please specify the LDAP base\n"));
 
        return OK;
@@ -390,7 +387,7 @@ print_help (void)
        char *myport;
        asprintf (&myport, "%d", DEFAULT_PORT);
 
-       print_revision (progname, revision);
+       print_revision (progname, NP_VERSION);
 
        printf ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n");
        printf (COPYRIGHT, copyright, email);