diff --git a/external/bsd/dhcpcd/dist/src/defs.h b/external/bsd/dhcpcd/dist/src/defs.h index 4f90c7f2b915..ad0954b18e69 100644 --- a/external/bsd/dhcpcd/dist/src/defs.h +++ b/external/bsd/dhcpcd/dist/src/defs.h @@ -29,7 +29,7 @@ #define CONFIG_H #define PACKAGE "dhcpcd" -#define VERSION "9.1.3" +#define VERSION "9.1.4" #ifndef PRIVSEP_USER # define PRIVSEP_USER "_" PACKAGE diff --git a/external/bsd/dhcpcd/dist/src/dhcpcd.c b/external/bsd/dhcpcd/dist/src/dhcpcd.c index 2bed8e0448e5..ee585aa48066 100644 --- a/external/bsd/dhcpcd/dist/src/dhcpcd.c +++ b/external/bsd/dhcpcd/dist/src/dhcpcd.c @@ -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"); diff --git a/external/bsd/dhcpcd/dist/src/logerr.c b/external/bsd/dhcpcd/dist/src/logerr.c index 8a219b021476..a2d46017ee80 100644 --- a/external/bsd/dhcpcd/dist/src/logerr.c +++ b/external/bsd/dhcpcd/dist/src/logerr.c @@ -117,16 +117,15 @@ logprintdate(FILE *stream) __printflike(3, 0) static int vlogprintf_r(struct logctx *ctx, FILE *stream, const char *fmt, va_list args) { - FILE *err; int len = 0, e; va_list a; #ifndef SMALL + FILE *err = ctx->log_err == NULL ? stderr : ctx->log_err; bool log_pid; #ifdef LOGERR_TAG bool log_tag; #endif - err = ctx->log_err == NULL ? stderr : ctx->log_err; if ((stream == err && ctx->log_opts & LOGERR_ERR_DATE) || (stream != err && ctx->log_opts & LOGERR_LOG_DATE)) {