Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcpcd/dist/src Sync



details:   https://anonhg.NetBSD.org/src/rev/dd7b2da75b5f
branches:  trunk
changeset: 973516:dd7b2da75b5f
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Jul 03 10:46:45 2020 +0000

description:
Sync

diffstat:

 external/bsd/dhcpcd/dist/src/dhcpcd.c |  9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diffs (26 lines):

diff -r 24ff2859b3f3 -r dd7b2da75b5f external/bsd/dhcpcd/dist/src/dhcpcd.c
--- a/external/bsd/dhcpcd/dist/src/dhcpcd.c     Fri Jul 03 10:45:43 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd.c     Fri Jul 03 10:46:45 2020 +0000
@@ -2186,6 +2186,8 @@
 
        if (!(ctx.options & DHCPCD_TEST)) {
                /* Ensure we have the needed directories */
+               if (mkdir(DBDIR, 0750) == -1 && errno != EEXIST)
+                       logerr("%s: mkdir `%s'", __func__, DBDIR);
                if (mkdir(RUNDIR, 0755) == -1 && errno != EEXIST)
                        logerr("%s: mkdir `%s'", __func__, RUNDIR);
                if ((pid = pidfile_lock(ctx.pidfile)) != 0) {
@@ -2284,13 +2286,6 @@
                }
        }
 
-       /* If we're not running in privsep, we need to create the DB
-        * directory here. */
-       if (!(ctx.options & DHCPCD_PRIVSEP)) {
-               if (mkdir(DBDIR, 0755) == -1 && errno != EEXIST)
-                       logerr("%s: mkdir `%s'", __func__, DBDIR);
-       }
-
 #ifdef PRIVSEP
        if (IN_PRIVSEP(&ctx) && ps_start(&ctx) == -1) {
                logerr("ps_start");



Home | Main Index | Thread Index | Old Index