subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1463374 - in /subversion/trunk: subversion/include/ subversion/libsvn_repos/ subversion/mod_authz_svn/ subversion/svnserve/ subversion/tests/libsvn_repos/ tools/server-side/
Date Tue, 02 Apr 2013 03:57:54 GMT
Author: breser
Date: Tue Apr  2 03:57:54 2013
New Revision: 1463374

URL: http://svn.apache.org/r1463374
Log:
Remove the ability of svn_repos_authz_read2() to handle repos-relative URLs.

This cleans up a case where it was impossible to canonicalize the paths
being passed into it and also ends up removing the need to pass repos_root
into it.  If callers want to support repos-relative URLs then they should
resolve them into absolute file URLs and canonicalize them prior to calling
svn_repos_authz_read2().

* subversion/include/svn_repos.h
  (svn_repos_authz_read2): Remove repos_root argument and adjust documentation
    to account for no longer accepting repos-root URLs.  Also change "a file"
    in the documented formats for path to a dirent to be more precise.

* subversion/libsvn_repos/authz.c
  (authz_retrieve_config_repo, svn_repos__authz_read, svn_repos_authz_read2):
     Remove repos_root parameter and support for repos-relative URLs in path.

* subversion/libsvn_repos/deprecated.c
  (svn_repos_authz_read): Adjust call of svn_repos__authz_read().

* subversion/libsvn_repos/repos.h
  (svn_repos_authz_read): Adjust declaration and documentation to match the
    removal of repos_root and support for repos-relative URLs.

* subversion/mod_authz_svn/mod_authz_svn.c
  (canonicalize_access_file): Adjust comment about why we are not canonicalizing
    here.
  (get_access_conf): When access_file is a repos-relative URL resolve and
    canonicalize it before calling svn_repos_authz_read2().

* subversion/svnserve/serve.c
  (canonicalize_access_file): Change access_file to an arginout and return
    an svn_error_t so that we can resolve and canonicalize repos-relative
    urls.
  (load_authz_config): Adjust calls to canonicalize_access_file() due to
    above changes.

* subversion/tests/libsvn_repos/repos-test.c
  (in_repo_authz, in_repo_groups_authz): Remove repos-relative URL tests
    and convert still needed tests that were using repos-relative URls to
    absolute URLs.

* tools/server-side/svnauthz.c
  (get_authz): Fix call to svn_repos_authz_read2() to match above changes.

Modified:
    subversion/trunk/subversion/include/svn_repos.h
    subversion/trunk/subversion/libsvn_repos/authz.c
    subversion/trunk/subversion/libsvn_repos/deprecated.c
    subversion/trunk/subversion/libsvn_repos/repos.h
    subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c
    subversion/trunk/subversion/svnserve/serve.c
    subversion/trunk/subversion/tests/libsvn_repos/repos-test.c
    subversion/trunk/tools/server-side/svnauthz.c

