2011-04-13 Dario Rodriguez <dario.rodriguez@artica.es>
* AIX/pandora_agent.conf, Linux/pandora_agent.conf, HP-UX/pandora_agent.conf SunOS/pandora_agent.conf: Deleted proxy_user parameter because is not needed. Also fixed some comments. * pandora_agent: Resctricted Proxy Mode to non root users. The agent must be launched by a non root user to use Proxy Mode. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4197 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c503550c17
commit
67c4e33021
|
@ -82,12 +82,9 @@ transfer_mode tentacle
|
||||||
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
|
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
|
||||||
# remote_config 1
|
# remote_config 1
|
||||||
|
|
||||||
# If set to 1 start babel agent in proxy mode
|
# If set to 1 start Drone Agent's Proxy Mode
|
||||||
# proxy_mode 1
|
# proxy_mode 1
|
||||||
|
|
||||||
# User which runs tentacle server in proxy mode. Required with if proxy mode is enable (by default pandora)
|
|
||||||
# proxy_user pandora
|
|
||||||
|
|
||||||
# Max number of simmultaneus connection for proxy (by default 10)
|
# Max number of simmultaneus connection for proxy (by default 10)
|
||||||
# proxy_max_connection 10
|
# proxy_max_connection 10
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
2011-04-13 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
|
* AIX/pandora_agent.conf, Linux/pandora_agent.conf, HP-UX/pandora_agent.conf
|
||||||
|
SunOS/pandora_agent.conf: Deleted proxy_user parameter because is not
|
||||||
|
needed. Also fixed some comments.
|
||||||
|
* pandora_agent: Resctricted Proxy Mode to non root users. The agent must
|
||||||
|
be launched by a non root user to use Proxy Mode.
|
||||||
|
|
||||||
2011-04-12 Dario Rodriguez <dario.rodriguez@artica.es>
|
2011-04-12 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
* pandora_agent_daemon: Deleted code that kill tentacle server and
|
* pandora_agent_daemon: Deleted code that kill tentacle server and
|
||||||
|
|
|
@ -82,12 +82,9 @@ transfer_mode tentacle
|
||||||
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
|
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
|
||||||
# remote_config 1
|
# remote_config 1
|
||||||
|
|
||||||
# If set to 1 start babel agent in proxy mode
|
# If set to 1 start Drone Agent's Proxy Mode
|
||||||
# proxy_mode 1
|
# proxy_mode 1
|
||||||
|
|
||||||
# User which runs tentacle server in proxy mode. Required with if proxy mode is enable (by default pandora)
|
|
||||||
# proxy_user pandora
|
|
||||||
|
|
||||||
# Max number of simmultaneus connection for proxy (by default 10)
|
# Max number of simmultaneus connection for proxy (by default 10)
|
||||||
# proxy_max_connection 10
|
# proxy_max_connection 10
|
||||||
|
|
||||||
|
|
|
@ -97,12 +97,9 @@ transfer_mode tentacle
|
||||||
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
|
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
|
||||||
#remote_config 1
|
#remote_config 1
|
||||||
|
|
||||||
# If set to 1 start babel agent in proxy mode
|
# If set to 1 start Drone Agent's Proxy Mode
|
||||||
# proxy_mode 1
|
# proxy_mode 1
|
||||||
|
|
||||||
# User which runs tentacle server in proxy mode. Required with if proxy mode is enable (by default pandora)
|
|
||||||
# proxy_user pandora
|
|
||||||
|
|
||||||
# Max number of simmultaneus connection for proxy (by default 10)
|
# Max number of simmultaneus connection for proxy (by default 10)
|
||||||
# proxy_max_connection 10
|
# proxy_max_connection 10
|
||||||
|
|
||||||
|
|
|
@ -82,12 +82,9 @@ transfer_mode tentacle
|
||||||
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
|
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
|
||||||
# remote_config 1
|
# remote_config 1
|
||||||
|
|
||||||
# If set to 1 start babel agent in proxy mode
|
# If set to 1 start Drone Agent's Proxy Mode
|
||||||
# proxy_mode 1
|
# proxy_mode 1
|
||||||
|
|
||||||
# User which runs tentacle server in proxy mode. Required with if proxy mode is enable (by default pandora)
|
|
||||||
# proxy_user pandora
|
|
||||||
|
|
||||||
# Max number of simmultaneus connection for proxy (by default 10)
|
# Max number of simmultaneus connection for proxy (by default 10)
|
||||||
# proxy_max_connection 10
|
# proxy_max_connection 10
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,6 @@ my %Conf = (
|
||||||
'udp_server_auth_address' => '0.0.0.0',
|
'udp_server_auth_address' => '0.0.0.0',
|
||||||
'udp_server' => 0,
|
'udp_server' => 0,
|
||||||
'proxy_mode' => 0,
|
'proxy_mode' => 0,
|
||||||
'proxy_user' => 'pandora',
|
|
||||||
'proxy_max_connection' => 10,
|
'proxy_max_connection' => 10,
|
||||||
'proxy_timeout' => 1,
|
'proxy_timeout' => 1,
|
||||||
);
|
);
|
||||||
|
@ -627,10 +626,6 @@ sub launch_tentacle_proxy () {
|
||||||
$tentacle_pid = fork();
|
$tentacle_pid = fork();
|
||||||
|
|
||||||
if ($tentacle_pid == 0) {
|
if ($tentacle_pid == 0) {
|
||||||
# Change the UID
|
|
||||||
my $proxy_user_id = getpwnam($Conf{'proxy_user'});
|
|
||||||
$< = $proxy_user_id;
|
|
||||||
$> = $proxy_user_id;
|
|
||||||
|
|
||||||
#Execute tentacle server as a daemon
|
#Execute tentacle server as a daemon
|
||||||
my $new_process = "tentacle_server -b ".$Conf{'server_ip'}." -g ".$Conf{'server_port'}." -c ".$Conf{'proxy_max_connection'}." -t ".$Conf{'proxy_timeout'};
|
my $new_process = "tentacle_server -b ".$Conf{'server_ip'}." -g ".$Conf{'server_port'}." -c ".$Conf{'proxy_max_connection'}." -t ".$Conf{'proxy_timeout'};
|
||||||
|
@ -1433,7 +1428,13 @@ my $PID = $$;
|
||||||
|
|
||||||
#Launch tentacle server in proxy mode if configured
|
#Launch tentacle server in proxy mode if configured
|
||||||
if ($Conf{'proxy_mode'}) {
|
if ($Conf{'proxy_mode'}) {
|
||||||
launch_tentacle_proxy();
|
|
||||||
|
#Check if user is root
|
||||||
|
if ($< != 0) {
|
||||||
|
launch_tentacle_proxy();
|
||||||
|
} else {
|
||||||
|
log_message ('error', 'Proxy mode can not be launched as root');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add the plugins directory to the PATH
|
# Add the plugins directory to the PATH
|
||||||
|
|
Loading…
Reference in New Issue