Project

General

Profile

Actions

Bug #9492

closed

Cannot reload remote haproxy via ACME package

Added by Florian Apolloner about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
ACME
Target version:
-
Start date:
04/29/2019
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
All
Affected Plus Version:
Affected Architecture:
All

Description

The acme instance cannot restart a remote haproxy service. I looked at the code and found this snippet: https://github.com/pfsense/FreeBSD-ports/blob/8f6f7405a4dbca174e31d3a4101b5b250fe4400a/security/pfSense-pkg-acme/files/usr/local/pkg/acme/acme.inc#L101-L104

In a debug shell I executed (to test):

require_once("xmlrpc_client.inc");
$extras = array();
$execstr = <<<EOD
require_once('service-utils.inc');
service_control_restart("haproxy", $extras);
EOD;
echo $execstr;
exec

which resulted in

require_once('service-utils.inc');
service_control_restart("haproxy", Array);

So it seems to me the interpolation of $extras is wrong. The master firewall says " Exception calling XMLRPC method exec_php # String could not be parsed as XML @ 2019-04-29 10:05:31 " in the error log and the remote firewall says: "PHP Parse error: syntax error, unexpected ')', expecting '(' in /usr/local/www/xmlrpc.php(140) : eval()'d code on line 2" -- which is in line with "Array)" being invalid.


Files

c0ad9c7e-8261-4b9f-8871-446b22388bb3.png (111 KB) c0ad9c7e-8261-4b9f-8871-446b22388bb3.png system log Florian Apolloner, 05/07/2019 02:24 AM
Actions

Also available in: Atom PDF