You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/12/21 19:56:35 UTC
svn commit: r1775554 -
/subversion/branches/authzperf/subversion/libsvn_repos/authz.c
Author: stefan2
Date: Wed Dec 21 19:56:35 2016
New Revision: 1775554
URL: http://svn.apache.org/viewvc?rev=1775554&view=rev
Log:
On the authzperf branch:
Minor code cleanup.
* subversion/libsvn_repos/authz.c
(svn_repos_authz_check_access): PATH cannot be NULL at that point anymore.
Modified:
subversion/branches/authzperf/subversion/libsvn_repos/authz.c
Modified: subversion/branches/authzperf/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/libsvn_repos/authz.c?rev=1775554&r1=1775553&r2=1775554&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/authzperf/subversion/libsvn_repos/authz.c Wed Dec 21 19:56:35 2016
@@ -1703,34 +1703,23 @@ svn_repos_authz_check_access(svn_authz_t
return SVN_NO_ERROR;
}
+ /* Rules tree lookup */
+
/* Did we already filter the data model? */
if (!rules->root)
SVN_ERR(filter_tree(authz, pool));
- /* If PATH is NULL, check if the user has *any* access. */
- if (!path)
- {
- *access_granted =
- ((rules->root->rights.max_rights & required) == required);
- return SVN_NO_ERROR;
- }
- else
- {
- const svn_boolean_t recursive =
- !!(required_access & svn_authz_recursive);
-
- /* Re-use previous lookup results, if possible. */
- path = init_lockup_state(authz->filtered->lookup_state,
- authz->filtered->root, path);
-
- /* Sanity check. */
- SVN_ERR_ASSERT(path[0] == '/');
-
- /* Determine the granted access for the requested path.
- * PATH does not need to be normalized for lockup(). */
- *access_granted = lookup(rules->lookup_state, path,
- required, recursive, pool);
- }
+ /* Re-use previous lookup results, if possible. */
+ path = init_lockup_state(authz->filtered->lookup_state,
+ authz->filtered->root, path);
+
+ /* Sanity check. */
+ SVN_ERR_ASSERT(path[0] == '/');
+
+ /* Determine the granted access for the requested path.
+ * PATH does not need to be normalized for lockup(). */
+ *access_granted = lookup(rules->lookup_state, path, required,
+ !!(required_access & svn_authz_recursive), pool);
return SVN_NO_ERROR;
}