Skip to contentSkip to conversation

Fix mlockall tests unprivileged execution

PATCH New Nicolas Joly 2 participants 2 messages Oct 25, 2015 – Oct 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix mlockall tests unprivileged execution

Hi,

Please find a small patch that fix mlockall(2) testcases when run as an unprivileged user ... It adds some missing tst_require_root() needed for later seteuid() calls.

Thanks.

Signature · 15 lines
Nicolas Joly

Cluster & Computing Group
Biology IT Center
Institut Pasteur, Paris.
-------------- next part --------------
commit dd780251d77b41bea12de4948b8900badcf7aa3f
Author: Nicolas Joly <[email protected]>
Date:   Sun Oct 25 13:08:00 2015 +0100

    mlockall/mlockall0[23]: Fix unprivileged behaviour
    
    Add missing tst_require_root() needed for seteuid().
    
    Signed-off-by: Nicolas Joly <[email protected]>
testcases/kernel/syscalls/mlockall/mlockall02.c +2 -0
index db2516c..f1ec962 100644
@@ -164,6 +164,8 @@ int main(int ac, char **av)
 void setup(void)
 {
 
+	tst_require_root();
+
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	TEST_PAUSE;
testcases/kernel/syscalls/mlockall/mlockall03.c +2 -0
index 29997c0..5bdbdd0 100644
@@ -183,6 +183,8 @@ int main(int ac, char **av)
 void setup(void)
 {
 
+	tst_require_root();
+
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	TEST_PAUSE;
#1 lore raw

PATCH 1/1 Fix mlockall tests unprivileged execution

Hi!

Quoted 3 lines

Please find a small patch that fix mlockall(2) testcases when run as an unprivileged user ... It adds some missing tst_require_root() needed for later seteuid() calls.

Pushed, thanks.

Signature · 2 lines
Cyril Hrubis
[email protected]