diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-09-19 14:01:51 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-09-19 14:01:51 +0000 |
commit | 0925ede6bf47dea696153c927418025ad59a903c (patch) | |
tree | 2b4b9c9d3719ecb52ececcb8abf84789d09aeed0 /src | |
parent | 6af56900ac77d083b8c3abc76bd808e6718412ee (diff) |
Expand uidlists and gidlists (admin_groups, never_users, trusted_users,
trusted_groups).
Diffstat (limited to 'src')
-rw-r--r-- | src/ACKNOWLEDGMENTS | 3 | ||||
-rw-r--r-- | src/src/readconf.c | 26 |
2 files changed, 21 insertions, 8 deletions
diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index 9b60b6f30..abaa254b3 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -1,4 +1,4 @@ -$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.35 2005/09/19 11:56:11 ph10 Exp $ +$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.36 2005/09/19 14:01:51 ph10 Exp $ EXIM ACKNOWLEDGEMENTS @@ -208,6 +208,7 @@ Alexander Sabourenkov Patch to add saslauthd daemon support Patch for MySQL non-data queries David Saez Suggested patch for $sender_hostname lookup if needed Support for the clamd virus scanner +Jonathan Sambrook Suggested patch for expanding uid and gid lists Peter Savitch Diagnosis of FPE bug when statvfs() fails on spool Harald Schueler Patch for dn_expand() failure on truncated data Heiko Schlichting Diagnosis of intermittent daemon crash bug diff --git a/src/src/readconf.c b/src/src/readconf.c index 3ceece489..2a0b9d120 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/readconf.c,v 1.13 2005/09/19 11:56:11 ph10 Exp $ */ +/* $Cambridge: exim/src/src/readconf.c,v 1.14 2005/09/19 14:01:51 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1625,10 +1625,16 @@ switch (type) int count = 1; uid_t *list; int ptr = 0; - uschar *p = sptr; + uschar *p; + uschar *op = expand_string (sptr); + + if (op == NULL) + log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN, "failed to expand %s: %s", + name, expand_string_message); + p = op; if (*p != 0) count++; - while (*p != 0) if (*p++ == ':') count++; + while (*p != 0) if (*p++ == ':' && *p != 0) count++; list = store_malloc(count*sizeof(uid_t)); list[ptr++] = (uid_t)(count - 1); @@ -1637,7 +1643,7 @@ switch (type) else *((uid_t **)((uschar *)data_block + (long int)(ol->value))) = list; - p = sptr; + p = op; while (count-- > 1) { int sep = 0; @@ -1660,10 +1666,16 @@ switch (type) int count = 1; gid_t *list; int ptr = 0; - uschar *p = sptr; + uschar *p; + uschar *op = expand_string (sptr); + + if (op == NULL) + log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN, "failed to expand %s: %s", + name, expand_string_message); + p = op; if (*p != 0) count++; - while (*p != 0) if (*p++ == ':') count++; + while (*p != 0) if (*p++ == ':' && *p != 0) count++; list = store_malloc(count*sizeof(gid_t)); list[ptr++] = (gid_t)(count - 1); @@ -1672,7 +1684,7 @@ switch (type) else *((gid_t **)((uschar *)data_block + (long int)(ol->value))) = list; - p = sptr; + p = op; while (count-- > 1) { int sep = 0; |