diff options
-rw-r--r-- | doc/doc-txt/ChangeLog | 5 | ||||
-rw-r--r-- | src/src/EDITME | 5 | ||||
-rw-r--r-- | src/src/buildconfig.c | 26 |
3 files changed, 22 insertions, 14 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 01bfcf8f1..d44ebae84 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.15 2004/11/04 12:19:48 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.16 2004/11/05 12:33:59 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -59,6 +59,9 @@ Exim version 4.44 15. Added a new option "connect=<time>" to callout options, to set a different connection timeout. +16. If FIXED_NEVER_USERS was defined, but empty, Exim was assuming the uid 0 + was its contents. (It was OK if the option was not defined at all.) + Exim version 4.43 ----------------- diff --git a/src/src/EDITME b/src/src/EDITME index 418b51bab..cea00d2c8 100644 --- a/src/src/EDITME +++ b/src/src/EDITME @@ -1,4 +1,4 @@ -# $Cambridge: exim/src/src/EDITME,v 1.3 2004/10/18 09:16:57 ph10 Exp $ +# $Cambridge: exim/src/src/EDITME,v 1.4 2004/11/05 12:33:59 ph10 Exp $ ################################################## # The Exim mail transport agent # @@ -336,8 +336,9 @@ EXIM_MONITOR=eximon.bin # cannot be overridden at runtime. This guards against problems caused by # unauthorized changes to the runtime configuration. You are advised not to # remove "root" from this option, but you can add other users if you want. The -# list is colon-separated. +# list is colon-separated. It must NOT contain any spaces. +# FIXED_NEVER_USERS=root:bin:daemon FIXED_NEVER_USERS=root diff --git a/src/src/buildconfig.c b/src/src/buildconfig.c index f596ff827..6adb5d033 100644 --- a/src/src/buildconfig.c +++ b/src/src/buildconfig.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/buildconfig.c,v 1.2 2004/10/18 09:16:57 ph10 Exp $ */ +/* $Cambridge: exim/src/src/buildconfig.c,v 1.3 2004/11/05 12:33:59 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -584,7 +584,7 @@ while (fgets(buffer, sizeof(buffer), base) != NULL) else { int count = 1; - int i; + int i, j; uid_t *vector; char *p = list; while (*p != 0) if (*p++ == ':') count++; @@ -592,17 +592,22 @@ while (fgets(buffer, sizeof(buffer), base) != NULL) vector = malloc((count+1) * sizeof(uid_t)); vector[0] = (uid_t)count; - for (i = 1; i <= count; list++, i++) + for (i = 1, j = 0; i <= count; list++, i++) { char name[64]; + p = list; while (*list != 0 && *list != ':') list++; strncpy(name, p, list-p); name[list-p] = 0; - - if (name[strspn(name, "0123456789")] == 0) + + if (name[0] == 0) + { + continue; + } + else if (name[strspn(name, "0123456789")] == 0) { - vector[i] = (uid_t)atoi(name); + vector[j++] = (uid_t)atoi(name); } else { @@ -614,13 +619,12 @@ while (fgets(buffer, sizeof(buffer), base) != NULL) name); return 1; } - vector[i] = pw->pw_uid; + vector[j++] = pw->pw_uid; } } - fprintf(new, "#define FIXED_NEVER_USERS %d, ", count); - for (i = 1; i <= count - 1; i++) - fprintf(new, "%d, ", (unsigned int)vector[i]); - fprintf(new, "%d\n", (unsigned int)vector[i]); + fprintf(new, "#define FIXED_NEVER_USERS %d", j); + for (i = 0; i < j; i++) fprintf(new, ", %d", (unsigned int)vector[i]); + fprintf(new, "\n"); } continue; } |