]> git.ipfire.org Git - thirdparty/lxc.git/commit
seccomp: fix 32-bit rules
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 20 Jun 2014 19:58:41 +0000 (14:58 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 20 Jun 2014 20:33:59 +0000 (16:33 -0400)
commitcd75548b25f39b4ee36dc20e70c8e1b379a287f8
tree207f483226afb46ba7cf9adf5507441a0ce76f66
parentd58c6ad0a6f357d1f17536465c92d33647f77706
seccomp: fix 32-bit rules

When calling seccomp_rule_add(), you must pass the native syscall number
even if the context is a 32-bit context.  So use resolve_name rather
than resolve_name_arch.

Enhance the check of /proc/self/status for Seccomp: so that we do not
enable seccomp policies if seccomp is not built into the kernel.  This
is needed before we can enable by-default seccomp policies (which we
want to do next)

Fix wrong return value check from seccomp_arch_exist, and remove
needless abstraction in arch handling.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/seccomp.c