summaryrefslogtreecommitdiffstats
path: root/web/attachments/121783-nagiosplug-cvs-progname.diff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/121783-nagiosplug-cvs-progname.diff
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'web/attachments/121783-nagiosplug-cvs-progname.diff')
-rw-r--r--web/attachments/121783-nagiosplug-cvs-progname.diff25
1 files changed, 25 insertions, 0 deletions
diff --git a/web/attachments/121783-nagiosplug-cvs-progname.diff b/web/attachments/121783-nagiosplug-cvs-progname.diff
new file mode 100644
index 0000000..8663049
--- /dev/null
+++ b/web/attachments/121783-nagiosplug-cvs-progname.diff
@@ -0,0 +1,25 @@
1diff -urN ./plugins/check_ldap.c ../plugins/plugins/check_ldap.c
2--- ./plugins/check_ldap.c 2005-01-05 21:53:15.000000000 +0100
3+++ ../plugins/plugins/check_ldap.c 2005-02-17 15:37:46.000000000 +0100
4@@ -19,7 +19,7 @@
5 ******************************************************************************/
6
7 /* progname may be check_ldaps */
8-char *progname = "check_ldap";
9+char *progname;
10 const char *revision = "$Revision: 1.30 $";
11 const char *copyright = "2000-2004";
12 const char *email = "nagiosplug-devel@lists.sourceforge.net";
13@@ -84,9 +84,9 @@
14 bindtextdomain (PACKAGE, LOCALEDIR);
15 textdomain (PACKAGE);
16
17- if (strstr(argv[0],"check_ldaps")) {
18- asprintf (&progname, "check_ldaps");
19- }
20+ progname = strrchr(argv[0], '/');
21+ if(progname && strlen(progname > 1)) progname++;
22+ else progname = argv[0];
23
24 if (process_arguments (argc, argv) == ERROR)
25 usage4 (_("Could not parse arguments"));