summaryrefslogtreecommitdiffstats
path: root/plugins/check_ldap.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2004-12-25 23:17:46 (GMT)
committerBenoit Mortier <opensides@users.sourceforge.net>2004-12-25 23:17:46 (GMT)
commite9ccc6b21a1152bbf150302c4a29a6df79d75bd7 (patch)
tree91bf1ebb6f927fd628b298df2ac5a89580282591 /plugins/check_ldap.c
parent71656b2aafffb69716620bf08cce76c925dc8fa3 (diff)
downloadmonitoring-plugins-e9ccc6b21a1152bbf150302c4a29a6df79d75bd7.tar.gz
various fixes for localization
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_ldap.c')
-rw-r--r--plugins/check_ldap.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index 582c956..4f14328 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -134,11 +134,11 @@ main (int argc, char *argv[])
134 if (ldap_set_option (ld, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS) 134 if (ldap_set_option (ld, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS)
135 { 135 {
136 /*ldap_perror(ld, "ldaps_option"); */ 136 /*ldap_perror(ld, "ldaps_option"); */
137 printf ("Could not init TLS at port %i!\n", ld_port); 137 printf (_("Could not init TLS at port %i!\n"), ld_port);
138 return STATE_CRITICAL; 138 return STATE_CRITICAL;
139 } 139 }
140#else 140#else
141 printf ("TLS not supported by the libraries!\n", ld_port); 141 printf (_("TLS not supported by the libraries!\n"), ld_port);
142 return STATE_CRITICAL; 142 return STATE_CRITICAL;
143#endif /* LDAP_OPT_X_TLS */ 143#endif /* LDAP_OPT_X_TLS */
144 } else { 144 } else {
@@ -157,11 +157,11 @@ main (int argc, char *argv[])
157 if (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS) 157 if (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS)
158 { 158 {
159 /*ldap_perror(ld, "ldap_start_tls"); */ 159 /*ldap_perror(ld, "ldap_start_tls"); */
160 printf ("Could not init startTLS at port %i!\n", ld_port); 160 printf (_("Could not init startTLS at port %i!\n"), ld_port);
161 return STATE_CRITICAL; 161 return STATE_CRITICAL;
162 } 162 }
163#else 163#else
164 printf ("startTLS not supported by the library, needs LDAPv3!\n"); 164 printf (_("startTLS not supported by the library, needs LDAPv3!\n"));
165 return STATE_CRITICAL; 165 return STATE_CRITICAL;
166#endif /* HAVE_LDAP_START_TLS_S */ 166#endif /* HAVE_LDAP_START_TLS_S */
167 } 167 }
@@ -312,9 +312,7 @@ process_arguments (int argc, char **argv)
312#endif 312#endif
313 break; 313 break;
314 default: 314 default:
315 printf (_("%s: Unknown argument: %s\n\n"), progname, optarg); 315 usage2 (_("Unknown argument"), optarg);
316 print_usage ();
317 exit (STATE_UNKNOWN);
318 } 316 }
319 } 317 }
320 318
@@ -328,21 +326,20 @@ process_arguments (int argc, char **argv)
328 return validate_arguments (); 326 return validate_arguments ();
329} 327}
330 328
329
331int 330int
332validate_arguments () 331validate_arguments ()
333{ 332{
334 if (ld_host==NULL || strlen(ld_host)==0) 333 if (ld_host==NULL || strlen(ld_host)==0)
335 usage (_("please specify the host name\n")); 334 usage4 (_("Please specify the host name\n"));
336 335
337 if (ld_base==NULL || strlen(ld_base)==0) 336 if (ld_base==NULL || strlen(ld_base)==0)
338 usage (_("please specify the LDAP base\n")); 337 usage4 (_("Please specify the LDAP base\n"));
339 338
340 return OK; 339 return OK;
341
342} 340}
343 341
344 342
345
346void 343void
347print_help (void) 344print_help (void)
348{ 345{
@@ -392,7 +389,6 @@ print_help (void)
392} 389}
393 390
394 391
395
396void 392void
397print_usage (void) 393print_usage (void)
398{ 394{