summaryrefslogtreecommitdiff
path: root/src/libimcv/imv
diff options
context:
space:
mode:
Diffstat (limited to 'src/libimcv/imv')
-rw-r--r--src/libimcv/imv/data.sql92
-rw-r--r--src/libimcv/imv/imv_agent.c4
-rw-r--r--src/libimcv/imv/tables.sql16
3 files changed, 101 insertions, 11 deletions
diff --git a/src/libimcv/imv/data.sql b/src/libimcv/imv/data.sql
index a872499d2..40a0f5eeb 100644
--- a/src/libimcv/imv/data.sql
+++ b/src/libimcv/imv/data.sql
@@ -484,30 +484,66 @@ INSERT INTO products ( /* 81 */
'Android 6.0.1'
);
-INSERT INTO products ( /* 82 */
+INSERT INTO products ( /* 82 */
name
) VALUES (
'Debian 8.5 i686'
);
-INSERT INTO products ( /* 83 */
+INSERT INTO products ( /* 83 */
name
) VALUES (
'Debian 8.5 x86_64'
);
-INSERT INTO products ( /* 84 */
+INSERT INTO products ( /* 84 */
name
) VALUES (
'Debian 8.6 i686'
);
-INSERT INTO products ( /* 85 */
+INSERT INTO products ( /* 85 */
name
) VALUES (
'Debian 8.6 x86_64'
);
+INSERT INTO products ( /* 86 */
+ name
+) VALUES (
+ 'Debian 8.7 i686'
+);
+
+INSERT INTO products ( /* 87 */
+ name
+) VALUES (
+ 'Debian 8.7 x86_64'
+);
+
+INSERT INTO products ( /* 88 */
+ name
+) VALUES (
+ 'Debian 8.8 i686'
+);
+
+INSERT INTO products ( /* 89 */
+ name
+) VALUES (
+ 'Debian 8.8 x86_64'
+);
+
+INSERT INTO products ( /* 90 */
+ name
+) VALUES (
+ 'Debian 8.9 i686'
+);
+
+INSERT INTO products ( /* 91 */
+ name
+) VALUES (
+ 'Debian 8.9 x86_64'
+);
+
/* Directories */
INSERT INTO directories ( /* 1 */
@@ -1039,6 +1075,36 @@ INSERT INTO groups_product_defaults (
INSERT INTO groups_product_defaults (
group_id, product_id
) VALUES (
+ 4, 82
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
+ 4, 84
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
+ 4, 86
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
+ 4, 88
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
+ 4, 90
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
5, 2
);
@@ -1129,6 +1195,24 @@ INSERT INTO groups_product_defaults (
INSERT INTO groups_product_defaults (
group_id, product_id
) VALUES (
+ 5, 87
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
+ 5, 89
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
+ 5, 91
+);
+
+INSERT INTO groups_product_defaults (
+ group_id, product_id
+) VALUES (
6, 9
);
diff --git a/src/libimcv/imv/imv_agent.c b/src/libimcv/imv/imv_agent.c
index e96faa77e..bb0b3b75b 100644
--- a/src/libimcv/imv/imv_agent.c
+++ b/src/libimcv/imv/imv_agent.c
@@ -685,9 +685,9 @@ METHOD(imv_agent_t, create_language_enumerator, enumerator_t*,
);
if (!this->get_attribute ||
- !this->get_attribute(this->id, state->get_connection_id(state),
+ this->get_attribute(this->id, state->get_connection_id(state),
TNC_ATTRIBUTEID_PREFERRED_LANGUAGE, BUF_LEN,
- e->lang_buf, &e->lang_len) == TNC_RESULT_SUCCESS ||
+ e->lang_buf, &e->lang_len) != TNC_RESULT_SUCCESS ||
e->lang_len >= BUF_LEN)
{
e->lang_len = 0;
diff --git a/src/libimcv/imv/tables.sql b/src/libimcv/imv/tables.sql
index 8bde8898f..b50c6ed12 100644
--- a/src/libimcv/imv/tables.sql
+++ b/src/libimcv/imv/tables.sql
@@ -253,24 +253,30 @@ CREATE INDEX "swid_entityroles_entity_id" ON "swid_entityroles" (
DROP TABLE IF EXISTS "swid_tags";
CREATE TABLE "swid_tags" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+ "version_id" INTEGER REFERENCES "versions" ("id"),
"package_name" VARCHAR(255) NOT NULL,
- "version" VARCHAR(255) NOT NULL,
+ "version_str" VARCHAR(255) NOT NULL,
"unique_id" VARCHAR(255) NOT NULL,
"swid_xml" TEXT NOT NULL,
"software_id" VARCHAR(255) NOT NULL
);
+DROP INDEX IF EXISTS "swid_tags_software_id";
DROP INDEX if EXISTS "swid_tags_unique_id";
+DROP INDEX IF EXISTS "swid_tags_version";
DROP INDEX IF EXISTS "swid_tags_package_name";
-DROP INDEX IF EXISTS "swid_tags_software_id";
+
+CREATE INDEX "swid_tags_software_id" ON "swid_tags" (
+ "software_id"
+);
CREATE INDEX "swid_tags_unique_id" ON "swid_tags" (
"unique_id"
);
+CREATE INDEX "swid_tags_version_id" ON "swid_tags" (
+ "version_id"
+);
CREATE INDEX "swid_tags_package_name" ON "swid_tags" (
"package_name"
);
-CREATE INDEX "swid_tags_software_id" ON "swid_tags" (
- "software_id"
-);
DROP TABLE IF EXISTS "swid_tags_files";
CREATE TABLE "swid_tags_files" (