Merge branch 'ent-5457-suid-nodos-elastic' into 'develop'

Ent 5457 suid nodos elastic

See merge request artica/pandorafms!3062
This commit is contained in:
Daniel Rodriguez 2020-02-18 13:24:22 +01:00
commit e9bd718eaa
4 changed files with 22 additions and 3 deletions

View File

@ -0,0 +1,14 @@
START TRANSACTION;
ALTER TABLE `tmetaconsole_setup` ADD COLUMN `server_uid` TEXT NOT NULL default '';
SET @st_oum744 = (SELECT IF(
(SELECT COUNT(*) FROM tconfig WHERE token LIKE 'server_unique_identifier') > 0,
"SELECT 1",
"INSERT INTO `tconfig` (`token`, `value`) VALUES ('server_unique_identifier', replace(uuid(),'-',''))"
));
PREPARE pr_oum744 FROM @st_oum744;
EXECUTE pr_oum744;
DEALLOCATE PREPARE pr_oum744;
COMMIT;

View File

@ -392,6 +392,8 @@ ALTER TABLE `tmetaconsole_setup` MODIFY COLUMN `meta_dbuser` text NULL,
MODIFY COLUMN `meta_dbport` text NULL, MODIFY COLUMN `meta_dbport` text NULL,
MODIFY COLUMN `meta_dbname` text NULL; MODIFY COLUMN `meta_dbname` text NULL;
ALTER TABLE `tmetaconsole_setup` ADD COLUMN `server_uid` TEXT NOT NULL default '';
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tprofile_view` -- Table `tprofile_view`
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------

View File

@ -2579,7 +2579,7 @@ CREATE TABLE IF NOT EXISTS `ttrap_custom_values` (
-- Table `tmetaconsole_setup` -- Table `tmetaconsole_setup`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` ( CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` (
`id` int(10) NOT NULL auto_increment primary key, `id` int(10) NOT NULL auto_increment,
`server_name` text, `server_name` text,
`server_url` text, `server_url` text,
`dbuser` text, `dbuser` text,
@ -2596,7 +2596,9 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` (
`id_group` int(10) unsigned NOT NULL default 0, `id_group` int(10) unsigned NOT NULL default 0,
`api_password` text NOT NULL, `api_password` text NOT NULL,
`disabled` tinyint(1) unsigned NOT NULL default '0', `disabled` tinyint(1) unsigned NOT NULL default '0',
`last_event_replication` bigint(20) default '0' `last_event_replication` bigint(20) default '0',
`server_uid` text NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB ) ENGINE=InnoDB
COMMENT = 'Table to store metaconsole sources' COMMENT = 'Table to store metaconsole sources'
DEFAULT CHARSET=utf8; DEFAULT CHARSET=utf8;

View File

@ -141,7 +141,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('cr_incident_content', ''), ('cr_incident_content', ''),
('sample_agent', '0'), ('sample_agent', '0'),
('gotty', '/usr/bin/gotty'), ('gotty', '/usr/bin/gotty'),
('custom_module_units', '{"bytes":"bytes","entries":"entries","files":"files","hits":"hits","sessions":"sessions","users":"users","ºC":"ºC","ºF":"ºF"}'); ('custom_module_units', '{"bytes":"bytes","entries":"entries","files":"files","hits":"hits","sessions":"sessions","users":"users","ºC":"ºC","ºF":"ºF"}'),
('server_unique_identifier', replace(uuid(),'-',''));
UNLOCK TABLES; UNLOCK TABLES;
-- --