summaryrefslogtreecommitdiff
path: root/src/libimcv/imv
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2018-06-04 09:59:21 +0200
committerYves-Alexis Perez <corsac@debian.org>2018-06-04 09:59:21 +0200
commit9207a0837c19c2f1bf9486d1621438693841039f (patch)
treec5b31310d6d5b8db2904a3309c5c4ee81e7584f2 /src/libimcv/imv
parent3456101fa5dfd78d8b74c005b8dad281bb045398 (diff)
parent51a71ee15c1bcf0e82f363a16898f571e211f9c3 (diff)
downloadvyos-strongswan-9207a0837c19c2f1bf9486d1621438693841039f.tar.gz
vyos-strongswan-9207a0837c19c2f1bf9486d1621438693841039f.zip
Update upstream source from tag 'upstream/5.6.3'
Update to upstream version '5.6.3' with Debian dir d2b13199c1ca302286cbf83878342276cb01d710
Diffstat (limited to 'src/libimcv/imv')
-rw-r--r--src/libimcv/imv/data.sql24
-rw-r--r--src/libimcv/imv/imv_database.c5
-rw-r--r--src/libimcv/imv/imv_policy_manager.c2
-rw-r--r--src/libimcv/imv/tables-mysql.sql4
-rw-r--r--src/libimcv/imv/tables.sql3
5 files changed, 33 insertions, 5 deletions
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 */
@@ -1105,6 +1117,12 @@ INSERT INTO groups_product_defaults (
INSERT INTO groups_product_defaults (
group_id, product_id
) VALUES (
+ 4, 92
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
5, 2
);
@@ -1213,6 +1231,12 @@ INSERT INTO groups_product_defaults (
INSERT INTO groups_product_defaults (
group_id, product_id
) VALUES (
+ 5, 93
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
6, 9
);
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 (