2013-10-16 Miguel de Dios <miguel.dedios@artica.es>

* godmode/massive/massive_delete_modules.php,
	include/functions_modules.php: fixed the delete modules with
	conf from the massive operations.

2013-10-16 Miguel de Dios <miguel.dedios@artica.es>

	* pandoradb_data.sql,
	extensions/update_manager/sql/update_manager.sql,
	extensions/update_manager/sql/update_manager.postgreSQL.sql,
	extensions/update_manager/sql/update_manager.oracle.sql,
	extensions/system_info.php, pandoradb.data.postgreSQL.sql,
	pandoradb.data.oracle.sql, extras/pandora_diag.php: removed the
	unused path to keygen.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8924 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-10-16 10:30:35 +00:00
parent 429349fb08
commit 9039157070
11 changed files with 50 additions and 25 deletions

View File

@ -1,3 +1,19 @@
2013-10-16 Miguel de Dios <miguel.dedios@artica.es>
* godmode/massive/massive_delete_modules.php,
include/functions_modules.php: fixed the delete modules with
conf from the massive operations.
2013-10-16 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql,
extensions/update_manager/sql/update_manager.sql,
extensions/update_manager/sql/update_manager.postgreSQL.sql,
extensions/update_manager/sql/update_manager.oracle.sql,
extensions/system_info.php, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, extras/pandora_diag.php: removed the
unused path to keygen.
2013-10-16 Sergio Martin <sergio.martin@artica.es>
* ChangeLog: Commit last commit missed ChangeLog

View File

