summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfSense.org>2010-01-16 17:57:49 -0500
committerScott Ullrich <sullrich@pfSense.org>2010-01-16 17:58:03 -0500
commit16348c36151ae56b9f9f4fb939a6815cf9456f9c (patch)
tree68805910dc864bcebfeeb6b443b269794d756cb1 /etc
parent08fae4381bffb6ca3e786e42baffb685aa8d8241 (diff)
downloadpfsense-16348c36151ae56b9f9f4fb939a6815cf9456f9c.zip
pfsense-16348c36151ae56b9f9f4fb939a6815cf9456f9c.tar.gz
If config['system']['altpkgrepo']['username'] and config['system']['altpkgrepo']['password'] then pass along these values to the XMLRPC layer so we can use password protected pkg servers
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 217f068..f519962 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -794,6 +794,13 @@ function call_pfsense_method($method, $params, $timeout = 0) {
$xmlrpc_path = $g['xmlrpcpath'];
$msg = new XML_RPC_Message($method, array(XML_RPC_Encode($params)));
$cli = new XML_RPC_Client($xmlrpc_path, $xmlrpc_base_url);
+ // If the ALT PKG Repo has a username/password set, use it.
+ if($config['system']['altpkgrepo']['username'] &&
+ $config['system']['altpkgrepo']['password']) {
+ $username = $config['system']['altpkgrepo']['username'];
+ $password = $config['system']['altpkgrepo']['password'];
+ $cli->setCredentials($username, $password);
+ }
$resp = $cli->send($msg, $timeout);
if(!$resp) {
log_error("XMLRPC communication error: " . $cli->errstr);
OpenPOWER on IntegriCloud