From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- .../121783-nagiosplug-cvs-progname.diff | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 web/attachments/121783-nagiosplug-cvs-progname.diff (limited to 'web/attachments/121783-nagiosplug-cvs-progname.diff') 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 @@ +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")); -- cgit v1.2.3-74-g34f1