Commit 8bdd3d11 authored by Tollef Fog Heen's avatar Tollef Fog Heen

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 07c4432b.
parent f214debc
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment