Ticket #139 (accepted defect)

Opened 16 months ago

Last modified 14 months ago

solaris printf statement syntax error after import/export from 2.5 to 3.0

Reported by: devans3428 Owned by: tdondich
Priority: major Milestone: 1.4
Component: Importer Version: 1.0.2
Keywords: import export printf Cc:

Description

OS:solaris9,10 build
Ran the import/export from 2.5 nagios to 3.0 nagios...Exported using the lilac export engine. I was not receiving my alert emails. I later found the import had added some additional characters to my notify-by-email printf command...notice the double and sometime unnecessary "\"....see the diff below:
nagios-2.5 notify-by-email:
/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mailx -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$

nagios-3.0.6 notify-by-email after exporting with lilac-1.0.2:
/usr/bin/printf \"%b\" \"***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\n\\nService: $SERVICEDESC$\\nHost: $HOSTALIAS$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\n\\nDate/Time: $LONGDATETIME$\\n\\nAdditional Info:\\n\\n$SERVICEOUTPUT$\" | /usr/bin/mailx -s \"** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **\" $CONTACTEMAIL$

Change History

Changed 14 months ago by tdondich

  • status changed from new to accepted
  • milestone set to 1.4

We need to make sure magic_quotes_gpc is disabled during the installer. For your fix, make sure magic_quotes_gpc in your php.ini is turned OFF.

Note: See TracTickets for help on using tickets.