subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1778923 - /subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c
Date Sun, 15 Jan 2017 13:54:47 GMT
Author: stefan2
Date: Sun Jan 15 13:54:47 2017
New Revision: 1778923

URL: http://svn.apache.org/viewvc?rev=1778923&view=rev
Log:
Ensure that even long-lived DAV connections use up-to-date authz.

The new authz implementation makes this feasible for authz files
of up to a few MB as well as in-repository authz of any size.

This has been a user-reported problem with setups where Apache was
behind some proxy server and connected to it by a few long-lived
connections.  As a consequence, any current connection will see
authz changes immediately.  The effect to a running c/o however,
is not different from a suitable partial checkout before the change
that then gets updated with --set-depth after the authz change.

* subversion/mod_authz_svn/mod_authz_svn.c
  (get_access_conf): Always return an up-to-date authz configuration.

Modified:
    subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c

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=1778923&r1=1778922&r2=1778923&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c Sun Jan 15 13:54:47 2017
@@ -401,7 +401,6 @@ static svn_authz_t *
 get_access_conf(request_rec *r, authz_svn_config_rec *conf,
                 apr_pool_t *scratch_pool)
 {
-  const char *cache_key = NULL;
   const char *access_file;
   const char *groups_file;
   const char *repos_path;
@@ -466,31 +465,19 @@ get_access_conf(request_rec *r, authz_sv
                     "Path to groups file is %s", groups_file);
     }
 
-  cache_key = apr_pstrcat(scratch_pool, "mod_authz_svn:",
-                          access_file, groups_file, SVN_VA_NULL);
-  apr_pool_userdata_get(&user_data, cache_key, r->connection->pool);
-  access_conf = user_data;
-  if (access_conf == NULL)
-    {
-      svn_err = svn_repos_authz_read3(&access_conf, access_file,
-                                      groups_file, TRUE, NULL,
-                                      r->connection->pool,
-                                      scratch_pool);
+  svn_err = svn_repos_authz_read3(&access_conf,
+                                  access_file, groups_file,
+                                  TRUE, NULL,
+                                  r->connection->pool, scratch_pool);
 
-      if (svn_err)
-        {
-          log_svn_error(APLOG_MARK, r,
-                        "Failed to load the mod_authz_svn config:",
-                        svn_err, scratch_pool);
-          access_conf = NULL;
-        }
-      else
-        {
-          /* Cache the open repos for the next request on this connection */
-          apr_pool_userdata_set(access_conf, cache_key,
-                                NULL, r->connection->pool);
-        }
+  if (svn_err)
+    {
+      log_svn_error(APLOG_MARK, r,
+                    "Failed to load the mod_authz_svn config:",
+                    svn_err, scratch_pool);
+      access_conf = NULL;
     }
+
   return access_conf;
 }
 



Mime
View raw message