Project

General

Profile

« Previous | Next » 

Revision 47e5f741

Added by Ermal LUÇI over 14 years ago

By default assume admin user and do not blindly copy the first user from the config.xml

View differences:

etc/rc.filter_synchronize
101 101
		while ($numberofruns < 2) {
102 102
			$msg = new XML_RPC_Message($method, $params);
103 103
			$cli = new XML_RPC_Client('/xmlrpc.php', $url, $port);
104
			$username = $config['system']['user'][0]['name'];
104
			/* XXX: Configurable from the GUI?! */
105
			$username = "admin";
105 106
			$cli->setCredentials($username, $password);
106 107
			if($numberofruns > 1)
107 108
				$cli->setDebug(1);
......
235 236
		log_error("Beginning XMLRPC sync to {$url}:{$port}.");
236 237
		$msg = new XML_RPC_Message($method, $params);
237 238
		$cli = new XML_RPC_Client('/xmlrpc.php', $url, $port);
238
		$username = $config['system']['user'][0]['name'];
239
		/* XXX: Configurable from the GUI?! */
240
		$username = "admin";
239 241
		$cli->setCredentials($username, $password);
240 242
		if($numberofruns > 1)
241 243
			$cli->setDebug(1);
......
394 396
			);
395 397

  
396 398
			$msg = new XML_RPC_Message('pfsense.filter_configure', $params);
397
			$username = $config['system']['user'][0]['name'];
399
			/* XXX: Configurable from the GUI */
400
			$username = "admin";
398 401
			$cli->setCredentials($username, $carp['password']);
399 402
			$resp = $cli->send($msg, "900");
400 403

  

Also available in: Unified diff