Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #3106] cmd.cgi does not read enviroment variable ICINGA_COMMAND_FILE #1105

Closed
icinga-migration opened this issue Sep 11, 2012 · 4 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/3106

Created by dgoetz on 2012-09-11 13:10:38 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2012-09-18 23:10:53 +00:00)
Target Version: 1.8
Last Update: 2014-12-08 09:27:33 +00:00 (in Redmine)

Icinga Version: 1.7.1 / 1.7.2
OS Version: any

cmd.cgi only reads the main configuration and ignores the enviroment variable ICINGA_COMMAND_FILE. Some use cases are explained in https://wiki.icinga.org/display/howtos/CGI+Environment+Variables.

With the following patch cmd.cgi reads the environment variable after the main config file (icinga.cfg). The code for this is already included in cgiutils.c.

--- cgi/cmd.c.orig  2012-09-11 14:45:48.888999910 +0200
+++ cgi/cmd.c   2012-09-11 14:33:29.033000082 +0200
@@ -313,6 +313,9 @@
        return ERROR;
    }

+   /* read environment */
+   strcpy(command_file, get_cmd_file_location());
+
    /* This requires the date_format parameter in the main config file */
    if (strcmp(start_time_string, ""))
        string_to_time(start_time_string, &start_time);

Changesets

2012-09-11 13:29:39 +00:00 by mfriedrich 3ec2124

classic ui: fix cmd.cgi does not read enviroment variable ICINGA_COMMAND_FILE (thx Dirk Goetz) #3106 - MF

refs #3106
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-09-11 13:30:48 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 1.8

yep, thanks.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-09-16 13:03:38 +00:00

  • Status changed from Assigned to 7
  • Done % changed from 0 to 100

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-09-18 23:10:53 +00:00

  • Status changed from 7 to Resolved

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-12-08 09:27:33 +00:00

  • Project changed from 19 to Core, Classic UI, IDOUtils
  • Category changed from 53 to Classic UI
  • OS Version set to any

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant