]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: No need for a CHROOT reason now
authorRoy Marples <roy@marples.name>
Sun, 24 May 2020 05:54:40 +0000 (05:54 +0000)
committerRoy Marples <roy@marples.name>
Sun, 24 May 2020 05:54:40 +0000 (05:54 +0000)
hooks/dhcpcd-run-hooks.8.in
src/dhcpcd.c
src/script.c
src/script.h

index 9677a247261a7d4bde28a1bebefcdb6c9bb21437..499157679e7a5ff28affca036a913a3e08e60b61 100644 (file)
@@ -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
index 46c6d8ed6b0b07f6cba90b1fa3cc20a9dcaeb33a..e2501d6f3c8a9704af2624b950a26b41c7758290 100644 (file)
@@ -2174,8 +2174,7 @@ printpidfile:
        freopen(_PATH_DEVNULL, "r", stdin);
 
 #ifdef PRIVSEP
-       if (ps_init(&ctx) == 0)
-               script_runchroot(&ctx);
+       ps_init(&ctx);
 #endif
 
 #ifdef USE_SIGNALS
index bd4bc94c3b063aeb0275d632ad0fc6dd01c9c764..1e7e1291029a2414c8a180a71b27ae6a124159ea 100644 (file)
@@ -734,23 +734,3 @@ send_listeners:
 
        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
index 8e49f7fd09716cba7732746d9944f184a584e4b7..e9ad111786f3883942a790ac86117be497eec7dd 100644 (file)
@@ -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