LSM: SafeSetID: add selftest
authorMicah Morton <mortonm@chromium.org>
Wed, 6 Feb 2019 19:03:09 +0000 (11:03 -0800)
committerJames Morris <james.morris@microsoft.com>
Tue, 12 Feb 2019 18:58:51 +0000 (10:58 -0800)
commitc67e8ec03f3fd41c0b75f5596eee92460f4957c0
tree40c20da64f01ebd02f38aeb8e9115800f37b8b7a
parent2181e084b26bddca22bc3f23364c15809cfed28b
LSM: SafeSetID: add selftest

This patch adds a selftest for the SafeSetID LSM. The test requires
mounting securityfs if it isn't mounted, creating test users in
/etc/passwd, and configuring policies for the SafeSetID LSM through
writes to securityfs.

Signed-off-by: Micah Morton <mortonm@chromium.org>
Signed-off-by: James Morris <james.morris@microsoft.com>
tools/testing/selftests/safesetid/.gitignore [new file with mode: 0644]
tools/testing/selftests/safesetid/Makefile [new file with mode: 0644]
tools/testing/selftests/safesetid/config [new file with mode: 0644]
tools/testing/selftests/safesetid/safesetid-test.c [new file with mode: 0644]
tools/testing/selftests/safesetid/safesetid-test.sh [new file with mode: 0755]