@ -52,7 +52,6 @@ function getPandoraDiagnostic(&$systemInfo) {
$systemInfo['db_maintance'] = date ("Y/m/d H:i:s", db_get_sql ("SELECT `value` FROM tconfig WHERE `token` = 'db_maintance'"));
$systemInfo['customer_key'] = db_get_sql("SELECT value FROM tupdate_settings WHERE `key` = 'customer_key';");
$systemInfo['updating_code_path'] = db_get_sql("SELECT value FROM tupdate_settings WHERE `key` = 'updating_code_path'");
$systemInfo['keygen_path'] = db_get_sql("SELECT value FROM tupdate_settings WHERE `key` = 'keygen_path'");
$systemInfo['current_update'] = db_get_sql("SELECT value FROM tupdate_settings WHERE `key` = 'current_update'");
break;
case "postgresql":
@ -62,7 +61,6 @@ function getPandoraDiagnostic(&$systemInfo) {
$systemInfo['db_maintance'] = date ("Y/m/d H:i:s", db_get_sql ("SELECT \"value\" FROM tconfig WHERE \"token\" = 'db_maintance'"));
$systemInfo['customer_key'] = db_get_sql("SELECT value FROM tupdate_settings WHERE \"key\" = 'customer_key';");
$systemInfo['updating_code_path'] = db_get_sql("SELECT value FROM tupdate_settings WHERE \"key\" = 'updating_code_path'");
$systemInfo['keygen_path'] = db_get_sql("SELECT value FROM tupdate_settings WHERE \"key\" = 'keygen_path'");
$systemInfo['current_update'] = db_get_sql("SELECT value FROM tupdate_settings WHERE \"key\" = 'current_update'");
break;
case "oracle":
@ -72,7 +70,6 @@ function getPandoraDiagnostic(&$systemInfo) {
$systemInfo['db_maintance'] = db_get_sql ("SELECT value FROM tconfig WHERE token = 'db_maintance'");
$systemInfo['customer_key'] = db_get_sql("SELECT value FROM tupdate_settings WHERE key = 'customer_key';");
$systemInfo['updating_code_path'] = db_get_sql("SELECT value FROM tupdate_settings WHERE key = 'updating_code_path'");
$systemInfo['keygen_path'] = db_get_sql("SELECT value FROM tupdate_settings WHERE key = 'keygen_path'");
$systemInfo['current_update'] = db_get_sql("SELECT value FROM tupdate_settings WHERE key = 'current_update'");
break;
}

View File

@ -1,7 +1,6 @@
CREATE TABLE tupdate_settings ( key VARCHAR2(255) default '' PRIMARY KEY, value VARCHAR2(255) default '')
/INSERT INTO tupdate_settings VALUES ('current_update', '412')
/INSERT INTO tupdate_settings VALUES ('customer_key', 'PANDORA-FREE')
/INSERT INTO tupdate_settings VALUES ('keygen_path', '/usr/share/pandora_server/keygen.i386.static')
/INSERT INTO tupdate_settings VALUES ('update_server_host', 'www.artica.es')
/INSERT INTO tupdate_settings VALUES ('update_server_port', '80')
/INSERT INTO tupdate_settings VALUES ('update_server_path', '/pandoraupdate4/server.php')

View File

@ -1,5 +1,5 @@
CREATE TABLE "tupdate_settings" ( "key" varchar(255) default '' PRIMARY KEY, "value" varchar(255) default '');
INSERT INTO "tupdate_settings" VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('keygen_path', '/usr/share/pandora_server/keygen.i386.static'), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', '/pandoraupdate4/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
INSERT INTO "tupdate_settings" VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', '/pandoraupdate4/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
CREATE TABLE "tupdate_package"( "id" SERIAL NOT NULL PRIMARY KEY, "timestamp" TIMESTAMP without time zone default NULL, "description" varchar(255) default '');
CREATE TYPE type_tupdate_type AS ENUM ('code', 'db_data', 'db_schema', 'binary');
CREATE TABLE "tupdate" ( "id" SERIAL NOT NULL PRIMARY KEY, "type" type_tupdate_type, "id_update_package" INTEGER default 0 REFERENCES "tupdate_package"("id") ON UPDATE CASCADE ON DELETE CASCADE, "filename" varchar(250) default '', "checksum" varchar(250) default '', "previous_checksum" varchar(250) default '', "svn_version" INTEGER default 0, "data" TEXT default '', "data_rollback" TEXT default '', "description" TEXT default '', "db_table_name" varchar(140) default '', "db_field_name" varchar(140) default '', "db_field_value" varchar(1024) default '');

View File

@ -1,5 +1,5 @@
CREATE TABLE `tupdate_settings` ( `key` varchar(255) default '', `value` varchar(255) default '', PRIMARY KEY (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('keygen_path', '/usr/share/pandora_server/keygen.i386.static'), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', '/pandoraupdate4/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', '/pandoraupdate4/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
CREATE TABLE `tupdate_package` ( id int(11) unsigned NOT NULL auto_increment, timestamp datetime NOT NULL, description varchar(255) default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tupdate` ( id int(11) unsigned NOT NULL auto_increment, type enum('code', 'db_data', 'db_schema', 'binary'), id_update_package int(11) unsigned NOT NULL default 0, filename varchar(250) default '', checksum varchar(250) default '', previous_checksum varchar(250) default '', svn_version int(4) unsigned NOT NULL default 0, data LONGTEXT default '', data_rollback LONGTEXT default '', description TEXT default '', db_table_name varchar(140) default '', db_field_name varchar(140) default '', db_field_value varchar(1024) default '', PRIMARY KEY (`id`), FOREIGN KEY (`id_update_package`) REFERENCES tupdate_package(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tupdate_journal` ( id int(11) unsigned NOT NULL auto_increment, id_update int(11) unsigned NOT NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`id_update`) REFERENCES tupdate(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -141,9 +141,6 @@ switch ($config["dbtype"]) {
render_info_data ("SELECT value
FROM tupdate_settings
WHERE `key` = 'updating_code_path'", "Updating code path");
render_info_data ("SELECT value
FROM tupdate_settings
WHERE `key` = 'keygen_path'", "Keygen path");
render_info_data ("SELECT value
FROM tupdate_settings
WHERE `key` = 'current_update'", "Current Update #");
@ -168,9 +165,6 @@ switch ($config["dbtype"]) {
render_info_data ("SELECT value
FROM tupdate_settings
WHERE \"key\" = 'updating_code_path'", "Updating code path");
render_info_data ("SELECT value
FROM tupdate_settings
WHERE \"key\" = 'keygen_path'", "Keygen path");
render_info_data ("SELECT value
FROM tupdate_settings
WHERE \"key\" = 'current_update'", "Current Update #");
@ -195,9 +189,6 @@ switch ($config["dbtype"]) {
render_info_data ("SELECT value
FROM tupdate_settings
WHERE key = 'updating_code_path'", "Updating code path");
render_info_data ("SELECT value
FROM tupdate_settings
WHERE key = 'keygen_path'", "Keygen path");
render_info_data ("SELECT value
FROM tupdate_settings
WHERE key = 'current_update'", "Current Update #");

View File

@ -88,12 +88,14 @@ function process_manage_delete ($module_name, $id_agents) {
$success = modules_delete_agent_module ($modules);
if (! $success) {
ui_print_error_message(__('There was an error deleting the modules, the operation has been cancelled'));
ui_print_error_message(
__('There was an error deleting the modules, the operation has been cancelled'));
return false;
}
else {
ui_print_success_message(__('Successfully deleted') . '&nbsp;(' . $count_deleted_modules . ')');
ui_print_success_message(
__('Successfully deleted') . '&nbsp;(' . $count_deleted_modules . ')');
return true;
}

View File

@ -272,8 +272,12 @@ function modules_delete_agent_module ($id_agent_module) {
return false;
if (is_array($id_agent_module)) {
$id_agents = db_get_all_rows_sql (sprintf('SELECT id_agente FROM tagente_modulo WHERE id_agente_modulo IN (%s) GROUP BY id_agente', implode(',', $id_agent_module)));
$id_agents = db_get_all_rows_sql(
sprintf('SELECT id_agente
FROM tagente_modulo
WHERE id_agente_modulo IN (%s)
GROUP BY id_agente', implode(',', $id_agent_module)));
foreach($id_agents as $k => $v) {
$id_agents[$k] = $v['id_agente'];
}
@ -292,16 +296,33 @@ function modules_delete_agent_module ($id_agent_module) {
SET update_module_count=1, update_alert_count=1
WHERE id_agente = %s', $id_agent));
}
$where = array ('id_agent_module' => $id_agent_module);
enterprise_hook('config_agents_delete_module_in_conf', array(modules_get_agentmodule_agent($id_agent_module), modules_get_agentmodule_name($id_agent_module)));
$enterprise_include = enterprise_include_once(
'include/functions_config_agents.php');
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
if (is_array($id_agent_module)) {
foreach ($id_agent_module as $id_agent_module_item) {
config_agents_delete_module_in_conf(
modules_get_agentmodule_agent($id_agent_module_item),
modules_get_agentmodule_name($id_agent_module_item));
}
}
else {
config_agents_delete_module_in_conf(
modules_get_agentmodule_agent($id_agent_module),
modules_get_agentmodule_name($id_agent_module));
}
}
alerts_delete_alert_agent_module (0, $where);
db_process_sql_delete ('tgraph_source', $where);
db_process_sql_delete ('treport_content', $where);
db_process_sql_delete ('tevento', array ('id_agentmodule' => $id_agent_module));
db_process_sql_delete ('tevento',
array('id_agentmodule' => $id_agent_module));
$where = array ('id_agente_modulo' => $id_agent_module);
db_process_sql_delete ('tlayout_data', $where);
db_process_sql_delete ('tagente_estado', $where);

View File

@ -1209,7 +1209,6 @@ INSERT INTO tevent_response VALUES (1,'Ping&#x20;to&#x20;host','Ping&#x20;to&#x2
INSERT INTO tupdate_settings VALUES ('current_update', '412');
INSERT INTO tupdate_settings VALUES ('customer_key', 'PANDORA-FREE');
INSERT INTO tupdate_settings VALUES ('keygen_path', '/usr/share/pandora_server/keygen.i386.static');
INSERT INTO tupdate_settings VALUES ('update_server_host', 'www.artica.es');
INSERT INTO tupdate_settings VALUES ('update_server_port', '80');
INSERT INTO tupdate_settings VALUES ('update_server_path', '/pandoraupdate5/server.php');

View File

@ -1050,4 +1050,4 @@ INSERT INTO "ttag" VALUES (1,'network','Network&#x20;equipment','http://artica.e
INSERT INTO "tevent_response" VALUES (1,'Ping&#x20;to&#x20;host','Ping&#x20;to&#x20;the&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_agent_address_','command',0,620,500,0,''),(2,'SSH&#x20;to&#x20;host','Connect&#x20;via&#x20;SSH&#x20;to&#x20;the&#x20;agent','http://192.168.70.164:8022/anyterm.html?param=_User_@_agent_address_','url',0,800,450,0,'User'),(3,'Create&#x20;incident&#x20;from&#x20;event','Create&#x20;a&#x20;incident&#x20;from&#x20;the&#x20;event&#x20;with&#x20;the&#x20;standard&#x20;incidents&#x20;system&#x20;of&#x20;Pandora&#x20;FMS','index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;insert_form&amp;from_event=_event_id_','url',0,0,0,1,''),(4,'Create&#x20;Integria&#x20;IMS&#x20;incident&#x20;from&#x20;event','Create&#x20;a&#x20;incident&#x20;from&#x20;the&#x20;event&#x20;with&#x20;integria&#x20;incidents&#x20;system&#x20;of&#x20;Pandora&#x20;FMS.&#x20;&#x0d;&#x0a;&#x0d;&#x0a;Is&#x20;necessary&#x20;to&#x20;enable&#x20;and&#x20;configure&#x20;the&#x20;Integria&#x20;incidents&#x20;in&#x20;Pandora&#x20;FMS&#x20;setup.','index.php?sec=workspace&amp;sec2=operation/integria_incidents/incident&amp;tab=editor&amp;from_event=_event_id_','url',0,0,0,1,''),(5,'Restart&#x20;agent','Restart&#x20;the&#x20;agent&#x20;with&#x20;using&#x20;UDP&#x20;protocol.&#x0d;&#x0a;&#x0d;&#x0a;To&#x20;use&#x20;this&#x20;response&#x20;is&#x20;necessary&#x20;to&#x20;have&#x20;installed&#x20;Pandora&#x20;FMS&#x20;server&#x20;and&#x20;console&#x20;in&#x20;the&#x20;same&#x20;machine.','/usr/share/pandora_server/util/udp_client.pl&#x20;_agent_address_&#x20;41122&#x20;&quot;REFRESH&#x20;AGENT&quot;','command',0,620,500,0,'');
INSERT INTO "tupdate_settings" VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('keygen_path', '/usr/share/pandora_server/keygen.i386.static'), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', '/pandoraupdate5/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
INSERT INTO "tupdate_settings" VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', '/pandoraupdate5/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');

View File

@ -1010,4 +1010,4 @@ INSERT INTO `ttag` VALUES (1,'network','Network&#x20;equipment','http://artica.e
INSERT INTO `tevent_response` VALUES (1,'Ping&#x20;to&#x20;host','Ping&#x20;to&#x20;the&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_agent_address_','command',0,620,500,0,''),(2,'SSH&#x20;to&#x20;host','Connect&#x20;via&#x20;SSH&#x20;to&#x20;the&#x20;agent','http://192.168.70.164:8022/anyterm.html?param=_User_@_agent_address_','url',0,800,450,0,'User'),(3,'Create&#x20;incident&#x20;from&#x20;event','Create&#x20;a&#x20;incident&#x20;from&#x20;the&#x20;event&#x20;with&#x20;the&#x20;standard&#x20;incidents&#x20;system&#x20;of&#x20;Pandora&#x20;FMS','index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;insert_form&amp;from_event=_event_id_','url',0,0,0,1,''),(4,'Create&#x20;Integria&#x20;IMS&#x20;incident&#x20;from&#x20;event','Create&#x20;a&#x20;incident&#x20;from&#x20;the&#x20;event&#x20;with&#x20;integria&#x20;incidents&#x20;system&#x20;of&#x20;Pandora&#x20;FMS.&#x20;&#x0d;&#x0a;&#x0d;&#x0a;Is&#x20;necessary&#x20;to&#x20;enable&#x20;and&#x20;configure&#x20;the&#x20;Integria&#x20;incidents&#x20;in&#x20;Pandora&#x20;FMS&#x20;setup.','index.php?sec=workspace&amp;sec2=operation/integria_incidents/incident&amp;tab=editor&amp;from_event=_event_id_','url',0,0,0,1,''),(5,'Restart&#x20;agent','Restart&#x20;the&#x20;agent&#x20;with&#x20;using&#x20;UDP&#x20;protocol.&#x0d;&#x0a;&#x0d;&#x0a;To&#x20;use&#x20;this&#x20;response&#x20;is&#x20;necessary&#x20;to&#x20;have&#x20;installed&#x20;Pandora&#x20;FMS&#x20;server&#x20;and&#x20;console&#x20;in&#x20;the&#x20;same&#x20;machine.','/usr/share/pandora_server/util/udp_client.pl&#x20;_agent_address_&#x20;41122&#x20;&quot;REFRESH&#x20;AGENT&quot;','command',0,620,500,0,'');
INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('keygen_path', '/usr/share/pandora_server/keygen.i386.static'), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', '/pandoraupdate5/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', '/pandoraupdate5/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');