Modified: subversion/trunk/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_repos.h?rev=1463374&r1=1463373&r2=1463374&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_repos.h (original)
+++ subversion/trunk/subversion/include/svn_repos.h Tue Apr  2 03:57:54 2013
@@ -3154,12 +3154,11 @@ svn_repos_get_fs_build_parser(const svn_
 typedef struct svn_authz_t svn_authz_t;
 
 /**
- * Read authz configuration data from @a path (a file, repos relative
- * url, an absolute file url, or a registry path) into @a *authz_p,
- * allocated in @a pool.
+ * Read authz configuration data from @a path (a dirent, an absolute file url
+ * or a registry path) into @a *authz_p, allocated in @a pool.
  *
- * If @a groups_path (a file, repos relative url, an absolute file url,
- * or a registry path) is set, use the global groups parsed from it.
+ * If @a groups_path (a dirent, an absolute file url, or a registry path) is
+ * set, use the global groups parsed from it.
  *
  * If @a path or @a groups_path is not a valid authz rule file, then return
  * #SVN_ERR_AUTHZ_INVALID_CONFIG.  The contents of @a *authz_p is then
@@ -3167,10 +3166,6 @@ typedef struct svn_authz_t svn_authz_t;
  * is also an error other than #SVN_ERR_AUTHZ_INVALID_CONFIG (exact error
  * depends on the access type).
  *
- * If @a path is a repos relative URL then @a repos_root must be set to
- * the root of the repository the authz configuration will be used with.
- * The same applies to @a groups_path if it is being used.
- *
  * @since New in 1.8.
  */
 svn_error_t *
@@ -3178,7 +3173,6 @@ svn_repos_authz_read2(svn_authz_t **auth
                       const char *path,
                       const char *groups_path,
                       svn_boolean_t must_exist,
-                      const char *repos_root,
                       apr_pool_t *pool);
 
 

Modified: subversion/trunk/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/authz.c?rev=1463374&r1=1463373&r2=1463374&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/authz.c (original)
+++ subversion/trunk/subversion/libsvn_repos/authz.c Tue Apr  2 03:57:54 2013
@@ -869,29 +869,9 @@ authz_retrieve_config_repo(svn_config_t 
  * don't have a repos relative URL in PATH. */
 static svn_error_t *
 authz_retrieve_config(svn_config_t **cfg_p, const char *path,
-                      svn_boolean_t must_exist, const char *repos_root,
-                      apr_pool_t *pool)
+                      svn_boolean_t must_exist, apr_pool_t *pool)
 {
-  if (svn_path_is_repos_relative_url(path))
-    {
-      const char *dirent;
-      svn_error_t *err;
-      apr_pool_t *scratch_pool = svn_pool_create(pool);
-
-      err = svn_path_resolve_repos_relative_url(&dirent, path,
-                                                repos_root, scratch_pool);
-      dirent = svn_dirent_canonicalize(dirent, scratch_pool);
-
-      if (err == SVN_NO_ERROR) 
-        err = authz_retrieve_config_repo(cfg_p, dirent, must_exist, pool,
-                                         scratch_pool);
-
-      /* Close the repos and streams we opened. */
-      svn_pool_destroy(scratch_pool);
-
-      return err;
-    }
-  else if (svn_path_is_url(path))
+  if (svn_path_is_url(path))
     {
       const char *dirent;
       svn_error_t *err;
@@ -956,15 +936,13 @@ authz_copy_groups(svn_authz_t *authz, sv
 svn_error_t *
 svn_repos__authz_read(svn_authz_t **authz_p, const char *path,
                       const char *groups_path, svn_boolean_t must_exist,
-                      svn_boolean_t accept_urls, const char *repos_root,
-                      apr_pool_t *pool)
+                      svn_boolean_t accept_urls, apr_pool_t *pool)
 {
   svn_authz_t *authz = apr_palloc(pool, sizeof(*authz));
 
   /* Load the authz file */
   if (accept_urls)
-    SVN_ERR(authz_retrieve_config(&authz->cfg, path, must_exist, repos_root,
-                                  pool));
+    SVN_ERR(authz_retrieve_config(&authz->cfg, path, must_exist, pool));
   else
     SVN_ERR(svn_config_read2(&authz->cfg, path, must_exist, TRUE, pool));
 
@@ -976,7 +954,7 @@ svn_repos__authz_read(svn_authz_t **auth
       /* Load the groups file */
       if (accept_urls)
         SVN_ERR(authz_retrieve_config(&groups_cfg, groups_path, must_exist,
-                                      repos_root, pool));
+                                      pool));
       else
         SVN_ERR(svn_config_read2(&groups_cfg, groups_path, must_exist,
                                  TRUE, pool));
@@ -1006,10 +984,10 @@ svn_repos__authz_read(svn_authz_t **auth
 svn_error_t *
 svn_repos_authz_read2(svn_authz_t **authz_p, const char *path,
                       const char *groups_path, svn_boolean_t must_exist,
-                      const char *repos_root, apr_pool_t *pool)
+                      apr_pool_t *pool)
 {
   return svn_repos__authz_read(authz_p, path, groups_path, must_exist,
-                               TRUE, repos_root, pool);
+                               TRUE, pool);
 }
 
 

Modified: subversion/trunk/subversion/libsvn_repos/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/deprecated.c?rev=1463374&r1=1463373&r2=1463374&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_repos/deprecated.c Tue Apr  2 03:57:54 2013
@@ -1013,5 +1013,5 @@ svn_repos_authz_read(svn_authz_t **authz
                      svn_boolean_t must_exist, apr_pool_t *pool)
 {
   return svn_repos__authz_read(authz_p, file, NULL, must_exist,
-                               FALSE, NULL, pool);
+                               FALSE, pool);
 }

Modified: subversion/trunk/subversion/libsvn_repos/repos.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/repos.h?rev=1463374&r1=1463373&r2=1463374&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/repos.h (original)
+++ subversion/trunk/subversion/libsvn_repos/repos.h Tue Apr  2 03:57:54 2013
@@ -310,25 +310,19 @@ svn_repos__hooks_post_unlock(svn_repos_t
 /* Read authz configuration data from PATH into *AUTHZ_P, allocated
    in POOL.  If GROUPS_PATH is set, use the global groups parsed from it.
 
-   PATH and GROUPS_PATH may be a file or a registry path and iff ACCEPT_URLS
-   is set it may also be a repos relative url or an absolute file url.  When
-   ACCEPT_URLS is FALSE REPOS_ROOT can be NULL.
+   PATH and GROUPS_PATH may be a dirent or a registry path and iff ACCEPT_URLS
+   is set it may also be an absolute file url.
 
    If PATH or GROUPS_PATH is not a valid authz rule file, then return 
    SVN_AUTHZ_INVALID_CONFIG.  The contents of *AUTHZ_P is then
    undefined.  If MUST_EXIST is TRUE, a missing authz or global groups file
-   is also an error.
-
-   If PATH is a repos relative URL then REPOS_ROOT must be set to
-   the root of the repository the authz configuration will be used with.
-   The same applies to GROUPS_PATH if it is being used. */
+   is also an error. */
 svn_error_t *
 svn_repos__authz_read(svn_authz_t **authz_p,
                       const char *path,
                       const char *groups_path,
                       svn_boolean_t must_exist,
                       svn_boolean_t accept_urls,
-                      const char *repos_root,
                       apr_pool_t *pool);
 
 

Modified: subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c?rev=1463374&r1=1463373&r2=1463374&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c Tue Apr  2 03:57:54 2013
@@ -110,7 +110,7 @@ canonicalize_access_file(const char *acc
     }
 
   /* We don't canonicalize repos relative urls since they get
-   * canonicalized inside svn_repos_authz_read2() when they
+   * canonicalized before calling svn_repos_authz_read2() when they
    * are resolved. */
 
   return access_file;
@@ -321,7 +321,7 @@ get_access_conf(request_rec *r, authz_sv
   const char *repos_path;
   void *user_data = NULL;
   svn_authz_t *access_conf = NULL;
-  svn_error_t *svn_err;
+  svn_error_t *svn_err = SVN_NO_ERROR;
   dav_error *dav_err;
 
   dav_err = dav_svn_get_repos_path(r, conf->base_path, &repos_path);
@@ -362,9 +362,27 @@ get_access_conf(request_rec *r, authz_sv
   access_conf = user_data;
   if (access_conf == NULL)
     {
-      svn_err = svn_repos_authz_read2(&access_conf, access_file,
-                                      conf->groups_file, TRUE, repos_path,
-                                      r->connection->pool);
+      if (svn_path_is_repos_relative_url(access_file))
+        {
+          const char *repos_url;
+          svn_err = svn_uri_get_file_url_from_dirent(&repos_url, repos_path,
+                                                     scratch_pool);
+
+          if (svn_err == SVN_NO_ERROR)
+            svn_err = svn_path_resolve_repos_relative_url(&access_file,
+                                                          access_file,
+                                                          repos_url,
+                                                          scratch_pool);
+
+          if (svn_err == SVN_NO_ERROR)
+            access_file = svn_uri_canonicalize(access_file, scratch_pool);
+        }
+
+      if (svn_err == SVN_NO_ERROR)
+        svn_err = svn_repos_authz_read2(&access_conf, access_file,
+                                        conf->groups_file, TRUE,
+                                        r->connection->pool);
+
       if (svn_err)
         {
           log_svn_error(APLOG_MARK, r,

Modified: subversion/trunk/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve.c?rev=1463374&r1=1463373&r2=1463374&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/serve.c (original)
+++ subversion/trunk/subversion/svnserve/serve.c Tue Apr  2 03:57:54 2013
@@ -308,29 +308,35 @@ svn_error_t *load_pwdb_config(server_bat
   return SVN_NO_ERROR;
 }
 
-/* Canonicalize ACCESS_FILE based on the type of argument.
- * SERVER baton is used to convert relative paths to absolute paths
- * rooted at the server root. */
-static const char *
-canonicalize_access_file(const char *access_file,
-                         server_baton_t *server,
-                         apr_pool_t *pool)
+/* Canonicalize *ACCESS_FILE based on the type of argument.  Results are
+ * placed in *ACCESS_FILE.  SERVER baton is used to convert relative paths to
+ * absolute paths rooted at the server root.  REPOS_ROOT is used to calculate
+ * an absolute URL for repos-relative URLs. */
+static svn_error_t * 
+canonicalize_access_file(const char **access_file, server_baton_t *server,
+                         const char *repos_root, apr_pool_t *pool)
 {
-  if (svn_path_is_url(access_file))
+  if (svn_path_is_url(*access_file))
     {
-      access_file = svn_uri_canonicalize(access_file, pool);
+      *access_file = svn_uri_canonicalize(*access_file, pool);
     }
-  else if (!svn_path_is_repos_relative_url(access_file))
+  else if (svn_path_is_repos_relative_url(*access_file))
     {
-      access_file = svn_dirent_internal_style(access_file, pool);
-      access_file = svn_dirent_join(server->base, access_file, pool);
-    }
+      const char *repos_root_url;
 
-  /* We don't canonicalize repos relative urls since they get
-   * canonicalized inside svn_repos_authz_read2() when they
-   * are resolved. */
+      SVN_ERR(svn_uri_get_file_url_from_dirent(&repos_root_url, repos_root,
+                                               pool));
+      SVN_ERR(svn_path_resolve_repos_relative_url(access_file, *access_file,
+                                                  repos_root_url, pool));
+      *access_file = svn_uri_canonicalize(*access_file, pool);
+    }
+  else
+    {
+      *access_file = svn_dirent_internal_style(*access_file, pool);
+      *access_file = svn_dirent_join(server->base, *access_file, pool);
+    }
 
-  return access_file;
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *load_authz_config(server_baton_t *server,
@@ -354,15 +360,17 @@ svn_error_t *load_authz_config(server_ba
       const char *case_force_val;
 
       /* Canonicalize and add the base onto the authzdb_path (if needed). */
-      authzdb_path = canonicalize_access_file(authzdb_path, server, pool);
+      err = canonicalize_access_file(&authzdb_path, server,
+                                     repos_root, pool);
 
       /* Same for the groupsdb_path if it is present. */
-      if (groupsdb_path)
-        groupsdb_path = canonicalize_access_file(groupsdb_path,
-                                                 server, pool);
+      if (groupsdb_path && !err)
+        canonicalize_access_file(&groupsdb_path, server, repos_root, pool);
+
+      if (!err)
+        err = svn_repos_authz_read2(&server->authzdb, authzdb_path,
+                                    groupsdb_path, TRUE, pool);
 
-      err = svn_repos_authz_read2(&server->authzdb, authzdb_path,
-                                  groupsdb_path, TRUE, repos_root, pool);
       if (err)
         {
           log_server_error(err, server, conn, pool);

Modified: subversion/trunk/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_repos/repos-test.c?rev=1463374&r1=1463373&r2=1463374&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_repos/repos-test.c Tue Apr  2 03:57:54 2013
@@ -1402,6 +1402,7 @@ in_repo_authz(const svn_test_opts_t *opt
   const char *repos_root;
   const char *repos_url;
   const char *authz_url;
+  const char *noent_authz_url;
   svn_error_t *err;
   struct check_access_tests test_set[] = {
     /* reads */
@@ -1448,28 +1449,22 @@ in_repo_authz(const svn_test_opts_t *opt
                                       pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
-
-  /* repos relative URL */
+  
   repos_root = svn_repos_path(repos, pool);
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, "^/authz", NULL, TRUE,
-                                repos_root, pool));
-  SVN_ERR(authz_check_access(authz_cfg, test_set, pool));
-
-  /* absolute file URL, repos_root is NULL to validate the contract that it
-   * is not needed except when a repos relative URL is passed. */
   SVN_ERR(svn_uri_get_file_url_from_dirent(&repos_url, repos_root, pool));
   authz_url = apr_pstrcat(pool, repos_url, "/authz", (char *)NULL);
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, authz_url, NULL, TRUE,
-                                NULL, pool));
+  noent_authz_url = apr_pstrcat(pool, repos_url, "/A/authz", (char *)NULL);
+
+  /* absolute file URL. */
+  SVN_ERR(svn_repos_authz_read2(&authz_cfg, authz_url, NULL, TRUE, pool));
   SVN_ERR(authz_check_access(authz_cfg, test_set, pool));
   
   /* Non-existant path in the repo with must_exist set to FALSE */ 
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, "^/A/authz", NULL, FALSE,
-                                repos_root, pool));
+  SVN_ERR(svn_repos_authz_read2(&authz_cfg, noent_authz_url, NULL,
+                                FALSE, pool));
 
   /* Non-existant path in the repo with must_exist set to TRUE */ 
-  err = svn_repos_authz_read2(&authz_cfg, "^/A/authz", NULL, TRUE,
-                              repos_root, pool);
+  err = svn_repos_authz_read2(&authz_cfg, noent_authz_url, NULL, TRUE, pool);
   if (!err || err->apr_err != SVN_ERR_ILLEGAL_TARGET)
     return svn_error_createf(SVN_ERR_TEST_FAILED, err,
                              "Got %s error instead of expected "
@@ -1479,7 +1474,7 @@ in_repo_authz(const svn_test_opts_t *opt
 
   /* http:// URL which is unsupported */
   err = svn_repos_authz_read2(&authz_cfg, "http://example.com/repo/authz",
-                              NULL, TRUE, repos_root, pool);
+                              NULL, TRUE, pool);
   if (!err || err->apr_err != SVN_ERR_RA_ILLEGAL_URL)
     return svn_error_createf(SVN_ERR_TEST_FAILED, err,
                              "Got %s error instead of expected "
@@ -1489,7 +1484,7 @@ in_repo_authz(const svn_test_opts_t *opt
 
   /* svn:// URL which is unsupported */
   err = svn_repos_authz_read2(&authz_cfg, "svn://example.com/repo/authz",
-                              NULL, TRUE, repos_root, pool);
+                              NULL, TRUE, pool);
   if (!err || err->apr_err != SVN_ERR_RA_ILLEGAL_URL)
     return svn_error_createf(SVN_ERR_TEST_FAILED, err,
                              "Got %s error instead of expected "
@@ -1518,7 +1513,10 @@ in_repo_groups_authz(const svn_test_opts
   const char *repos_root;
   const char *repos_url;
   const char *groups_url;
+  const char *noent_groups_url;
   const char *authz_url;
+  const char *empty_authz_url;
+  const char *noent_authz_url;
   svn_error_t *err;
   struct check_access_tests test_set[] = {
     /* reads */
@@ -1590,38 +1588,35 @@ in_repo_groups_authz(const svn_test_opts
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
-  /* repos relative URLs */
+  /* Calculate URLs */
   repos_root = svn_repos_path(repos, pool);
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, "^/authz", "^/groups",
-                                TRUE, repos_root, pool));
-  SVN_ERR(authz_check_access(authz_cfg, test_set, pool));
-
-  /* absolute file URLs, repos_root is NULL to validate the contract that it
-   * is not needed except when a repos relative URLs are passed. */
   SVN_ERR(svn_uri_get_file_url_from_dirent(&repos_url, repos_root, pool));
   authz_url = apr_pstrcat(pool, repos_url, "/authz", (char *)NULL);
+  empty_authz_url = apr_pstrcat(pool, repos_url, "/empty-authz", (char *)NULL);
+  noent_authz_url = apr_pstrcat(pool, repos_url, "/A/authz", (char *)NULL);
+  groups_url = apr_pstrcat(pool, repos_url, "/groups", (char *)NULL);
+  noent_groups_url = apr_pstrcat(pool, repos_url, "/A/groups", (char *)NULL);
+
+
+  /* absolute file URLs. */
   groups_url = apr_pstrcat(pool, repos_url, "/groups", (char *)NULL);
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, authz_url, groups_url,
-                                TRUE, NULL, pool));
+  SVN_ERR(svn_repos_authz_read2(&authz_cfg, authz_url, groups_url, TRUE, pool));
   SVN_ERR(authz_check_access(authz_cfg, test_set, pool));
 
   /* Non-existent path for the groups file with must_exist
    * set to TRUE */
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, "^/empty-authz",
-                                "^/A/groups", FALSE,
-                                repos_root, pool));
+  SVN_ERR(svn_repos_authz_read2(&authz_cfg, empty_authz_url, noent_groups_url,
+                                FALSE, pool));
 
   /* Non-existent paths for both the authz and the groups files
    * with must_exist set to TRUE */
-  SVN_ERR(svn_repos_authz_read2(&authz_cfg, "^/A/authz",
-                                "^/A/groups", FALSE,
-                                repos_root, pool));
+  SVN_ERR(svn_repos_authz_read2(&authz_cfg, noent_authz_url, noent_groups_url,
+                                FALSE, pool));
 
   /* Non-existent path for the groups file with must_exist
    * set to TRUE */
-  err = svn_repos_authz_read2(&authz_cfg, "^/empty-authz",
-                              "^/A/groups", TRUE,
-                              repos_root, pool);
+  err = svn_repos_authz_read2(&authz_cfg, empty_authz_url, noent_groups_url,
+                              TRUE, pool);
   if (!err || err->apr_err != SVN_ERR_ILLEGAL_TARGET)
     return svn_error_createf(SVN_ERR_TEST_FAILED, err,
                              "Got %s error instead of expected "
@@ -1630,9 +1625,9 @@ in_repo_groups_authz(const svn_test_opts
   svn_error_clear(err);
 
   /* http:// URL which is unsupported */
-  err = svn_repos_authz_read2(&authz_cfg, "^/empty-authz",
+  err = svn_repos_authz_read2(&authz_cfg, empty_authz_url,
                               "http://example.com/repo/groups",
-                              TRUE, repos_root, pool);
+                              TRUE, pool);
   if (!err || err->apr_err != SVN_ERR_RA_ILLEGAL_URL)
     return svn_error_createf(SVN_ERR_TEST_FAILED, err,
                              "Got %s error instead of expected "
@@ -1641,9 +1636,9 @@ in_repo_groups_authz(const svn_test_opts
   svn_error_clear(err);
 
   /* svn:// URL which is unsupported */
-  err = svn_repos_authz_read2(&authz_cfg, "^/empty-authz",
+  err = svn_repos_authz_read2(&authz_cfg, empty_authz_url,
                               "http://example.com/repo/groups",
-                              TRUE, repos_root, pool);
+                              TRUE, pool);
   if (!err || err->apr_err != SVN_ERR_RA_ILLEGAL_URL)
     return svn_error_createf(SVN_ERR_TEST_FAILED, err,
                              "Got %s error instead of expected "
@@ -1687,7 +1682,7 @@ authz_groups_get_handle(svn_authz_t **au
 
       /* Read the authz configuration back and start testing. */
       SVN_ERR_W(svn_repos_authz_read2(authz_p, authz_file_path,
-                                      groups_file_path, TRUE, NULL, pool),
+                                      groups_file_path, TRUE, pool),
                 "Opening test authz and groups files");
 
       /* Done with the files. */

Modified: subversion/trunk/tools/server-side/svnauthz.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svnauthz.c?rev=1463374&r1=1463373&r2=1463374&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svnauthz.c (original)
+++ subversion/trunk/tools/server-side/svnauthz.c Tue Apr  2 03:57:54 2013
@@ -268,7 +268,7 @@ get_authz(svn_authz_t **authz, struct sv
   /* Else */
   return svn_repos_authz_read2(authz, opt_state->authz_file,
                                opt_state->groups_file,
-                               TRUE, NULL, pool);
+                               TRUE, pool);
 }
 
 static svn_error_t *



Mime
View raw message