[master] 8bdd3d1 Revert "varnishtest: setuid(nobody) if running as root"
Tollef Fog Heen
tfheen at varnish-cache.org
Thu Jan 27 10:36:23 CET 2011
commit 8bdd3d11c7c37053fcbf43e36a325b88813b7d32
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date: Wed Jan 26 13:42:27 2011 +0100
Revert "varnishtest: setuid(nobody) if running as root"
This had the unfortunate side effect of making builds in
non-world-readable directories not work correctly when run as root.
This reverts commit 07c4432ba55b50b6640c5eeb24155a3618224f61.
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index ac3436e..3db3bd9 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -42,11 +42,6 @@ SVNID("$Id$")
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <pwd.h>
-
-#ifdef __linux__
-#include <sys/prctl.h>
-#endif
#include "libvarnish.h"
#include "vev.h"
@@ -369,21 +364,6 @@ main(int argc, char * const *argv)
vb = vev_new_base();
- if (geteuid() == 0) {
- struct passwd *pw;
- pw = getpwnam("nobody");
- assert(setgid(pw->pw_gid) == 0);
- assert(setuid(pw->pw_uid) == 0);
- /* On Linux >= 2.4, you need to set the dumpable flag
- to get core dumps after you have done a setuid. */
-#ifdef __linux__
- if (prctl(PR_SET_DUMPABLE, 1) != 0) {
- printf("Could not set dumpable bit. Core dumps turned "
- "off\n");
- }
-#endif
- }
-
i = 0;
while(!VTAILQ_EMPTY(&tst_head) || i) {
if (!VTAILQ_EMPTY(&tst_head) && njob < npar) {
More information about the varnish-commit
mailing list