mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 16:19:20 +02:00
apply patch to detach before chroot/privdrop
This commit is contained in:
parent
1188572a12
commit
fcec74b3dc
|
@ -718,6 +718,9 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
printf("Sending queries for %s to %s\n", topdomain, nameserv_addr);
|
printf("Sending queries for %s to %s\n", topdomain, nameserv_addr);
|
||||||
|
|
||||||
|
if (foreground == 0)
|
||||||
|
do_detach();
|
||||||
|
|
||||||
if (newroot != NULL)
|
if (newroot != NULL)
|
||||||
do_chroot(newroot);
|
do_chroot(newroot);
|
||||||
|
|
||||||
|
@ -728,9 +731,6 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foreground == 0)
|
|
||||||
do_detach();
|
|
||||||
|
|
||||||
tunnel(tun_fd, dns_fd);
|
tunnel(tun_fd, dns_fd);
|
||||||
|
|
||||||
cleanup2:
|
cleanup2:
|
||||||
|
|
|
@ -557,6 +557,9 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
printf("Listening to dns for domain %s\n", topdomain);
|
printf("Listening to dns for domain %s\n", topdomain);
|
||||||
|
|
||||||
|
if (foreground == 0)
|
||||||
|
do_detach();
|
||||||
|
|
||||||
if (newroot != NULL)
|
if (newroot != NULL)
|
||||||
do_chroot(newroot);
|
do_chroot(newroot);
|
||||||
|
|
||||||
|
@ -568,9 +571,6 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foreground == 0)
|
|
||||||
do_detach();
|
|
||||||
|
|
||||||
tunnel(tun_fd, dnsd_fd);
|
tunnel(tun_fd, dnsd_fd);
|
||||||
|
|
||||||
cleanup2:
|
cleanup2:
|
||||||
|
|
Loading…
Reference in New Issue