subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1770422 - in /subversion/branches/authzperf/subversion: include/private/svn_repos_private.h libsvn_repos/authz_pool.c svnserve/serve.c svnserve/server.h svnserve/svnserve.c
Date Fri, 18 Nov 2016 18:43:28 GMT
Author: stefan2
Date: Fri Nov 18 18:43:28 2016
New Revision: 1770422

URL: http://svn.apache.org/viewvc?rev=1770422&view=rev
Log:
On the authzperf branch:
Get rid of the obsolete svnserve-specific authz caching.

* subversion/include/private/svn_repos_private.h
  (svn_repos__authz_pool_t,
   svn_repos__authz_pool_create,
   svn_repos__authz_pool_get): Remove obsolete private API.

* subversion/libsvn_repos/authz_pool.c
  (): Delete file.

* subversion/svnserve/server.h
  (serve_params_t): Remove authz cache instance.

* subversion/svnserve/serve.c
  (load_authz_config,
   find_repos,
   construct_server_baton): There's no authz cache to use here anymore.

* subversion/svnserve/svnserve.c
  (sub_main): No private authz cache to initialize anymore.

Removed:
    subversion/branches/authzperf/subversion/libsvn_repos/authz_pool.c
Modified:
    subversion/branches/authzperf/subversion/include/private/svn_repos_private.h
    subversion/branches/authzperf/subversion/svnserve/serve.c
    subversion/branches/authzperf/subversion/svnserve/server.h
    subversion/branches/authzperf/subversion/svnserve/svnserve.c

