Testsuite: fix to ignore SUPPORT_PROXY debug output difference
[exim.git] / src / src / readconf.c
index 10ebc5e17f89aa40ffb7162788a0b89aab1f4078..cba33ac35bcd7ccdcc39097bdb2fc63c41a03005 100644 (file)
@@ -285,6 +285,9 @@ static optionlist optionlist_config[] = {
   { "host_lookup_order",        opt_stringptr,   &host_lookup_order },
   { "host_reject_connection",   opt_stringptr,   &host_reject_connection },
   { "hosts_connection_nolog",   opt_stringptr,   &hosts_connection_nolog },
+#ifdef SUPPORT_PROXY
+  { "hosts_proxy",              opt_stringptr,   &proxy_required_hosts },
+#endif
   { "hosts_treat_as_local",     opt_stringptr,   &hosts_treat_as_local },
 #ifdef LOOKUP_IBASE
   { "ibase_servers",            opt_stringptr,   &ibase_servers },
@@ -354,9 +357,6 @@ static optionlist optionlist_config[] = {
   { "print_topbitchars",        opt_bool,        &print_topbitchars },
   { "process_log_path",         opt_stringptr,   &process_log_path },
   { "prod_requires_admin",      opt_bool,        &prod_requires_admin },
-#ifdef EXPERIMENTAL_PROXY
-  { "proxy_required_hosts",     opt_stringptr,   &proxy_required_hosts },
-#endif
   { "qualify_domain",           opt_stringptr,   &qualify_domain_sender },
   { "qualify_recipient",        opt_stringptr,   &qualify_domain_recipient },
   { "queue_domains",            opt_stringptr,   &queue_domains },
@@ -2534,7 +2534,9 @@ causes the value of any main configuration variable to be output if the
 second argument is NULL. There are some special values:
 
   all                print all main configuration options
-  configure_file     print the name of the configuration file
+  config_file        print the name of the configuration file
+                     (configure_file will still work, for backward
+                     compatibility)
   routers            print the routers' configurations
   transports         print the transports' configuration
   authenticators     print the authenticators' configuration
@@ -2602,7 +2604,8 @@ if (type == NULL)
     return;
     }
 
-  if (Ustrcmp(name, "configure_file") == 0)
+  if ( Ustrcmp(name, "configure_file") == 0
+     ||Ustrcmp(name, "config_file") == 0)
     {
     printf("%s\n", CS config_main_filename);
     return;
@@ -4243,7 +4246,8 @@ save_config_position(const uschar *file, int line)
 
 /* Append a pre-parsed logical line to the config lines store,
 this operates on a global (static) list that holds all the pre-parsed
-config lines */
+config lines, we do no further processing here, output formatting and
+honouring of <hide> or macros will be done during output */
 static void
 save_config_line(const uschar* line)
 {
@@ -4306,20 +4310,23 @@ for (i = config_lines; i; i = i->next)
     continue;
     }
 
-  /* as admin we don't care, as we do for "public" lines */
-  if (admin || (!isupper(*current) && (strcmp(current, "hide") != 0)))
+  /* hidden lines (MACROS or prefixed with hide) */
+  if (!admin && (isupper(*current)
+    || (strncmp(current, "hide", 4) == 0 && isspace(current[4]))))
     {
-    printf("%*s%s\n", indent, "", current);
+    if (p = strchr(current, '='))
+      {
+      *p = '\0';
+      printf("%*s%s = %s\n", indent, "", current, hidden);
+      }
+    /* e.g.: hide split_spool_directory */
+    else printf("%*s\n", indent, hidden);
     continue;
     }
 
-  /* hidden lines */
-  if (p = strchr(current, '='))
-    {
-    *p = '\0';
-    printf("%*s%s = %s\n", indent, "", current, hidden);
-    continue;
-    }
+  /* rest is public */
+  printf("%*s%s\n", indent, "", current);
+  continue;
   }
 }