summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@canonical.com>2017-10-18 06:16:52 +0000
committerPaul Moore <paul@paul-moore.com>2017-11-01 12:48:14 -0400
commitd0e11951f6484db5d8e98591ddc0c0157b333d85 (patch)
tree0402519270e14ee916dfa31503505bc49037bdd7 /src/python
parent8a8576c9e0cf463d2d624686a4e57058ae30e91a (diff)
downloadlibseccomp-d0e11951f6484db5d8e98591ddc0c0157b333d85.tar.gz
all: add support for new log filter flag
Extend libseccomp to support SECCOMP_FILTER_FLAG_LOG, which is intended to cause log events for all actions taken by a filter except for SCMP_ACT_ALLOW actions. This is done via a new filter attribute called SCMP_FLTATR_CTL_LOG that is off by default. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'src/python')
-rw-r--r--src/python/libseccomp.pxd1
-rw-r--r--src/python/seccomp.pyx1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/python/libseccomp.pxd b/src/python/libseccomp.pxd
index b851d25..4cc83fd 100644
--- a/src/python/libseccomp.pxd
+++ b/src/python/libseccomp.pxd
@@ -57,6 +57,7 @@ cdef extern from "seccomp.h":
SCMP_FLTATR_CTL_NNP
SCMP_FLTATR_CTL_TSYNC
SCMP_FLTATR_API_TSKIP
+ SCMP_FLTATR_CTL_LOG
cdef enum scmp_compare:
SCMP_CMP_NE
diff --git a/src/python/seccomp.pyx b/src/python/seccomp.pyx
index 27e374f..dbf0e0a 100644
--- a/src/python/seccomp.pyx
+++ b/src/python/seccomp.pyx
@@ -303,6 +303,7 @@ cdef class Attr:
CTL_NNP = libseccomp.SCMP_FLTATR_CTL_NNP
CTL_TSYNC = libseccomp.SCMP_FLTATR_CTL_TSYNC
API_TSKIP = libseccomp.SCMP_FLTATR_API_TSKIP
+ CTL_LOG = libseccomp.SCMP_FLTATR_CTL_LOG
cdef class Arg:
""" Python object representing a SyscallFilter syscall argument.