[exim-dev] [patch] Need to extract trusted_users from a file…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Jonathan Sambrook
Datum:  
To: exim-dev
Betreff: [exim-dev] [patch] Need to extract trusted_users from a file -> expandable uidlists
To facilitate extacting the contents of the config setting 'trusted_users' from a file, I've created the attached patch which makes the config type 'uidlists' expandable.

(For completeness I've attached a patch doing the same for gidlists, though I don't currently need this myself.)

Regards,
Jonathan

Index: exim-4.52/src/readconf.c
===================================================================
--- exim-4.52.orig/src/readconf.c    2005-09-15 11:01:29.%N +0100
+++ exim-4.52/src/readconf.c    2005-09-15 12:29:57.%N +0100
@@ -1658,7 +1658,8 @@
       int count = 1;
       gid_t *list;
       int ptr = 0;
-      uschar *p = sptr;
+      uschar *op = expand_string (sptr);
+      uschar *p = op;


       if (*p != 0) count++;
       while (*p != 0) if (*p++ == ':') count++;
@@ -1670,7 +1671,7 @@
       else
         *((gid_t **)((uschar *)data_block + (long int)(ol->value))) = list;


-      p = sptr;
+      p = op;
       while (count-- > 1)
         {
         int sep = 0;

Index: exim-4.52/src/readconf.c
===================================================================
--- exim-4.52.orig/src/readconf.c    2005-09-15 11:01:26.%N +0100
+++ exim-4.52/src/readconf.c    2005-09-15 12:30:16.%N +0100
@@ -1622,7 +1622,8 @@
       int count = 1;
       uid_t *list;
       int ptr = 0;
-      uschar *p = sptr;
+      uschar *op = expand_string (sptr);
+      uschar *p = op;


       if (*p != 0) count++;
       while (*p != 0) if (*p++ == ':') count++;
@@ -1634,7 +1635,7 @@
       else
         *((uid_t **)((uschar *)data_block + (long int)(ol->value))) = list;


-      p = sptr;
+      p = op;
       while (count-- > 1)
         {
         int sep = 0;