diff --git a/hooks/dhcpcd-run-hooks.8.in b/hooks/dhcpcd-run-hooks.8.in index 9677a247..49915767 100644 --- a/hooks/dhcpcd-run-hooks.8.in +++ b/hooks/dhcpcd-run-hooks.8.in @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 28, 2020 +.Dd May 24, 2020 .Dt DHCPCD-RUN-HOOKS 8 .Os .Sh NAME @@ -84,8 +84,6 @@ Here's a list of reasons why .Nm could be invoked: .Bl -tag -width EXPIREXXXEXPIRE6 -.It Dv CHROOT -dhcpcd is starting up and needs to configure a chroot environment. .It Dv PREINIT dhcpcd is starting up and any pre-initialisation should be done. .It Dv CARRIER diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 46c6d8ed..e2501d6f 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -2174,8 +2174,7 @@ main(int argc, char **argv) freopen(_PATH_DEVNULL, "r", stdin); #ifdef PRIVSEP - if (ps_init(&ctx) == 0) - script_runchroot(&ctx); + ps_init(&ctx); #endif #ifdef USE_SIGNALS diff --git a/src/script.c b/src/script.c index bd4bc94c..1e7e1291 100644 --- a/src/script.c +++ b/src/script.c @@ -734,23 +734,3 @@ script_runreason(const struct interface *ifp, const char *reason) return status; } - -#ifdef PRIVSEP -int -script_runchroot(struct dhcpcd_ctx *ctx) -{ - char *argv[2]; - - /* Make our env */ - if (make_env(ctx, NULL, "CHROOT") == -1) { - logerr(__func__); - return -1; - } - - argv[0] = ctx->script; - argv[1] = NULL; - logdebugx("executing `%s' %s", argv[0], "CHROOT"); - - return script_run(ctx, argv); -} -#endif diff --git a/src/script.h b/src/script.h index 8e49f7fd..e9ad1117 100644 --- a/src/script.h +++ b/src/script.h @@ -37,5 +37,4 @@ char ** script_buftoenv(struct dhcpcd_ctx *, char *, size_t); pid_t script_exec(char *const *, char *const *); int send_interface(struct fd_list *, const struct interface *, int); int script_runreason(const struct interface *, const char *); -int script_runchroot(struct dhcpcd_ctx *); #endif