Module Name:    src
Committed By:   roy
Date:           Fri Jul  3 10:46:45 UTC 2020

Modified Files:
        src/external/bsd/dhcpcd/dist/src: dhcpcd.c

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/external/bsd/dhcpcd/dist/src/dhcpcd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.40 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.41
--- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.40	Thu Jul  2 13:59:19 2020
+++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c	Fri Jul  3 10:46:45 2020
@@ -2186,6 +2186,8 @@ printpidfile:
 
 	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 @@ printpidfile:
 		}
 	}
 
-	/* 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");

Reply via email to