summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/safesetid/Makefile
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2019-12-05 21:21:07 +0900
committerShuah Khan <skhan@linuxfoundation.org>2019-12-09 10:53:04 -0700
commit295c4e21cf27ac9af542140e3e797df9e0cf7b5f (patch)
tree8d2ab08d4376e7bf2c0eb49c061947f8177d1000 /tools/testing/selftests/safesetid/Makefile
parentbe12252212fa3dfed6e75112865095c484c0ce87 (diff)
selftests: safesetid: Check the return value of setuid/setgid
Check the return value of setuid() and setgid(). This fixes the following warnings and improves test result. safesetid-test.c: In function ‘main’: safesetid-test.c:294:2: warning: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Wunused-result] setuid(NO_POLICY_USER); ^~~~~~~~~~~~~~~~~~~~~~ safesetid-test.c:295:2: warning: ignoring return value of ‘setgid’, declared with attribute warn_unused_result [-Wunused-result] setgid(NO_POLICY_USER); ^~~~~~~~~~~~~~~~~~~~~~ safesetid-test.c:309:2: warning: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Wunused-result] setuid(RESTRICTED_PARENT); ^~~~~~~~~~~~~~~~~~~~~~~~~ safesetid-test.c:310:2: warning: ignoring return value of ‘setgid’, declared with attribute warn_unused_result [-Wunused-result] setgid(RESTRICTED_PARENT); ^~~~~~~~~~~~~~~~~~~~~~~~~ safesetid-test.c: In function ‘test_setuid’: safesetid-test.c:216:3: warning: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Wunused-result] setuid(child_uid); ^~~~~~~~~~~~~~~~~ Fixes: c67e8ec03f3f ("LSM: SafeSetID: add selftest") Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/safesetid/Makefile')
0 files changed, 0 insertions, 0 deletions