mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 08:34:40 +01:00
Add unique constrain to sqlite db (fixes #70)
This commit is contained in:
parent
4250c6d337
commit
eac2a11bc4
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ class RulesDB:
|
|||
with self._lock:
|
||||
conn = self._get_conn()
|
||||
c = conn.cursor()
|
||||
c.execute("CREATE TABLE IF NOT EXISTS rules (app_path TEXT, verdict INTEGER, address TEXT, port INTEGER, proto TEXT)") # noqa
|
||||
c.execute("CREATE TABLE IF NOT EXISTS rules (app_path TEXT, verdict INTEGER, address TEXT, port INTEGER, proto TEXT, UNIQUE (app_path, verdict, address, port, proto))") # noqa
|
||||
|
||||
def load_rules(self):
|
||||
with self._lock:
|
||||
|
|
Loading…
Add table
Reference in a new issue