Skip to content

Commit

Permalink
selftests/capabilities: Add tests for capability evolution
Browse files Browse the repository at this point in the history
This test focuses on ambient capabilities.  It requires either root or
the ability to create user namespaces.  Some of the test cases will be
skipped for nonroot users.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Christoph Lameter <cl@linux.com> # Original author
Cc: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
amluto authored and torvalds committed Sep 4, 2015
1 parent 5831905 commit 32ae976
Show file tree
Hide file tree
Showing 4 changed files with 520 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/testing/selftests/capabilities/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test_execve
validate_cap
18 changes: 18 additions & 0 deletions tools/testing/selftests/capabilities/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
all:

include ../lib.mk

.PHONY: all clean

TARGETS := validate_cap test_execve
TEST_PROGS := test_execve

CFLAGS := -O2 -g -std=gnu99 -Wall -lcap-ng

all: $(TARGETS)

clean:
$(RM) $(TARGETS)

$(TARGETS): %: %.c
$(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
Loading

0 comments on commit 32ae976

Please sign in to comment.