Mercurial > hg > dhcpcd
changeset 5309:700fa2afe696 draft
Fix installing the embedded config as a file.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Thu, 04 Jun 2020 21:49:37 +0100 |
| parents | 70e24908f1f1 |
| children | 0a6bde63868b |
| files | src/if-options.c src/privsep-root.c |
| diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/if-options.c Thu Jun 04 13:35:46 2020 +0100 +++ b/src/if-options.c Thu Jun 04 21:49:37 2020 +0100 @@ -2366,8 +2366,8 @@ return ifo; } if (buf[buflen - 1] != '\0') { - if (buflen < sizeof(buf) - 1) - bulen++; + if ((size_t)buflen < sizeof(buf) - 1) + buflen++; buf[buflen - 1] = '\0'; } #else
--- a/src/privsep-root.c Thu Jun 04 13:35:46 2020 +0100 +++ b/src/privsep-root.c Thu Jun 04 21:49:37 2020 +0100 @@ -297,6 +297,10 @@ return false; if (cmd == PS_READFILE) { +#ifdef EMBEDDED_CONFIG + if (strcmp(ctx->cffile, EMBEDDED_CONFIG) == 0) + return true; +#endif if (strcmp(ctx->cffile, path) == 0) return true; }
