Source-Changes-HG archive

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

[src/ROY]: src/external/bsd/dhcpcd/dist/src Update to dhcpcd-9.1.4 with the f...



details:   https://anonhg.NetBSD.org/src/rev/18a36b8023e2
branches:  ROY
changeset: 935461:18a36b8023e2
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Jul 03 10:45:43 2020 +0000

description:
Update to dhcpcd-9.1.4 with the following changes:

 * Fix SMALL builds
 * Ensure DBDIR exists at startup

diffstat:

 external/bsd/dhcpcd/dist/src/defs.h   |  2 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.c |  9 ++-------
 external/bsd/dhcpcd/dist/src/logerr.c |  3 +--
 3 files changed, 4 insertions(+), 10 deletions(-)

diffs (59 lines):

diff -r b065930d47f6 -r 18a36b8023e2 external/bsd/dhcpcd/dist/src/defs.h
--- a/external/bsd/dhcpcd/dist/src/defs.h       Thu Jul 02 13:57:40 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/defs.h       Fri Jul 03 10:45:43 2020 +0000
@@ -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 -r b065930d47f6 -r 18a36b8023e2 external/bsd/dhcpcd/dist/src/dhcpcd.c
--- a/external/bsd/dhcpcd/dist/src/dhcpcd.c     Thu Jul 02 13:57:40 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd.c     Fri Jul 03 10:45:43 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");
diff -r b065930d47f6 -r 18a36b8023e2 external/bsd/dhcpcd/dist/src/logerr.c
--- a/external/bsd/dhcpcd/dist/src/logerr.c     Thu Jul 02 13:57:40 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/logerr.c     Fri Jul 03 10:45:43 2020 +0000
@@ -117,16 +117,15 @@
 __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))
        {



Home | Main Index | Thread Index | Old Index