[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Error checking during authz lookup

From: David Anderson <david.anderson_at_calixo.net>
Date: 2005-07-04 15:33:43 CEST

This is the first part of implementing authz error checking. This patch
adds error throwing to the authz lookup function. The next patch will
extend this error checking to opening time; the two were kept separate
for patch size and logical change separation.

This patch does not change the public API (the public lookup function
already returns a svn_error_t), nor does it change mod_authz_svn (my
previous patch made it log and act upon svn_error_t's returned by the
authz layer). It simply makes it so that the authz code can actually
return something other than SVN_NO_ERROR.

Make the authz lookup return errors when it runs into an invalid
configuration file during operation.

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

* subversion/libsvn_repos/authz.c
    authz_get_tree_access): Change prototype to return errors, add error
     checking code. All callers changed.
   (authz_parse_line, authz_parse_section): Throw errors and halt
     configuration traversal if necessary.
   (svn_repos_authz_check_access): Throw errors back to the caller.

* subversion/tests/libsvn_repos/repos-test.c
   (authz_get_handle): New function. Factor out the converting a char*
     authz file contents to a parsed svn_config_t* from the authz test
   (authz): Add a second batch of tests to ensure that invalid authz
     configurations are caught.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Mon Jul 4 15:35:37 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.