[LTP] [PATCH 2/3] socketcall: TCONF instead of TFAIL when user is not root

Dejan Jovicevic dejan.jovicevic@rt-rk.com
Wed Nov 2 12:57:03 CET 2016


sockatcall01 uses certain protocols that require super user
privileges.

Signed-off-by: Dejan Jovicevic <dejan.jovicevic@rt-rk.com>
---
 testcases/kernel/syscalls/socketcall/socketcall01.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/syscalls/socketcall/socketcall01.c b/testcases/kernel/syscalls/socketcall/socketcall01.c
index d439729..b576bd8 100644
--- a/testcases/kernel/syscalls/socketcall/socketcall01.c
+++ b/testcases/kernel/syscalls/socketcall/socketcall01.c
@@ -142,6 +142,7 @@ int main(int ac, char **av)
 /* setup() - performs all ONE TIME setup for this test. */
 void setup(void)
 {
+	tst_require_root();
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
-- 
1.9.1



More information about the ltp mailing list