From 51a71ee15c1bcf0e82f363a16898f571e211f9c3 Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Mon, 4 Jun 2018 09:59:21 +0200 Subject: New upstream version 5.6.3 --- src/libimcv/imv/data.sql | 24 ++++++++++++++++++++++++ src/libimcv/imv/imv_database.c | 5 +++-- src/libimcv/imv/imv_policy_manager.c | 2 +- src/libimcv/imv/tables-mysql.sql | 4 +++- src/libimcv/imv/tables.sql | 3 ++- 5 files changed, 33 insertions(+), 5 deletions(-) (limited to 'src/libimcv/imv') diff --git a/src/libimcv/imv/data.sql b/src/libimcv/imv/data.sql index 40a0f5eeb..860573c31 100644 --- a/src/libimcv/imv/data.sql +++ b/src/libimcv/imv/data.sql @@ -544,6 +544,18 @@ INSERT INTO products ( /* 91 */ 'Debian 8.9 x86_64' ); +INSERT INTO products ( /* 92 */ + name +) VALUES ( + 'Debian 8.10 i686' +); + +INSERT INTO products ( /* 93 */ + name +) VALUES ( + 'Debian 8.10 x86_64' +); + /* Directories */ INSERT INTO directories ( /* 1 */ @@ -1102,6 +1114,12 @@ INSERT INTO groups_product_defaults ( 4, 90 ); +INSERT INTO groups_product_defaults ( + group_id, product_id +) VALUES ( + 4, 92 +); + INSERT INTO groups_product_defaults ( group_id, product_id ) VALUES ( @@ -1210,6 +1228,12 @@ INSERT INTO groups_product_defaults ( 5, 91 ); +INSERT INTO groups_product_defaults ( + group_id, product_id +) VALUES ( + 5, 93 +); + INSERT INTO groups_product_defaults ( group_id, product_id ) VALUES ( diff --git a/src/libimcv/imv/imv_database.c b/src/libimcv/imv/imv_database.c index 0a18cd71b..b444abdbb 100644 --- a/src/libimcv/imv/imv_database.c +++ b/src/libimcv/imv/imv_database.c @@ -130,8 +130,9 @@ static bool create_session(private_imv_database_t *this, imv_session_t *session) if (!did) { this->db->execute(this->db, &did, - "INSERT INTO devices (value, product) VALUES (?, ?)", - DB_TEXT, device, DB_INT, pid); + "INSERT INTO devices " + "(value, description, product, trusted, inactive) " + "VALUES (?, '', ?, 0, 0)", DB_TEXT, device, DB_INT, pid); } free(device); diff --git a/src/libimcv/imv/imv_policy_manager.c b/src/libimcv/imv/imv_policy_manager.c index 1988873e9..a0e8595ed 100644 --- a/src/libimcv/imv/imv_policy_manager.c +++ b/src/libimcv/imv/imv_policy_manager.c @@ -113,7 +113,7 @@ static bool iterate_enforcements(database_t *db, int device_id, int session_id, if (latest_success) { /*skipping enforcement */ - printf("skipping enforcment %d\n", id); + printf("skipping enforcement %d\n", id); continue; } diff --git a/src/libimcv/imv/tables-mysql.sql b/src/libimcv/imv/tables-mysql.sql index cf50742c3..3e23950a3 100644 --- a/src/libimcv/imv/tables-mysql.sql +++ b/src/libimcv/imv/tables-mysql.sql @@ -182,7 +182,9 @@ CREATE TABLE `devices` ( `description` VARCHAR(100) DEFAULT "", `value` VARCHAR(256) NOT NULL, `product` INTEGER REFERENCES `products`(`id`), - `created` INTEGER + `trusted` INTEGER DEFAULT 0, + `created` INTEGER, + `inactive` INTEGER DEFAULT 0 ); DROP TABLE IF EXISTS `identities`; diff --git a/src/libimcv/imv/tables.sql b/src/libimcv/imv/tables.sql index b50c6ed12..631969ce7 100644 --- a/src/libimcv/imv/tables.sql +++ b/src/libimcv/imv/tables.sql @@ -204,7 +204,8 @@ CREATE TABLE devices ( value TEXT NOT NULL, product INTEGER REFERENCES products(id), trusted INTEGER DEFAULT 0, - created INTEGER + created INTEGER, + inactive INTEGER DEFAULT 0 ); DROP INDEX IF EXISTS devices_id; CREATE INDEX devices_value ON devices ( -- cgit v1.2.3