equal
deleted
inserted
replaced
380 |
380 |
381 static int process_worker(int in_fd, int out_fd) { |
381 static int process_worker(int in_fd, int out_fd) { |
382 int have_death_sig = 0; |
382 int have_death_sig = 0; |
383 assert(in_fd > 2); |
383 assert(in_fd > 2); |
384 assert(out_fd > 2); |
384 assert(out_fd > 2); |
|
385 int no_warn; |
385 |
386 |
386 close(0); |
387 close(0); |
387 close(1); |
388 close(1); |
388 close(2); |
389 close(2); |
389 |
390 |
390 open("/dev/null", O_RDONLY); |
391 open("/dev/null", O_RDONLY); |
391 open("/dev/null", O_WRONLY); |
392 open("/dev/null", O_WRONLY); |
392 open("/dev/null", O_WRONLY); |
393 open("/dev/null", O_WRONLY); |
393 |
394 |
394 chdir("/"); |
395 no_warn = chdir("/"); |
395 |
396 |
396 if (geteuid() == 0) { |
397 if (geteuid() == 0) { |
397 struct passwd *pw; |
398 struct passwd *pw; |
398 |
399 |
399 if ((pw = getpwnam("nobody"))) { |
400 if ((pw = getpwnam("nobody"))) { |