]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Rename Master to Manager
authorRoy Marples <roy@marples.name>
Tue, 2 Feb 2021 16:54:09 +0000 (16:54 +0000)
committerRoy Marples <roy@marples.name>
Tue, 2 Feb 2021 16:54:09 +0000 (16:54 +0000)
13 files changed:
src/dhcp.c
src/dhcp6.c
src/dhcpcd.8.in
src/dhcpcd.c
src/dhcpcd.conf.5.in
src/if-options.c
src/if-options.h
src/ipv6.c
src/privsep-control.c
src/privsep-inet.c
src/privsep-root.c
src/privsep.c
src/privsep.h

index 5b1eb2693ed84be7635f4a3217ddcad7efff4b48..c1916133ba2547d8c87bae13bb1c850c84f0d001 100644 (file)
@@ -2069,7 +2069,7 @@ dhcp_addr_duplicated(struct interface *ifp, struct in_addr *ia)
        if (opts & (DHCPCD_STATIC | DHCPCD_INFORM)) {
                state->reason = "EXPIRE";
                script_runreason(ifp, state->reason);
-#define NOT_ONLY_SELF (DHCPCD_MASTER | DHCPCD_IPV6RS | DHCPCD_DHCP6)
+#define NOT_ONLY_SELF (DHCPCD_MANAGER | DHCPCD_IPV6RS | DHCPCD_DHCP6)
                if (!(ctx->options & NOT_ONLY_SELF))
                        eloop_exit(ifp->ctx->eloop, EXIT_FAILURE);
                return deleted;
@@ -2380,8 +2380,8 @@ dhcp_bind(struct interface *ifp)
        dhcp_closebpf(ifp);
 
 openudp:
-       /* If not in master mode, open an address specific socket. */
-       if (ctx->options & DHCPCD_MASTER ||
+       /* If not in manager mode, open an address specific socket. */
+       if (ctx->options & DHCPCD_MANAGER ||
            (state->old != NULL &&
             state->old->yiaddr == state->new->yiaddr &&
             old_state & STATE_ADDED && !(old_state & STATE_FAKE)))
@@ -2399,7 +2399,7 @@ openudp:
        state->udp_rfd = dhcp_openudp(&state->addr->addr);
        if (state->udp_rfd == -1) {
                logerr(__func__);
-               /* Address sharing without master mode is not supported.
+               /* Address sharing without manager mode is not supported.
                 * It's also possible another DHCP client could be running,
                 * which is even worse.
                 * We still need to work, so re-open BPF. */
@@ -3962,9 +3962,9 @@ dhcp_start1(void *arg)
 
        /* Listen on *.*.*.*:bootpc so that the kernel never sends an
         * ICMP port unreachable message back to the DHCP server.
-        * Only do this in master mode so we don't swallow messages
+        * Only do this in manager mode so we don't swallow messages
         * for dhcpcd running on another interface. */
-       if ((ctx->options & (DHCPCD_MASTER|DHCPCD_PRIVSEP)) == DHCPCD_MASTER
+       if ((ctx->options & (DHCPCD_MANAGER|DHCPCD_PRIVSEP)) == DHCPCD_MANAGER
            && ctx->udp_rfd == -1)
        {
                ctx->udp_rfd = dhcp_openudp(NULL);
@@ -4256,7 +4256,7 @@ dhcp_handleifa(int cmd, struct ipv4_addr *ia, pid_t pid)
 
 #ifdef PRIVSEP
        if (IN_PRIVSEP_SE(ifp->ctx) &&
-           !(ifp->ctx->options & (DHCPCD_MASTER | DHCPCD_CONFIGURE)) &&
+           !(ifp->ctx->options & (DHCPCD_MANAGER | DHCPCD_CONFIGURE)) &&
            IN_ARE_ADDR_EQUAL(&state->lease.addr, &ia->addr))
        {
                state->addr = ia;
index 4fd119c579bd55407697e0c3dacb298aec63a8c5..f3554186e412bae9bfb30fe70a473a6789622ee1 100644 (file)
@@ -868,11 +868,11 @@ dhcp6_makemessage(struct interface *ifp)
                break;
        }
 
-       /* In non master mode we listen and send from fixed addresses.
+       /* In non manager mode we listen and send from fixed addresses.
         * We should try and match an address we have to unicast to,
         * but for now this is the safest policy. */
-       if (unicast != NULL && !(ifp->ctx->options & DHCPCD_MASTER)) {
-               logdebugx("%s: ignoring unicast option as not master",
+       if (unicast != NULL && !(ifp->ctx->options & DHCPCD_MANAGER)) {
+               logdebugx("%s: ignoring unicast option as not manager",
                    ifp->name);
                unicast = NULL;
        }
@@ -3245,7 +3245,7 @@ dhcp6_bind(struct interface *ifp, const char *op, const char *sfrom)
 
        if (ifp->ctx->options & DHCPCD_TEST ||
            (ifp->options->options & DHCPCD_INFORM &&
-           !(ifp->ctx->options & DHCPCD_MASTER)))
+           !(ifp->ctx->options & DHCPCD_MANAGER)))
        {
                eloop_exit(ifp->ctx->eloop, EXIT_SUCCESS);
        }
@@ -3856,7 +3856,7 @@ dhcp6_start1(void *arg)
        size_t i;
        const struct dhcp_compat *dhc;
 
-       if ((ctx->options & (DHCPCD_MASTER|DHCPCD_PRIVSEP)) == DHCPCD_MASTER &&
+       if ((ctx->options & (DHCPCD_MANAGER|DHCPCD_PRIVSEP)) == DHCPCD_MANAGER &&
            ctx->dhcp6_rfd == -1)
        {
                ctx->dhcp6_rfd = dhcp6_openudp(0, NULL);
@@ -4161,11 +4161,11 @@ dhcp6_handleifa(int cmd, struct ipv6_addr *ia, pid_t pid)
        struct dhcp6_state *state;
        struct interface *ifp = ia->iface;
 
-       /* If not running in master mode, listen to this address */
+       /* If not running in manager mode, listen to this address */
        if (cmd == RTM_NEWADDR &&
            !(ia->addr_flags & IN6_IFF_NOTUSEABLE) &&
            ifp->active == IF_ACTIVE_USER &&
-           !(ifp->ctx->options & DHCPCD_MASTER) &&
+           !(ifp->ctx->options & DHCPCD_MANAGER) &&
            ifp->options->options & DHCPCD_DHCP6)
        {
 #ifdef PRIVSEP
index a35deb5d899bf7102df4e164ae3cd3751dad09eb..c307f69f0428d9f23b9e6e5d36310f8d2e6f2ab7 100644 (file)
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd November 25, 2020
+.Dd February 2, 2021
 .Dt DHCPCD 8
 .Os
 .Sh NAME
@@ -172,7 +172,7 @@ discovers available Ethernet interfaces that can be configured.
 When
 .Nm
 not limited to one interface on the command line,
-it is running in Master mode.
+it is running in Manager mode.
 The
 .Nm dhcpcd-ui
 project expects dhcpcd to be running this way.
@@ -192,9 +192,9 @@ Using a single interface also affects the
 and
 .Fl x
 options, where the same interface will need to be specified, as a lack of an
-interface will imply Master mode which this is not.
-To force starting in Master mode with only one interface, the
-.Fl M , Fl Fl master
+interface will imply Manager mode which this is not.
+To force starting in Manager mode with only one interface, the
+.Fl M , Fl Fl manager
 option can be used.
 .Pp
 Interfaces are preferred by carrier, DHCP lease/IPv4LL and then lowest metric.
@@ -393,7 +393,7 @@ regardless of the
 option.
 If no
 .Ar interface
-is specified then this applies to all interfaces in Master mode.
+is specified then this applies to all interfaces in Manager mode.
 If no interfaces are left running,
 .Nm
 will exit.
@@ -406,10 +406,10 @@ By default
 .Nm
 does not request any lease time and leaves it in the hands of the
 DHCP server.
-.It Fl M , Fl Fl master
+.It Fl M , Fl Fl manager
 Start
 .Nm
-in Master mode even if only one interface specified on the command line.
+in Manager mode even if only one interface specified on the command line.
 See the Multiple Interfaces section above.
 .It Fl m , Fl Fl metric Ar metric
 Metrics are used to prefer an interface over another one, lowest wins.
@@ -424,7 +424,7 @@ to reload its configuration and rebind the specified
 .Ar interface .
 If no
 .Ar interface
-is specified then this applies to all interfaces in Master mode.
+is specified then this applies to all interfaces in Manager mode.
 If
 .Nm
 is not running, then it starts up as normal.
@@ -435,7 +435,7 @@ to renew existing addresses on the specified
 .Ar interface .
 If no
 .Ar interface
-is specified then this applies to all interfaces in Master mode.
+is specified then this applies to all interfaces in Manager mode.
 If
 .Nm
 is not running, then it starts up as normal.
@@ -578,7 +578,7 @@ process running on the
 to exit.
 If no
 .Ar interface
-is specified, then the above is applied to all interfaces in Master mode.
+is specified, then the above is applied to all interfaces in Manager mode.
 See the
 .Fl p , Fl Fl persistent
 option to control configuration persistence on exit,
@@ -747,7 +747,7 @@ then it is still denied.
 Don't start any interfaces other than those specified on the command line.
 This allows
 .Nm
-to be started in Master mode and then wait for subsequent
+to be started in Manager mode and then wait for subsequent
 .Nm
 commands to start each interface as required.
 .It Fl Fl configure
@@ -855,11 +855,13 @@ Stores the PID of
 running on the
 .Ar interface .
 .It Pa @RUNDIR@/sock
-Control socket to the master daemon.
+Control socket to the manager daemon.
 .It Pa @RUNDIR@/unpriv.sock
-Unprivileged socket to the master daemon, only allows state retrieval.
+Unprivileged socket to the manager daemon, only allows state retrieval.
 .It Pa @RUNDIR@/ Ns Ar interface Ns .sock
 Control socket to per interface daemon.
+.It Pa @RUNDIR@/ Ns Ar interface Ns .unpriv.sock
+Unprivileged socket to per interface daemon, only allows state retrieval.
 .El
 .Sh SEE ALSO
 .Xr fnmatch 3 ,
index d23ce3fd0e1b29400f51f42f9d45ab983df056da..eae6e20b3aa83da20b22d3ebb90f74e17c31bdf6 100644 (file)
@@ -196,7 +196,7 @@ handle_exit_timeout(void *arg)
 
        ctx = arg;
        logerrx("timed out");
-       if (!(ctx->options & DHCPCD_MASTER)) {
+       if (!(ctx->options & DHCPCD_MANAGER)) {
                struct interface *ifp;
 
                TAILQ_FOREACH(ifp, ctx->ifaces, next) {
@@ -370,12 +370,12 @@ dhcpcd_daemonise(struct dhcpcd_ctx *ctx)
 
        /*
         * Stop writing to stderr.
-        * On the happy path, only the master process writes to stderr,
+        * On the happy path, only the manager process writes to stderr,
         * so this just stops wasting fprintf calls to nowhere.
         * All other calls - ie errors in privsep processes or script output,
         * will error when printing.
         * If we *really* want to fix that, then we need to suck
-        * stderr/stdout in the master process and either disacrd it or pass
+        * stderr/stdout in the manager process and either disacrd it or pass
         * it to the launcher process and then to stderr.
         */
        logopts &= ~LOGERR_ERR;
@@ -427,7 +427,7 @@ stop_interface(struct interface *ifp, const char *reason)
        ifp->active = IF_INACTIVE;
        ifp->options->options &= ~DHCPCD_STOPPING;
 
-       if (!(ctx->options & (DHCPCD_MASTER | DHCPCD_TEST)))
+       if (!(ctx->options & (DHCPCD_MANAGER | DHCPCD_TEST)))
                eloop_exit(ctx->eloop, EXIT_FAILURE);
 }
 
@@ -980,7 +980,7 @@ dhcpcd_prestartinterface(void *arg)
        } else
                randmac_down = false;
 
-       if ((!(ctx->options & DHCPCD_MASTER) ||
+       if ((!(ctx->options & DHCPCD_MANAGER) ||
            ifp->options->options & DHCPCD_IF_UP || randmac_down) &&
            !(ifp->flags & IFF_UP))
        {
@@ -1314,8 +1314,8 @@ reload_config(struct dhcpcd_ctx *ctx)
        /* We need to preserve these options. */
        if (ctx->options & DHCPCD_STARTED)
                ifo->options |= DHCPCD_STARTED;
-       if (ctx->options & DHCPCD_MASTER)
-               ifo->options |= DHCPCD_MASTER;
+       if (ctx->options & DHCPCD_MANAGER)
+               ifo->options |= DHCPCD_MANAGER;
        if (ctx->options & DHCPCD_DAEMONISED)
                ifo->options |= DHCPCD_DAEMONISED;
        if (ctx->options & DHCPCD_PRIVSEP)
@@ -2009,7 +2009,7 @@ main(int argc, char **argv, char **envp)
        }
 
        if (optind != argc - 1)
-               ctx.options |= DHCPCD_MASTER;
+               ctx.options |= DHCPCD_MANAGER;
 
        logsetopts(logopts);
        logopen(ctx.logfile);
@@ -2089,7 +2089,7 @@ main(int argc, char **argv, char **envp)
 printpidfile:
                /* If we have any other args, we should run as a single dhcpcd
                 *  instance for that interface. */
-               if (optind == argc - 1 && !(ctx.options & DHCPCD_MASTER)) {
+               if (optind == argc - 1 && !(ctx.options & DHCPCD_MANAGER)) {
                        const char *per;
                        const char *ifname;
 
@@ -2115,7 +2115,7 @@ printpidfile:
                } else {
                        snprintf(ctx.pidfile, sizeof(ctx.pidfile),
                            PIDFILE, "", "", "");
-                       ctx.options |= DHCPCD_MASTER;
+                       ctx.options |= DHCPCD_MANAGER;
                }
                if (ctx.options & DHCPCD_PRINT_PIDFILE) {
                        printf("%s\n", ctx.pidfile);
@@ -2191,7 +2191,7 @@ printpidfile:
        {
                ctx.options |= DHCPCD_FORKED; /* pretend child process */
 #ifdef PRIVSEP
-               if (IN_PRIVSEP(&ctx) && ps_mastersandbox(&ctx, NULL) == -1)
+               if (IN_PRIVSEP(&ctx) && ps_managersandbox(&ctx, NULL) == -1)
                        goto exit_failure;
 #endif
                ifp = calloc(1, sizeof(*ifp));
@@ -2235,10 +2235,10 @@ printpidfile:
            !(ctx.options & DHCPCD_TEST))
        {
                ctx.options |= DHCPCD_FORKED; /* avoid socket unlink */
-               if (!(ctx.options & DHCPCD_MASTER))
+               if (!(ctx.options & DHCPCD_MANAGER))
                        ctx.control_fd = control_open(argv[optind], family,
                            ctx.options & DHCPCD_DUMPLEASE);
-               if (!(ctx.options & DHCPCD_MASTER) && ctx.control_fd == -1)
+               if (!(ctx.options & DHCPCD_MANAGER) && ctx.control_fd == -1)
                        ctx.control_fd = control_open(argv[optind], AF_UNSPEC,
                            ctx.options & DHCPCD_DUMPLEASE);
                if (ctx.control_fd == -1)
@@ -2247,7 +2247,7 @@ printpidfile:
                if (ctx.control_fd != -1) {
 #ifdef PRIVSEP
                        if (IN_PRIVSEP(&ctx) &&
-                           ps_mastersandbox(&ctx, NULL) == -1)
+                           ps_managersandbox(&ctx, NULL) == -1)
                                goto exit_failure;
 #endif
                        if (!(ctx.options & DHCPCD_DUMPLEASE))
@@ -2305,7 +2305,7 @@ printpidfile:
 
 #if defined(USE_SIGNALS) && !defined(THERE_IS_NO_FORK)
        if (!(ctx.options & DHCPCD_DAEMONISE))
-               goto start_master;
+               goto start_manager;
 
        if (xsocketpair(AF_UNIX, SOCK_DGRAM | SOCK_CXNB, 0, fork_fd) == -1 ||
            (ctx.stderr_valid &&
@@ -2395,7 +2395,7 @@ printpidfile:
                                logerr("%s: eloop_event_add", __func__);
                }
 #ifdef PRIVSEP
-               if (IN_PRIVSEP(&ctx) && ps_mastersandbox(&ctx, NULL) == -1)
+               if (IN_PRIVSEP(&ctx) && ps_managersandbox(&ctx, NULL) == -1)
                        goto exit_failure;
 #endif
                goto run_loop;
@@ -2403,8 +2403,8 @@ printpidfile:
 
        /* We have now forked, setsid, forked once more.
         * From this point on, we are the controlling daemon. */
-       logdebugx("spawned master process on PID %d", getpid());
-start_master:
+       logdebugx("spawned manager process on PID %d", getpid());
+start_manager:
        ctx.options |= DHCPCD_STARTED;
        if ((pid = pidfile_lock(ctx.pidfile)) != 0) {
                logerr("%s: pidfile_lock %d", __func__, pid);
@@ -2435,7 +2435,7 @@ start_master:
 
        if (!(ctx.options & DHCPCD_TEST)) {
                if (control_start(&ctx,
-                   ctx.options & DHCPCD_MASTER ?
+                   ctx.options & DHCPCD_MANAGER ?
                    NULL : argv[optind], family) == -1)
                {
                        logerr("%s: control_start", __func__);
@@ -2447,13 +2447,13 @@ start_master:
        /* Start any dev listening plugin which may want to
         * change the interface name provided by the kernel */
        if (!IN_PRIVSEP(&ctx) &&
-           (ctx.options & (DHCPCD_MASTER | DHCPCD_DEV)) ==
-           (DHCPCD_MASTER | DHCPCD_DEV))
+           (ctx.options & (DHCPCD_MANAGER | DHCPCD_DEV)) ==
+           (DHCPCD_MANAGER | DHCPCD_DEV))
                dev_start(&ctx, dhcpcd_handleinterface);
 #endif
 
        setproctitle("%s%s%s",
-           ctx.options & DHCPCD_MASTER ? "[master]" : argv[optind],
+           ctx.options & DHCPCD_MANAGER ? "[manager]" : argv[optind],
            ctx.options & DHCPCD_IPV4 ? " [ip4]" : "",
            ctx.options & DHCPCD_IPV6 ? " [ip6]" : "");
 
@@ -2479,7 +2479,7 @@ start_master:
                logerr("%s: eloop_event_add", __func__);
 
 #ifdef PRIVSEP
-       if (IN_PRIVSEP(&ctx) && ps_mastersandbox(&ctx, "stdio route") == -1)
+       if (IN_PRIVSEP(&ctx) && ps_managersandbox(&ctx, "stdio route") == -1)
                goto exit_failure;
 #endif
 
@@ -2540,7 +2540,7 @@ start_master:
        }
 
        if (!(ctx.options & DHCPCD_BACKGROUND)) {
-               if (ctx.options & DHCPCD_MASTER)
+               if (ctx.options & DHCPCD_MANAGER)
                        t = ifo->timeout;
                else {
                        t = 0;
index c6bde11ca78a52c41015c399c48db04757884b73..f4370118322c49d389f18f7755f78e8ecdfcbcd0 100644 (file)
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 27, 2020
+.Dd Febrary 2, 2021
 .Dt DHCPCD.CONF 5
 .Os
 .Sh NAME
@@ -550,7 +550,7 @@ Don't solicit or accept IPv6 Router Advertisements.
 Don't receive link messages about carrier status.
 You should only set this for buggy interface drivers.
 .It Ic noup
-Don't bring the interface up when in master mode.
+Don't bring the interface up when in manager mode.
 .It Ic option Ar option
 Requests the
 .Ar option
index 9862ff6da70124b9032040a99b4093fc74f2f16f..8ba6635da387d073235a4c04cfb8a9e0c8291cfb 100644 (file)
@@ -104,7 +104,7 @@ const struct option cf_options[] = {
        {"broadcast",       no_argument,       NULL, 'J'},
        {"nolink",          no_argument,       NULL, 'K'},
        {"noipv4ll",        no_argument,       NULL, 'L'},
-       {"master",          no_argument,       NULL, 'M'},
+       {"manager",         no_argument,       NULL, 'M'},
        {"renew",           no_argument,       NULL, 'N'},
        {"nooption",        required_argument, NULL, 'O'},
        {"printpidfile",    no_argument,       NULL, 'P'},
@@ -1068,7 +1068,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
                ifo->options &= ~DHCPCD_IPV4LL;
                break;
        case 'M':
-               ifo->options |= DHCPCD_MASTER;
+               ifo->options |= DHCPCD_MANAGER;
                break;
        case 'O':
                ARG_REQUIRED;
@@ -1356,7 +1356,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
 #endif
        case O_IAID:
                ARG_REQUIRED;
-               if (ctx->options & DHCPCD_MASTER && !IN_CONFIG_BLOCK(ifo)) {
+               if (ctx->options & DHCPCD_MANAGER && !IN_CONFIG_BLOCK(ifo)) {
                        logerrx("IAID must belong in an interface block");
                        return -1;
                }
@@ -1398,7 +1398,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
                        logwarnx("%s: IA_PD not compiled in", ifname);
                        return -1;
 #else
-                       if (ctx->options & DHCPCD_MASTER &&
+                       if (ctx->options & DHCPCD_MANAGER &&
                            !IN_CONFIG_BLOCK(ifo))
                        {
                                logerrx("IA PD must belong in an "
@@ -1408,7 +1408,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
                        i = D6_OPTION_IA_PD;
 #endif
                }
-               if (ctx->options & DHCPCD_MASTER &&
+               if (ctx->options & DHCPCD_MANAGER &&
                    !IN_CONFIG_BLOCK(ifo) && arg)
                {
                        logerrx("IA with IAID must belong in an "
index dcf1fc8520b15259efa8e496fbe68746d65b3487..f80119d6c15fa1c4cf695dee1d1ea380689a5da9 100644 (file)
@@ -74,7 +74,7 @@
 #define DHCPCD_DAEMONISE               (1ULL << 14)
 #define DHCPCD_DAEMONISED              (1ULL << 15)
 #define DHCPCD_TEST                    (1ULL << 16)
-#define DHCPCD_MASTER                  (1ULL << 17)
+#define DHCPCD_MANAGER                 (1ULL << 17)
 #define DHCPCD_HOSTNAME                        (1ULL << 18)
 #define DHCPCD_CLIENTID                        (1ULL << 19)
 #define DHCPCD_LINK                    (1ULL << 20)
index 6bb2c45a1ec2d67f9d2d7366aa4319875b531089..04bf7746e080727dd20cb38e54624e1d17513eeb 100644 (file)
@@ -596,7 +596,7 @@ ipv6_deletedaddr(struct ipv6_addr *ia)
 
 #ifdef DHCP6
 #ifdef PRIVSEP
-       if (!(ia->iface->ctx->options & DHCPCD_MASTER))
+       if (!(ia->iface->ctx->options & DHCPCD_MANAGER))
                ps_inet_closedhcp6(ia);
 #elif defined(SMALL)
        UNUSED(ia);
index 389c5ad2f804b75c9d7175c6778994750116caba..694242daf99a115a636117e7901035e5e2893560 100644 (file)
@@ -42,7 +42,7 @@ ps_ctl_startcb(void *arg)
        struct dhcpcd_ctx *ctx = arg;
        sa_family_t af;
 
-       if (ctx->options & DHCPCD_MASTER) {
+       if (ctx->options & DHCPCD_MANAGER) {
                setproctitle("[control proxy]");
                af = AF_UNSPEC;
        } else {
@@ -63,7 +63,7 @@ ps_ctl_startcb(void *arg)
        ctx->ps_control_pid = getpid();
 
        return control_start(ctx,
-           ctx->options & DHCPCD_MASTER ? NULL : *ctx->ifv, af);
+           ctx->options & DHCPCD_MANAGER ? NULL : *ctx->ifv, af);
 }
 
 static ssize_t
index bad4ea10311416afccd371654f5dfe9fb6e1ca49..fc7da095df2b88f5b5abdb6183ab385f179320be 100644 (file)
@@ -98,8 +98,8 @@ ps_inet_canstart(const struct dhcpcd_ctx *ctx)
 {
 
 #ifdef INET
-       if ((ctx->options & (DHCPCD_IPV4 | DHCPCD_MASTER)) ==
-           (DHCPCD_IPV4 | DHCPCD_MASTER))
+       if ((ctx->options & (DHCPCD_IPV4 | DHCPCD_MANAGER)) ==
+           (DHCPCD_IPV4 | DHCPCD_MANAGER))
                return true;
 #endif
 #if defined(INET6) && !defined(__sun)
@@ -107,8 +107,8 @@ ps_inet_canstart(const struct dhcpcd_ctx *ctx)
                return true;
 #endif
 #ifdef DHCP6
-       if ((ctx->options & (DHCPCD_IPV6 | DHCPCD_MASTER)) ==
-           (DHCPCD_IPV6 | DHCPCD_MASTER))
+       if ((ctx->options & (DHCPCD_IPV6 | DHCPCD_MANAGER)) ==
+           (DHCPCD_IPV6 | DHCPCD_MANAGER))
                return true;
 #endif
 
@@ -121,7 +121,7 @@ ps_inet_startcb(void *arg)
        struct dhcpcd_ctx *ctx = arg;
        int ret = 0;
 
-       if (ctx->options & DHCPCD_MASTER)
+       if (ctx->options & DHCPCD_MANAGER)
                setproctitle("[network proxy]");
        else
                setproctitle("[network proxy] %s%s%s",
@@ -136,8 +136,8 @@ ps_inet_startcb(void *arg)
        errno = 0;
 
 #ifdef INET
-       if ((ctx->options & (DHCPCD_IPV4 | DHCPCD_MASTER)) ==
-           (DHCPCD_IPV4 | DHCPCD_MASTER))
+       if ((ctx->options & (DHCPCD_IPV4 | DHCPCD_MANAGER)) ==
+           (DHCPCD_IPV4 | DHCPCD_MANAGER))
        {
                ctx->udp_rfd = dhcp_openudp(NULL);
                if (ctx->udp_rfd == -1)
@@ -182,8 +182,8 @@ ps_inet_startcb(void *arg)
        }
 #endif
 #ifdef DHCP6
-       if ((ctx->options & (DHCPCD_IPV6 | DHCPCD_MASTER)) ==
-           (DHCPCD_IPV6 | DHCPCD_MASTER))
+       if ((ctx->options & (DHCPCD_IPV6 | DHCPCD_MANAGER)) ==
+           (DHCPCD_IPV6 | DHCPCD_MANAGER))
        {
                ctx->dhcp6_rfd = dhcp6_openudp(0, NULL);
                if (ctx->dhcp6_rfd == -1)
index b09a67daa38e35a172e723f92014ca7e6c0d1cce..92406c4da73e6ea174df4525445dc8c1b0e4a767 100644 (file)
@@ -648,7 +648,7 @@ ps_root_startcb(void *arg)
 {
        struct dhcpcd_ctx *ctx = arg;
 
-       if (ctx->options & DHCPCD_MASTER)
+       if (ctx->options & DHCPCD_MANAGER)
                setproctitle("[privileged actioneer]");
        else
                setproctitle("[privileged actioneer] %s%s%s",
@@ -660,7 +660,7 @@ ps_root_startcb(void *arg)
 
        /* Open network sockets for sending.
         * This is a small bit wasteful for non sandboxed OS's
-        * but makes life very easy for unicasting DHCPv6 in non master
+        * but makes life very easy for unicasting DHCPv6 in non manager
         * mode as we no longer care about address selection.
         * We can't call shutdown SHUT_RD on the socket because it's
         * not connectd. All we can do is try and set a zero sized
@@ -707,8 +707,8 @@ ps_root_startcb(void *arg)
 #ifdef PLUGIN_DEV
        /* Start any dev listening plugin which may want to
         * change the interface name provided by the kernel */
-       if ((ctx->options & (DHCPCD_MASTER | DHCPCD_DEV)) ==
-           (DHCPCD_MASTER | DHCPCD_DEV))
+       if ((ctx->options & (DHCPCD_MANAGER | DHCPCD_DEV)) ==
+           (DHCPCD_MANAGER | DHCPCD_DEV))
                dev_start(ctx, ps_root_handleinterface);
 #endif
 
index 52599df12914fded7c72fd5b147ffacc3ee9cb6b..b63a9d4bbe17620035bf651da22dd01ffae15efd 100644 (file)
@@ -34,7 +34,7 @@
  * Spawn an unpriv process to send/receive common network data.
  * Then drop all privs and start running.
  * Every process aside from the privileged actioneer is chrooted.
- * All privsep processes ignore signals - only the master process accepts them.
+ * All privsep processes ignore signals - only the manager process accepts them.
  *
  * dhcpcd will maintain the config file in the chroot, no need to handle
  * this in a script or something.
@@ -536,7 +536,7 @@ ps_entersandbox(const char *_pledge, const char **sandbox)
 }
 
 int
-ps_mastersandbox(struct dhcpcd_ctx *ctx, const char *_pledge)
+ps_managersandbox(struct dhcpcd_ctx *ctx, const char *_pledge)
 {
        const char *sandbox = NULL;
        bool forked;
@@ -587,7 +587,7 @@ ps_mastersandbox(struct dhcpcd_ctx *ctx, const char *_pledge)
                return -1;
        } else if (ctx->options & DHCPCD_LAUNCHER ||
                  ((!(ctx->options & DHCPCD_DAEMONISE)) &&
-                  ctx->options & DHCPCD_MASTER))
+                  ctx->options & DHCPCD_MANAGER))
                logdebugx("sandbox: %s", sandbox);
        return 0;
 }
index 3391627436311993fe80bfa5fedbd209d0f03ccb..57fa75159c8b9d05c461f45ac4175c8f02ad8501 100644 (file)
@@ -176,7 +176,7 @@ int ps_init(struct dhcpcd_ctx *);
 int ps_start(struct dhcpcd_ctx *);
 int ps_stop(struct dhcpcd_ctx *);
 int ps_entersandbox(const char *, const char **);
-int ps_mastersandbox(struct dhcpcd_ctx *, const char *);
+int ps_managersandbox(struct dhcpcd_ctx *, const char *);
 
 int ps_unrollmsg(struct msghdr *, struct ps_msghdr *, const void *, size_t);
 ssize_t ps_sendpsmmsg(struct dhcpcd_ctx *, int,