diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-19 06:45:18 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-19 06:45:18 +0000 |
commit | caa8bd6423e2d0d1b4e72c150e80b9c6a9e1b7fe (patch) | |
tree | 118fd80cc8ba27ef695a8e8ce409e5d70f4fa451 /plugins/check_ldap.c | |
parent | 16f53e0717b60660145388b0feb351628f606211 (diff) | |
download | monitoring-plugins-caa8bd6423e2d0d1b4e72c150e80b9c6a9e1b7fe.tar.gz |
Bulk EOL cleanup
$ git diff --ignore-space-change|diffstat
0 files changed
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_ldap.c')
-rw-r--r-- | plugins/check_ldap.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index 3d6f05c4..d0134a09 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c | |||
@@ -87,15 +87,15 @@ main (int argc, char *argv[]) | |||
87 | LDAPMessage *result; | 87 | LDAPMessage *result; |
88 | 88 | ||
89 | /* should be int result = STATE_UNKNOWN; */ | 89 | /* should be int result = STATE_UNKNOWN; */ |
90 | 90 | ||
91 | int status = STATE_UNKNOWN; | 91 | int status = STATE_UNKNOWN; |
92 | long microsec; | 92 | long microsec; |
93 | double elapsed_time; | 93 | double elapsed_time; |
94 | 94 | ||
95 | /* for ldap tls */ | 95 | /* for ldap tls */ |
96 | 96 | ||
97 | int tls; | 97 | int tls; |
98 | int version=3; | 98 | int version=3; |
99 | 99 | ||
100 | setlocale (LC_ALL, ""); | 100 | setlocale (LC_ALL, ""); |
101 | bindtextdomain (PACKAGE, LOCALEDIR); | 101 | bindtextdomain (PACKAGE, LOCALEDIR); |
@@ -129,7 +129,7 @@ main (int argc, char *argv[]) | |||
129 | printf ("Could not connect to the server at port %i\n", ld_port); | 129 | printf ("Could not connect to the server at port %i\n", ld_port); |
130 | return STATE_CRITICAL; | 130 | return STATE_CRITICAL; |
131 | } | 131 | } |
132 | #else | 132 | #else |
133 | if (!(ld = ldap_open (ld_host, ld_port))) { | 133 | if (!(ld = ldap_open (ld_host, ld_port))) { |
134 | if (verbose) | 134 | if (verbose) |
135 | ldap_perror(ld, "ldap_open"); | 135 | ldap_perror(ld, "ldap_open"); |
@@ -137,7 +137,7 @@ main (int argc, char *argv[]) | |||
137 | return STATE_CRITICAL; | 137 | return STATE_CRITICAL; |
138 | } | 138 | } |
139 | #endif /* HAVE_LDAP_INIT */ | 139 | #endif /* HAVE_LDAP_INIT */ |
140 | 140 | ||
141 | #ifdef HAVE_LDAP_SET_OPTION | 141 | #ifdef HAVE_LDAP_SET_OPTION |
142 | /* set ldap options */ | 142 | /* set ldap options */ |
143 | if (ldap_set_option (ld, LDAP_OPT_PROTOCOL_VERSION, &ld_protocol) != | 143 | if (ldap_set_option (ld, LDAP_OPT_PROTOCOL_VERSION, &ld_protocol) != |
@@ -152,7 +152,7 @@ main (int argc, char *argv[]) | |||
152 | #if defined(HAVE_LDAP_SET_OPTION) && defined(LDAP_OPT_X_TLS) | 152 | #if defined(HAVE_LDAP_SET_OPTION) && defined(LDAP_OPT_X_TLS) |
153 | /* ldaps: set option tls */ | 153 | /* ldaps: set option tls */ |
154 | tls = LDAP_OPT_X_TLS_HARD; | 154 | tls = LDAP_OPT_X_TLS_HARD; |
155 | 155 | ||
156 | if (ldap_set_option (ld, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS) | 156 | if (ldap_set_option (ld, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS) |
157 | { | 157 | { |
158 | if (verbose) | 158 | if (verbose) |
@@ -179,7 +179,7 @@ main (int argc, char *argv[]) | |||
179 | /* call start_tls */ | 179 | /* call start_tls */ |
180 | if (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS) | 180 | if (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS) |
181 | { | 181 | { |
182 | if (verbose) | 182 | if (verbose) |
183 | ldap_perror(ld, "ldap_start_tls"); | 183 | ldap_perror(ld, "ldap_start_tls"); |
184 | printf (_("Could not init startTLS at port %i!\n"), ld_port); | 184 | printf (_("Could not init startTLS at port %i!\n"), ld_port); |
185 | return STATE_CRITICAL; | 185 | return STATE_CRITICAL; |
@@ -189,7 +189,7 @@ main (int argc, char *argv[]) | |||
189 | return STATE_CRITICAL; | 189 | return STATE_CRITICAL; |
190 | #endif /* HAVE_LDAP_START_TLS_S */ | 190 | #endif /* HAVE_LDAP_START_TLS_S */ |
191 | } | 191 | } |
192 | 192 | ||
193 | /* bind to the ldap server */ | 193 | /* bind to the ldap server */ |
194 | if (ldap_bind_s (ld, ld_binddn, ld_passwd, LDAP_AUTH_SIMPLE) != | 194 | if (ldap_bind_s (ld, ld_binddn, ld_passwd, LDAP_AUTH_SIMPLE) != |
195 | LDAP_SUCCESS) { | 195 | LDAP_SUCCESS) { |