Update to dhcpcd-9.1.4 with the following changes:

* Fix SMALL builds
 * Ensure DBDIR exists at startup
This commit is contained in:
roy 2020-07-03 10:45:43 +00:00
parent 83a86239b0
commit 404637bd06
3 changed files with 4 additions and 10 deletions

View File

@ -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

View File

@ -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");

View File

@ -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))
{