Allow only Exim or CONFIGURE_OWNER to use whitelisted configs with -C
[exim.git] / src / src / exim.c
index 7498682316ce34a6101340dccd7a464cb84f1a8d..d5067215156185a8bbc9c202db5b4050efcb31ca 100644 (file)
@@ -1973,7 +1973,11 @@ for (i = 1; i < argc; i++)
         {
         #ifdef TRUSTED_CONFIG_PREFIX_LIST
 
-       if (Ustrstr(argrest, "/../"))
+        if ((real_uid != exim_uid
+             #ifdef CONFIGURE_OWNER
+             && real_uid != config_uid
+             #endif
+             ) || Ustrstr(argrest, "/../"))
           trusted_config = FALSE;
         else
           {