--- subversion/libsvn_subr/config.c.orig	2008-05-28 15:42:11.000000000 +0200
+++ subversion/libsvn_subr/config.c	2008-05-28 16:05:19.000000000 +0200
@@ -24,6 +24,7 @@
 
 #include <apr_general.h>
 #include <apr_lib.h>
+#include <apr_fnmatch.h>
 #include "svn_error.h"
 #include "svn_pools.h"
 #include "config_impl.h"
@@ -356,6 +357,38 @@
 }
 
 
+/* Find a matching section in the configuration with wildcard support
+   Return a pointer to a section in CFG, or NULL if it doesn't exist. */
+static cfg_section_t *
+find_section(svn_config_t *cfg, const char *section, apr_pool_t *pool)
+{
+  apr_hash_index_t *sec_ndx;
+  apr_pool_t *iteration_pool;
+  cfg_section_t * sectionp = NULL;
+  int count = 0;
+
+  iteration_pool = svn_pool_create(pool);
+  for (sec_ndx = apr_hash_first(iteration_pool, cfg->sections);
+       sec_ndx != NULL;
+       sec_ndx = apr_hash_next(sec_ndx))
+    {
+      void *sec_ptr;
+      const void *sec_name;
+
+      apr_hash_this(sec_ndx, &sec_name, NULL, &sec_ptr);
+      if (apr_fnmatch(sec_name, section, APR_FNM_PATHNAME | APR_FNM_CASE_BLIND) == APR_SUCCESS) {
+              sectionp = sec_ptr;
+              break;
+      }
+      ++count;
+      svn_pool_clear(iteration_pool);
+    }
+  svn_pool_destroy(iteration_pool);
+
+  return sectionp;
+}
+
+
 /* Return a pointer to an option in CFG, or NULL if it doesn't exist.
    if SECTIONP is non-null, return a pointer to the option's section.
    OPTION may be NULL. */
@@ -794,7 +827,7 @@
   apr_pool_t *iteration_pool;
   int count;
 
-  find_option(cfg, section, NULL, &sec);
+  sec = find_section(cfg, section, pool);
   if (sec == NULL)
     return 0;
 


