1 | CREATE DATABASE samhain;
|
---|
2 | USE mysql;
|
---|
3 | INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES ('localhost','samhain','','N','Y','N','N','N','N');
|
---|
4 | USE samhain;
|
---|
5 | CREATE TABLE samhain.log (
|
---|
6 | log_index BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
---|
7 | log_ref BIGINT UNSIGNED NULL,
|
---|
8 | log_host VARCHAR(64) NOT NULL DEFAULT "localhost",
|
---|
9 | INDEX ix_log_host (log_host),
|
---|
10 | log_time DATETIME NOT NULL,
|
---|
11 | log_sev ENUM("DEBG","INFO","NOTE","WARN","MARK","ERRO","CRIT","ALRT","RCVT") NOT NULL,
|
---|
12 | log_msg BLOB,
|
---|
13 |
|
---|
14 | log_hash VARCHAR(32) NOT NULL,
|
---|
15 | KEY ix_hash (log_hash),
|
---|
16 |
|
---|
17 | entry_status VARCHAR(16) NOT NULL DEFAULT "NEW",
|
---|
18 | INDEX ix_entry_status (entry_status),
|
---|
19 |
|
---|
20 | path BLOB,
|
---|
21 | userid VARCHAR(8),
|
---|
22 | grp VARCHAR(8),
|
---|
23 | program VARCHAR(8),
|
---|
24 | subroutine VARCHAR(16),
|
---|
25 | status VARCHAR(12),
|
---|
26 | hash VARCHAR(50),
|
---|
27 | path_data BLOB,
|
---|
28 | hash_data VARCHAR(50),
|
---|
29 | key_uid VARCHAR(64),
|
---|
30 | key_uid_data VARCHAR(64),
|
---|
31 | key_id VARCHAR(16),
|
---|
32 | module VARCHAR(8),
|
---|
33 | return_code INTEGER,
|
---|
34 | syscall VARCHAR(16),
|
---|
35 | ip VARCHAR(46),
|
---|
36 | tty VARCHAR(16),
|
---|
37 | peer VARCHAR(64),
|
---|
38 | fromhost VARCHAR(64),
|
---|
39 | obj BLOB,
|
---|
40 | interface VARCHAR(64),
|
---|
41 | time VARCHAR(64),
|
---|
42 | dir BLOB,
|
---|
43 | linked_path BLOB,
|
---|
44 | port INTEGER,
|
---|
45 | service VARCHAR(64),
|
---|
46 | facility VARCHAR(32),
|
---|
47 | priority VARCHAR(32),
|
---|
48 | syslog_msg BLOB,
|
---|
49 |
|
---|
50 | mode_old VARCHAR(16),
|
---|
51 | mode_new VARCHAR(16),
|
---|
52 | attr_old VARCHAR(16),
|
---|
53 | attr_new VARCHAR(16),
|
---|
54 |
|
---|
55 | device_old VARCHAR(16),
|
---|
56 | device_new VARCHAR(16),
|
---|
57 | owner_old VARCHAR(9),
|
---|
58 | owner_new VARCHAR(9),
|
---|
59 | group_old VARCHAR(9),
|
---|
60 | group_new VARCHAR(9),
|
---|
61 | ctime_old DATETIME,
|
---|
62 | ctime_new DATETIME,
|
---|
63 | atime_old DATETIME,
|
---|
64 | atime_new DATETIME,
|
---|
65 | mtime_old DATETIME,
|
---|
66 | mtime_new DATETIME,
|
---|
67 | chksum_old VARCHAR(50),
|
---|
68 | chksum_new VARCHAR(50),
|
---|
69 | link_old BLOB,
|
---|
70 | link_new BLOB,
|
---|
71 |
|
---|
72 | size_old BIGINT UNSIGNED,
|
---|
73 | size_new BIGINT UNSIGNED,
|
---|
74 | hardlinks_old BIGINT UNSIGNED,
|
---|
75 | hardlinks_new BIGINT UNSIGNED,
|
---|
76 | inode_old BIGINT UNSIGNED,
|
---|
77 | inode_new BIGINT UNSIGNED,
|
---|
78 |
|
---|
79 | imode_old BIGINT UNSIGNED,
|
---|
80 | imode_new BIGINT UNSIGNED,
|
---|
81 | iattr_old BIGINT UNSIGNED,
|
---|
82 | iattr_new BIGINT UNSIGNED,
|
---|
83 | idevice_old BIGINT UNSIGNED,
|
---|
84 | idevice_new BIGINT UNSIGNED,
|
---|
85 | iowner_old BIGINT UNSIGNED,
|
---|
86 | iowner_new BIGINT UNSIGNED,
|
---|
87 | igroup_old BIGINT UNSIGNED,
|
---|
88 | igroup_new BIGINT UNSIGNED,
|
---|
89 |
|
---|
90 |
|
---|
91 | acl_old BLOB,
|
---|
92 | acl_new BLOB
|
---|
93 |
|
---|
94 | );
|
---|
95 |
|
---|