| 1 | --- a/src/priv.c |
| 2 | +++ b/src/priv.c |
| 3 | @@ -518,12 +518,14 @@ priv_init(char *chrootdir) |
| 4 | fatal("[priv]: unable to create socket pair for privilege separation"); |
| 5 | |
| 6 | /* Get users */ |
| 7 | + /* |
| 8 | if ((user = getpwnam(PRIVSEP_USER)) == NULL) |
| 9 | fatal("[priv]: no " PRIVSEP_USER " user for privilege separation"); |
| 10 | uid = user->pw_uid; |
| 11 | if ((group = getgrnam(PRIVSEP_GROUP)) == NULL) |
| 12 | fatal("[priv]: no " PRIVSEP_GROUP " group for privilege separation"); |
| 13 | gid = group->gr_gid; |
| 14 | + */ |
| 15 | |
| 16 | /* Spawn off monitor */ |
| 17 | if ((monitored = fork()) < 0) |
| 18 | @@ -534,17 +536,17 @@ priv_init(char *chrootdir) |
| 19 | if (RUNNING_ON_VALGRIND) |
| 20 | LLOG_WARNX("[priv]: running on valgrind, keep privileges"); |
| 21 | else { |
| 22 | - if (chroot(chrootdir) == -1) |
| 23 | - fatal("[priv]: unable to chroot"); |
| 24 | - if (chdir("/") != 0) |
| 25 | + /*if (chroot(chrootdir) == -1) |
| 26 | + fatal("[priv]: unable to chroot");*/ |
| 27 | + if (chdir("/tmp") != 0) |
| 28 | fatal("[priv]: unable to chdir"); |
| 29 | gidset[0] = gid; |
| 30 | - if (setresgid(gid, gid, gid) == -1) |
| 31 | + /*if (setresgid(gid, gid, gid) == -1) |
| 32 | fatal("[priv]: setresgid() failed"); |
| 33 | if (setgroups(1, gidset) == -1) |
| 34 | fatal("[priv]: setgroups() failed"); |
| 35 | if (setresuid(uid, uid, uid) == -1) |
| 36 | - fatal("[priv]: setresuid() failed"); |
| 37 | + fatal("[priv]: setresuid() failed");*/ |
| 38 | } |
| 39 | remote = pair[0]; |
| 40 | close(pair[1]); |
| 41 | |