Date: Tue, 9 Apr 2013 08:30:27 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r249300 - user/pho/stress2/testcases/syscall Message-ID: <201304090830.r398URWN025605@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Tue Apr 9 08:30:27 2013 New Revision: 249300 URL: http://svnweb.freebsd.org/changeset/base/249300 Log: Make sure that this test is not run as root. Modified: user/pho/stress2/testcases/syscall/syscall.c Modified: user/pho/stress2/testcases/syscall/syscall.c ============================================================================== --- user/pho/stress2/testcases/syscall/syscall.c Tue Apr 9 08:29:27 2013 (r249299) +++ user/pho/stress2/testcases/syscall/syscall.c Tue Apr 9 08:30:27 2013 (r249300) @@ -70,6 +70,8 @@ setup(int nb __unused) int i; struct rlimit rl; + if (geteuid() == 0) + _exit(1); /* Do not run as root */ umask(0); sprintf(path,"%s.%05d", getprogname(), getpid()); (void)mkdir(path, 0770);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304090830.r398URWN025605>