Mercurial > hg > dhcpcd
changeset 5200:84674dd6a288 draft
Merge branch 'master' of github.com:rsmarples/dhcpcd
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sun, 10 May 2020 10:07:34 +0100 |
| parents | b02566d71169 (current diff) dfbd1f961093 (diff) |
| children | 4f064bf74840 |
| files | |
| diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/if-options.c Thu May 07 20:57:22 2020 +0100 +++ b/src/if-options.c Sun May 10 10:07:34 2020 +0100 @@ -2095,7 +2095,7 @@ logerr(__func__); return -1; } - while ((i = getgrnam_r(arg, &grpbuf, p, (size_t)l, &grp)) == + while ((i = getgrnam_r(arg, &grpbuf, p, dl, &grp)) == ERANGE) { size_t nl = dl * 2; @@ -2120,7 +2120,8 @@ return -1; } if (grp == NULL) { - logerrx("controlgroup: %s: not found", arg); + if (!ctx->control_group) + logerrx("controlgroup: %s: not found", arg); free(p); return -1; } @@ -2129,7 +2130,8 @@ #else grp = getgrnam(arg); if (grp == NULL) { - logerrx("controlgroup: %s: not found", arg); + if (!ctx->control_group) + logerrx("controlgroup: %s: not found", arg); return -1; } ctx->control_group = grp->gr_gid;
