summaryrefslogtreecommitdiffstats
path: root/plugins/check_ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ldap.c')
-rw-r--r--plugins/check_ldap.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index 868ffc1..87818da 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -3,7 +3,7 @@
3* Monitoring check_ldap plugin 3* Monitoring check_ldap plugin
4* 4*
5* License: GPL 5* License: GPL
6* Copyright (c) 2000-2008 Monitoring Plugins Development Team 6* Copyright (c) 2000-2024 Monitoring Plugins Development Team
7* 7*
8* Description: 8* Description:
9* 9*
@@ -28,7 +28,7 @@
28 28
29/* progname may be check_ldaps */ 29/* progname may be check_ldaps */
30char *progname = "check_ldap"; 30char *progname = "check_ldap";
31const char *copyright = "2000-2008"; 31const char *copyright = "2000-2024";
32const char *email = "devel@monitoring-plugins.org"; 32const char *email = "devel@monitoring-plugins.org";
33 33
34#include "common.h" 34#include "common.h"
@@ -47,37 +47,37 @@ enum {
47 DEFAULT_PORT = 389 47 DEFAULT_PORT = 389
48}; 48};
49 49
50int process_arguments (int, char **); 50static int process_arguments (int, char **);
51int validate_arguments (void); 51static int validate_arguments (void);
52void print_help (void); 52static void print_help (void);
53void print_usage (void); 53void print_usage (void);
54 54
55char ld_defattr[] = "(objectclass=*)"; 55static char ld_defattr[] = "(objectclass=*)";
56char *ld_attr = ld_defattr; 56static char *ld_attr = ld_defattr;
57char *ld_host = NULL; 57static char *ld_host = NULL;
58char *ld_base = NULL; 58static char *ld_base = NULL;
59char *ld_passwd = NULL; 59static char *ld_passwd = NULL;
60char *ld_binddn = NULL; 60static char *ld_binddn = NULL;
61int ld_port = -1; 61static int ld_port = -1;
62#ifdef HAVE_LDAP_SET_OPTION 62#ifdef HAVE_LDAP_SET_OPTION
63int ld_protocol = DEFAULT_PROTOCOL; 63static int ld_protocol = DEFAULT_PROTOCOL;
64#endif 64#endif
65#ifndef LDAP_OPT_SUCCESS 65#ifndef LDAP_OPT_SUCCESS
66# define LDAP_OPT_SUCCESS LDAP_SUCCESS 66# define LDAP_OPT_SUCCESS LDAP_SUCCESS
67#endif 67#endif
68double warn_time = UNDEFINED; 68static double warn_time = UNDEFINED;
69double crit_time = UNDEFINED; 69static double crit_time = UNDEFINED;
70thresholds *entries_thresholds = NULL; 70static thresholds *entries_thresholds = NULL;
71struct timeval tv; 71static struct timeval tv;
72char* warn_entries = NULL; 72static char* warn_entries = NULL;
73char* crit_entries = NULL; 73static char* crit_entries = NULL;
74bool starttls = false; 74static bool starttls = false;
75bool ssl_on_connect = false; 75static bool ssl_on_connect = false;
76bool verbose = false; 76static bool verbose = false;
77 77
78/* for ldap tls */ 78/* for ldap tls */
79 79
80char *SERVICE = "LDAP"; 80static char *SERVICE = "LDAP";
81 81
82int 82int
83main (int argc, char *argv[]) 83main (int argc, char *argv[])