X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/754a0503134b184183f64c04ed30a3524fc3860b..43236f357ba2001d59b5937d14a50a56478bb8e0:/src/src/exim.c diff --git a/src/src/exim.c b/src/src/exim.c index 30974c9c6..371bc1025 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -1299,7 +1299,7 @@ for (m = macros; m != NULL; m = m->next) return FALSE; } } -DEBUG(D_any) debug_printf("macros_trusted overriden to true by whitelisting\n"); +DEBUG(D_any) debug_printf("macros_trusted overridden to true by whitelisting\n"); return TRUE; #endif } @@ -1414,7 +1414,19 @@ if (route_finduser(US EXIM_USERNAME, &pw, &exim_uid)) EXIM_USERNAME); exit(EXIT_FAILURE); } - exim_gid = pw->pw_gid; + /* If ref:name uses a number as the name, route_finduser() returns + TRUE with exim_uid set and pw coerced to NULL. */ + if (pw) + exim_gid = pw->pw_gid; +#ifndef EXIM_GROUPNAME + else + { + fprintf(stderr, + "exim: ref:name should specify a usercode, not a group.\n" + "exim: can't let you get away with it unless you also specify a group.\n"); + exit(EXIT_FAILURE); + } +#endif } else {