Modified: subversion/branches/authzperf/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/include/private/svn_repos_private.h?rev=1770422&r1=1770421&r2=1770422&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/authzperf/subversion/include/private/svn_repos_private.h Fri Nov 18
18:43:28 2016
@@ -203,62 +203,6 @@ svn_repos__config_pool_get(svn_config_t
 
 /** @} */
 
-/**
- * @defgroup svn_authz_pool Authz object pool API
- * @{
- */
-
-/* Opaque thread-safe factory and container for authorization objects.
- *
- * Instances handed out are read-only and may be given to multiple callers
- * from multiple threads.  Authorization objects no longer referenced by
- * any user may linger for a while before being cleaned up.
- */
-typedef struct svn_repos__authz_pool_t svn_repos__authz_pool_t;
-
-/* Create a new authorization pool object with a lifetime determined by
- * POOL and return it in *AUTHZ_POOL.  CONFIG_POOL will be the common
- * source for the configuration data underlying the authz objects and must
- * remain valid at least until POOL cleanup.
- *
- * The THREAD_SAFE flag indicates whether the pool actually needs to be
- * thread-safe and POOL must be also be thread-safe if this flag is set.
- */
-svn_error_t *
-svn_repos__authz_pool_create(svn_repos__authz_pool_t **authz_pool,
-                             svn_repos__config_pool_t *config_pool,
-                             svn_boolean_t thread_safe,
-                             apr_pool_t *pool);
-
-/* Set *AUTHZ_P to a read-only reference to the current contents of the
- * authorization specified by PATH and GROUPS_PATH.  If these are URLs,
- * we read the data from a local repository (see #svn_repos_authz_read2).
- * AUTHZ_POOL will store the authz data and make further callers use the
- * same instance if the content matches.
- *
- * If MUST_EXIST is TRUE, a missing config file is also an error, *AUTHZ_P
- * is otherwise simply NULL.
- *
- * PREFERRED_REPOS is only used if it is not NULL and PATH is a URL.
- * If it matches the URL, access the repository through this object
- * instead of creating a new repo instance.  Note that this might not
- * return the latest content.
- *
- * POOL determines the minimum lifetime of *AUTHZ_P (may remain cached
- * after release) but must not exceed the lifetime of the pool provided to
- * svn_repos__authz_pool_create.
- */
-svn_error_t *
-svn_repos__authz_pool_get(svn_authz_t **authz_p,
-                          svn_repos__authz_pool_t *authz_pool,
-                          const char *path,
-                          const char *groups_path,
-                          svn_boolean_t must_exist,
-                          svn_repos_t *preferred_repos,
-                          apr_pool_t *pool);
-
-/** @} */
-
 /* Adjust mergeinfo paths and revisions in ways that are useful when loading
  * a dump stream.
  *

Modified: subversion/branches/authzperf/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svnserve/serve.c?rev=1770422&r1=1770421&r2=1770422&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svnserve/serve.c (original)
+++ subversion/branches/authzperf/subversion/svnserve/serve.c Fri Nov 18 18:43:28 2016
@@ -285,8 +285,8 @@ canonicalize_access_file(const char **ac
   return SVN_NO_ERROR;
 }
 
-/* Load the authz database for the listening server through AUTHZ_POOL
-   based on the entries in the SERVER struct.
+/* Load the authz database for the listening server based on the entries
+   in the SERVER struct.
 
    SERVER and CONN must not be NULL. The real errors will be logged with
    SERVER and CONN but return generic errors to the client. */
@@ -294,7 +294,6 @@ static svn_error_t *
 load_authz_config(repository_t *repository,
                   const char *repos_root,
                   svn_config_t *cfg,
-                  svn_repos__authz_pool_t *authz_pool,
                   apr_pool_t *pool)
 {
   const char *authzdb_path;
@@ -3616,8 +3615,7 @@ repos_path_valid(const char *path)
  * and fs_path fields of REPOSITORY.  VHOST and READ_ONLY flags are the
  * same as in the server baton.
  *
- * CONFIG_POOL and AUTHZ_POOL shall be used to load any object of the
- * respective type.
+ * CONFIG_POOL shall be used to load config objects.
  *
  * Use SCRATCH_POOL for temporary allocations.
  *
@@ -3630,7 +3628,6 @@ find_repos(const char *url,
            svn_config_t *cfg,
            repository_t *repository,
            svn_repos__config_pool_t *config_pool,
-           svn_repos__authz_pool_t *authz_pool,
            apr_hash_t *fs_config,
            apr_pool_t *result_pool,
            apr_pool_t *scratch_pool)
@@ -3708,7 +3705,7 @@ find_repos(const char *url,
 
   SVN_ERR(load_pwdb_config(repository, cfg, config_pool, result_pool));
   SVN_ERR(load_authz_config(repository, repository->repos_root, cfg,
-                            authz_pool, result_pool));
+                            result_pool));
 
 #ifdef SVN_HAVE_SASL
     {
@@ -4039,7 +4036,7 @@ construct_server_baton(server_baton_t **
   err = handle_config_error(find_repos(client_url, params->root, b->vhost,
                                        b->read_only, params->cfg,
                                        b->repository, params->config_pool,
-                                       params->authz_pool, params->fs_config,
+                                       params->fs_config,
                                        conn_pool, scratch_pool),
                             b);
   if (!err)

Modified: subversion/branches/authzperf/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svnserve/server.h?rev=1770422&r1=1770421&r2=1770422&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svnserve/server.h (original)
+++ subversion/branches/authzperf/subversion/svnserve/server.h Fri Nov 18 18:43:28 2016
@@ -127,9 +127,6 @@ typedef struct serve_params_t {
   /* all configurations should be opened through this factory */
   svn_repos__config_pool_t *config_pool;
 
-  /* all authz data should be opened through this factory */
-  svn_repos__authz_pool_t *authz_pool;
-
   /* The FS configuration to be applied to all repositories.
      It mainly contains things like cache settings. */
   apr_hash_t *fs_config;

Modified: subversion/branches/authzperf/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svnserve/svnserve.c?rev=1770422&r1=1770421&r2=1770422&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/authzperf/subversion/svnserve/svnserve.c Fri Nov 18 18:43:28 2016
@@ -766,7 +766,6 @@ sub_main(int *exit_code, int argc, const
   params.compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT;
   params.logger = NULL;
   params.config_pool = NULL;
-  params.authz_pool = NULL;
   params.fs_config = NULL;
   params.vhost = FALSE;
   params.username_case = CASE_ASIS;
@@ -1049,10 +1048,6 @@ sub_main(int *exit_code, int argc, const
   SVN_ERR(svn_repos__config_pool_create(&params.config_pool,
                                         is_multi_threaded,
                                         pool));
-  SVN_ERR(svn_repos__authz_pool_create(&params.authz_pool,
-                                       params.config_pool,
-                                       is_multi_threaded,
-                                       pool));
 
   /* If a configuration file is specified, load it and any referenced
    * password and authorization files. */



Mime
View raw message