public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] Fix mlockall tests unprivileged execution
@ 2015-10-25 12:16 Nicolas Joly
  2015-10-26 14:33 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Joly @ 2015-10-25 12:16 UTC (permalink / raw)
  To: ltp


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.

-- 
Nicolas Joly

Cluster & Computing Group
Biology IT Center
Institut Pasteur, Paris.
-------------- next part --------------
commit dd780251d77b41bea12de4948b8900badcf7aa3f
Author: Nicolas Joly <njoly@pasteur.fr>
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 <njoly@pasteur.fr>

diff --git a/testcases/kernel/syscalls/mlockall/mlockall02.c b/testcases/kernel/syscalls/mlockall/mlockall02.c
index db2516c..f1ec962 100644
--- a/testcases/kernel/syscalls/mlockall/mlockall02.c
+++ b/testcases/kernel/syscalls/mlockall/mlockall02.c
@@ -164,6 +164,8 @@ int main(int ac, char **av)
 void setup(void)
 {
 
+	tst_require_root();
+
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	TEST_PAUSE;
diff --git a/testcases/kernel/syscalls/mlockall/mlockall03.c b/testcases/kernel/syscalls/mlockall/mlockall03.c
index 29997c0..5bdbdd0 100644
--- a/testcases/kernel/syscalls/mlockall/mlockall03.c
+++ b/testcases/kernel/syscalls/mlockall/mlockall03.c
@@ -183,6 +183,8 @@ int main(int ac, char **av)
 void setup(void)
 {
 
+	tst_require_root();
+
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	TEST_PAUSE;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [LTP] [PATCH] Fix mlockall tests unprivileged execution
  2015-10-25 12:16 [LTP] [PATCH] Fix mlockall tests unprivileged execution Nicolas Joly
@ 2015-10-26 14:33 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2015-10-26 14:33 UTC (permalink / raw)
  To: ltp

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.

Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-26 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-25 12:16 [LTP] [PATCH] Fix mlockall tests unprivileged execution Nicolas Joly
2015-10-26 14:33 ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox