selftests: set NO_NEW_PRIVS bit in seccomp user tests

seccomp() doesn't allow users who aren't root in their userns to attach
filters unless they have the nnp bit set, so let's set it so that these
tests can pass when run as an unprivileged user.

This idea stolen from the other seccomp tests, which use this trick :)

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <shuah@kernel.org>
This commit is contained in:
Tycho Andersen 2019-01-18 17:12:16 -07:00 • committed by Shuah Khan
commit c7140706cb