Checkout
ghudson
committed
on 23 Jul 05
Add a function which opens and verifies that an authz configuration
file does not contain any logic errors prior to any lookups.

Patch by: … Show more
Add a function which opens and verifies that an authz configuration

file does not contain any logic errors prior to any lookups.

Patch by: David Anderson <david.anderson@calixo.net>

* subversion/include/svn_error_codes.h: Update copyright notice.

 (SVN_ERR_AUTHZ_INVALID_CONFIG): New error code.

* subversion/include/svn_repos.h: Remove useless include.

  (svn_authz_t): New opaque data type.

  (svn_repos_authz_read): New public API.

  (svn_repos_authz_check_access): Fix docstring typo.  Use a

    svn_authz_t* instead of a svn_config_t*.

* subversion/libsvn_repos/authz.c

    Use svn_authz_t instead of svn_config_t for handles to authz

    configurations.

  (authz_baton): Rename.

  (authz_lookup_baton): Renamed from authz_baton.  All references

    changed.

  (authz_validate_baton): New baton for use in validation routines.

  (authz_group_contains_user_internal): Remove function.

  (authz_group_contains_user): Remove useless protection against

    invalid configurations.

  (authz_get_path_access): Rewrite docstring.

  (authz_get_tree_access): Return the access status directly.

  (authz_group_walk, authz_validate_rule,

   authz_validate_group, authz_validate_section):

    New internal functions.

  (svn_repos_authz_read): New function.

  (svn_repos_authz_check_access): Change calls to altered internal

    functions.

* subversion/tests/libsvn_repos/repos-test.c

    Use svn_authz_t instead of svn_config_t for handles to authz

    configurations.

  (authz_get_handle): New function.  Factor out the converting a char*

    authz file contents to a parsed svn_authz_t* from the authz test

    function.

  (authz): Add a second batch of tests to ensure that invalid authz

    configurations are caught during the authz loading.

* subversion/mod_authz_svn/mod_authz_svn.c

    Use svn_authz_t instead of svn_config_t for handles to authz

    configurations.

  (req_check_access): replace call to svn_config_read with a call to

    svn_repos_authz_read.

Show less