If group not also specified, make this a fatal error. If group
specified, we'll error out anyway unless the group can be resolved.
Approach considered but not followed: fatal config error if built with
ref:name where name is a number.
fixes bug 1098
PP/04 New "dns_use_edns0" global option.
+PP/05 Don't segfault on misconfiguration of ref:name exim-user as uid.
+ Bugzilla 1098.
+
Exim version 4.75
-----------------
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
{