ph10 2005/09/19 15:01:51 BST
Modified files:
exim-doc/doc-txt ChangeLog NewStuff
exim-src ACKNOWLEDGMENTS
exim-src/src readconf.c
exim-test-orig/AutoTest/log 578
exim-test-orig/AutoTest/scripts 578
exim-test-orig/AutoTest/stderr 578
exim-test-orig/AutoTest/stdout 578
Log:
Expand uidlists and gidlists (admin_groups, never_users, trusted_users,
trusted_groups).
Revision Changes Path
1.237 +2 -0 exim/exim-doc/doc-txt/ChangeLog
1.73 +3 -0 exim/exim-doc/doc-txt/NewStuff
1.36 +1 -0 exim/exim-src/ACKNOWLEDGMENTS
1.14 +18 -6 exim/exim-src/src/readconf.c
1.7 +4 -0 exim/exim-test-orig/AutoTest/log/578
1.3 +19 -1 exim/exim-test-orig/AutoTest/scripts/578
1.4 +1 -0 exim/exim-test-orig/AutoTest/stderr/578
1.5 +14 -0 exim/exim-test-orig/AutoTest/stdout/578
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -r1.236 -r1.237
--- ChangeLog 19 Sep 2005 11:56:11 -0000 1.236
+++ ChangeLog 19 Sep 2005 14:01:51 -0000 1.237
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.236 2005/09/19 11:56:11 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.237 2005/09/19 14:01:51 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -209,6 +209,8 @@
PH/49 Michael Haardt's randomized retrying, but as a separate retry parameter
type ("H").
+
+PH/50 Make never_users, trusted_users, admin_groups, trusted_groups expandable.
Exim version 4.52
Index: NewStuff
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/NewStuff,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- NewStuff 19 Sep 2005 11:56:11 -0000 1.72
+++ NewStuff 19 Sep 2005 14:01:51 -0000 1.73
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.72 2005/09/19 11:56:11 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.73 2005/09/19 14:01:51 ph10 Exp $
New Features in Exim
--------------------
@@ -164,6 +164,9 @@
found to be helpful in cluster configurations when all the members of the
cluster restart at once, and may synchronize their queue processing
times.
+
+PH/14 The options never_users, trusted_users, admin_groups, and trusted_groups
+ are now expanded when the configuration file is read.
Exim version 4.52
Index: ACKNOWLEDGMENTS
===================================================================
RCS file: /home/cvs/exim/exim-src/ACKNOWLEDGMENTS,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- ACKNOWLEDGMENTS 19 Sep 2005 11:56:11 -0000 1.35
+++ ACKNOWLEDGMENTS 19 Sep 2005 14:01:51 -0000 1.36
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-src/ACKNOWLEDGMENTS,v 1.35 2005/09/19 11:56:11 ph10 Exp $
+$Cambridge: exim/exim-src/ACKNOWLEDGMENTS,v 1.36 2005/09/19 14:01:51 ph10 Exp $
EXIM ACKNOWLEDGEMENTS
@@ -208,6 +208,7 @@
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
Index: readconf.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/readconf.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- readconf.c 19 Sep 2005 11:56:11 -0000 1.13
+++ readconf.c 19 Sep 2005 14:01:51 -0000 1.14
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/readconf.c,v 1.13 2005/09/19 11:56:11 ph10 Exp $ */
+/* $Cambridge: exim/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 @@
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 @@
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 @@
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 @@
else
*((gid_t **)((uschar *)data_block + (long int)(ol->value))) = list;
- p = sptr;
+ p = op;
while (count-- > 1)
{
int sep = 0;
Index: 578
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/log/578,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- 578 7 Sep 2005 10:15:33 -0000 1.6
+++ 578 19 Sep 2005 14:01:51 -0000 1.7
@@ -60,3 +60,7 @@
1999-03-02 09:44:33 10HmaX-0005vi-00 ** badport2@z mua_wrapper forced failure for deferred delivery
1999-03-02 09:44:33 10HmaX-0005vi-00 ** badport1@z mua_wrapper forced failure for deferred delivery
1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbM-0005vi-00 <= <> U=ph10 P=local S=230
+1999-03-02 09:44:33 10HmbM-0005vi-00 ** a@??? R=r9 T=t1: SMTP error from remote mail server after RCPT TO:<a@???>: host 127.0.0.1 [127.0.0.1]: 550 SORRY
+1999-03-02 09:44:33 10HmbM-0005vi-00 ** a@??? mua_wrapper forced failure for deferred delivery
+1999-03-02 09:44:33 10HmbM-0005vi-00 Completed
Index: 578
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/scripts/578,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- 578 28 Jun 2005 10:23:35 -0000 1.2
+++ 578 19 Sep 2005 14:01:51 -0000 1.3
@@ -206,4 +206,22 @@
exim badport1@z badport2@z
This should fail because of a bad port definition.
****
-no_msglog_check
+0
+server 1225
+220 Server ready
+EHLO
+250-server id
+250-PIPELINING
+250 OK
+MAIL FROM
+250 OK
+RCPT TO
+550 SORRY
+QUIT
+221 BYE
+****
+# Test for an empty sender
+1
+exim -f '<>' a@???
+This should fail.
+****
Index: 578
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/stderr/578,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- 578 28 Jun 2005 10:23:36 -0000 1.3
+++ 578 19 Sep 2005 14:01:51 -0000 1.4
@@ -11,3 +11,4 @@
Delivery failed: Connection refused
Delivery failed: Connection timed out: SMTP timeout while connected to ::1 [::1] after RCPT TO:<b@???>
Delivery failed: TCP port "nonexistent" is not defined for t4 transport
+Delivery failed: SMTP error from remote mail server after RCPT TO:<a@???>: host 127.0.0.1 [127.0.0.1]: 550 SORRY
Index: 578
===================================================================
RCS file: /home/cvs/exim/exim-test-orig/AutoTest/stdout/578,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- 578 7 Sep 2005 10:15:34 -0000 1.4
+++ 578 19 Sep 2005 14:01:51 -0000 1.5
@@ -173,3 +173,17 @@
RCPT TO:<b@???>
*sleep 2
End of script
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+220 Server ready
+EHLO myhost.test.ex
+250-server id
+250-PIPELINING
+250 OK
+MAIL FROM:<>
+250 OK
+RCPT TO:<a@???>
+550 SORRY
+QUIT
+221 BYE
+End of script