]> git.proxmox.com Git - mirror_libseccomp.git/commitdiff
python: update the python bindings to match the C version
authorPaul Moore <paul@paul-moore.com>
Mon, 22 Feb 2016 21:55:48 +0000 (16:55 -0500)
committerPaul Moore <paul@paul-moore.com>
Mon, 22 Feb 2016 21:55:48 +0000 (16:55 -0500)
Signed-off-by: Paul Moore <paul@paul-moore.com>
src/python/libseccomp.pxd
src/python/seccomp.pyx

index b74e8b78f45169aa5b0b03eca437e6a61d097abb..15c94f8ea124e64c7d53467f67c5a57459e40114 100644 (file)
@@ -23,6 +23,11 @@ from libc.stdint cimport uint8_t, uint32_t, uint64_t
 
 cdef extern from "seccomp.h":
 
+    cdef struct scmp_version:
+        unsigned int major
+        unsigned int minor
+        unsigned int micro
+
     ctypedef void* scmp_filter_ctx
 
     cdef enum:
@@ -48,6 +53,7 @@ cdef extern from "seccomp.h":
         SCMP_FLTATR_ACT_DEFAULT
         SCMP_FLTATR_ACT_BADARCH
         SCMP_FLTATR_CTL_NNP
+        SCMP_FLTATR_CTL_TSYNC
 
     cdef enum scmp_compare:
         SCMP_CMP_NE
@@ -73,6 +79,8 @@ cdef extern from "seccomp.h":
         scmp_datum_t datum_a
         scmp_datum_t datum_b
 
+    scmp_version *seccomp_version()
+
     scmp_filter_ctx seccomp_init(uint32_t def_action)
     int seccomp_reset(scmp_filter_ctx ctx, uint32_t def_action)
     void seccomp_release(scmp_filter_ctx ctx)
@@ -101,9 +109,16 @@ cdef extern from "seccomp.h":
 
     int seccomp_rule_add(scmp_filter_ctx ctx, uint32_t action,
                          int syscall, unsigned int arg_cnt, ...)
-
+    int seccomp_rule_add_array(scmp_filter_ctx ctx,
+                               uint32_t action, int syscall,
+                               unsigned int arg_cnt,
+                               scmp_arg_cmp *arg_array)
     int seccomp_rule_add_exact(scmp_filter_ctx ctx, uint32_t action,
                                int syscall, unsigned int arg_cnt, ...)
+    int seccomp_rule_add_exact_array(scmp_filter_ctx ctx,
+                                     uint32_t action, int syscall,
+                                     unsigned int arg_cnt,
+                                     scmp_arg_cmp *arg_array)
 
     int seccomp_export_pfc(scmp_filter_ctx ctx, int fd)
     int seccomp_export_bpf(scmp_filter_ctx ctx, int fd)
index 1724dd6c64355fd7df69df28954e8dc55d965348..c87bc3f495f3183068609196aa397241d1197455 100644 (file)
@@ -240,10 +240,12 @@ cdef class Attr:
     ACT_DEFAULT - the filter's default action
     ACT_BADARCH - the filter's bad architecture action
     CTL_NNP - the filter's "no new privileges" flag
+    CTL_NNP - the filter's thread sync flag
     """
     ACT_DEFAULT = libseccomp.SCMP_FLTATR_ACT_DEFAULT
     ACT_BADARCH = libseccomp.SCMP_FLTATR_ACT_BADARCH
     CTL_NNP = libseccomp.SCMP_FLTATR_CTL_NNP
+    CTL_TSYNC = libseccomp.SCMP_FLTATR_CTL_TSYNC
 
 cdef class Arg:
     """ Python object representing a SyscallFilter syscall argument.