Added measurement and metadata columns to files table

Added "/etc/tnc_config" file record for metadata request
Modified files table entries with measurement flag set
This commit is contained in:
Sansar Choinyambuu 2011-10-19 09:17:29 +02:00 committed by Andreas Steffen
parent a8be826be4
commit df918eca8d
2 changed files with 88 additions and 43 deletions

View File

@ -39,129 +39,135 @@ INSERT INTO products (
/* Files */
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, '/lib/i386-linux-gnu/libdl.so.2'
0, '/lib/i386-linux-gnu/libdl.so.2', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, '/lib/x86_64-linux-gnu/libdl.so.2'
0, '/lib/x86_64-linux-gnu/libdl.so.2', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, '/lib/libdl.so.2'
0, '/lib/libdl.so.2', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, '/sbin/iptables'
0, '/sbin/iptables', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, '/lib/libxtables.so.5'
0, '/lib/libxtables.so.5', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, '/lib/libxtables.so.2'
0, '/lib/libxtables.so.2', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
1, '/lib/xtables/'
1, '/lib/xtables/', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libxt_udp.so'
0, 'libxt_udp.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libxt_tcp.so'
0, 'libxt_tcp.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libxt_esp.so'
0, 'libxt_esp.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libxt_policy.so'
0, 'libxt_policy.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libxt_conntrack.so'
0, 'libxt_conntrack.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libipt_SNAT.so'
0, 'libipt_SNAT.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libipt_DNAT.so'
0, 'libipt_DNAT.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libipt_MASQUERADE.so'
0, 'libipt_MASQUERADE.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libipt_LOG.so'
0, 'libipt_LOG.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, '/sbin/ip6tables'
0, '/sbin/ip6tables', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libip6t_LOG.so'
0, 'libip6t_LOG.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libxt_mark.so'
0, 'libxt_mark.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
0, 'libxt_MARK.so'
0, 'libxt_MARK.so', 1
);
INSERT INTO files (
type, path
type, path, measurement
) VALUES (
1, '/lib/iptables'
1, '/lib/iptables', 1
);
INSERT INTO files (
type, path, metadata
) VALUES (
0, '/etc/tnc_config', 1
);
/* Product-File */
@ -196,6 +202,12 @@ INSERT INTO product_file (
1, 17
);
INSERT INTO product_file (
product, file
) VALUES (
1, 22
);
INSERT INTO product_file (
product, file
) VALUES (
@ -220,6 +232,12 @@ INSERT INTO product_file (
2, 7
);
INSERT INTO product_file (
product, file
) VALUES (
2, 22
);
INSERT INTO product_file (
product, file
) VALUES (
@ -232,6 +250,12 @@ INSERT INTO product_file (
3, 4
);
INSERT INTO product_file (
product, file
) VALUES (
3, 22
);
INSERT INTO product_file (
product, file
) VALUES (
@ -256,6 +280,13 @@ INSERT INTO product_file (
4, 7
);
INSERT INTO product_file (
product, file
) VALUES (
4, 22
);
INSERT INTO product_file (
product, file
) VALUES (
@ -280,6 +311,12 @@ INSERT INTO product_file (
5, 7
);
INSERT INTO product_file (
product, file
) VALUES (
5, 22
);
INSERT INTO product_file (
product, file
) VALUES (
@ -304,6 +341,12 @@ INSERT INTO product_file (
6, 21
);
INSERT INTO product_file (
product, file
) VALUES (
6, 22
);
/* File Hashes */
INSERT INTO file_hashes (

View File

@ -4,7 +4,9 @@ DROP TABLE IF EXISTS files;
CREATE TABLE files (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
type INTEGER NOT NULL,
path TEXT NOT NULL
path TEXT NOT NULL,
measurement INTEGER DEFAULT 0,
metadata INTEGER DEFAULT 0
);
DROP TABLE IF EXISTS products;