blob: 86630493c7f787f29b98ddc6c5c5568774d37bb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
diff -urN ./plugins/check_ldap.c ../plugins/plugins/check_ldap.c
--- ./plugins/check_ldap.c 2005-01-05 21:53:15.000000000 +0100
+++ ../plugins/plugins/check_ldap.c 2005-02-17 15:37:46.000000000 +0100
@@ -19,7 +19,7 @@
******************************************************************************/
/* progname may be check_ldaps */
-char *progname = "check_ldap";
+char *progname;
const char *revision = "$Revision: 1.30 $";
const char *copyright = "2000-2004";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
@@ -84,9 +84,9 @@
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (strstr(argv[0],"check_ldaps")) {
- asprintf (&progname, "check_ldaps");
- }
+ progname = strrchr(argv[0], '/');
+ if(progname && strlen(progname > 1)) progname++;
+ else progname = argv[0];
if (process_arguments (argc, argv) == ERROR)
usage4 (_("Could not parse arguments"));
|