ghudson in subversion

Vote to backport r33866 to 1.5.x.
* subversion/bindings/swig/INSTALL: Document how to install the perl

bindings in a directory other than the system perl directory.

Allow the svnserve pwdb file to be unreadable, so that it can be

accessible for some access methods and not others.

Patch by: Marcus Rueckert <>


* subversion/svnserve/serve.c (find_repos): Ignore errors opening the

pwdb file.

Add authz callback support to the commit editor.

Patch by: David Anderson <>

* subversion/include/svn_error_codes.h

New error message.

* subversion/include/svn_repos.h

(svn_repos_authz_access_t): Move to the begginning of file to avoid

warnings about undeclared types.

(svn_repos_authz_callback_t): New callback type for extended authz


(svn_repos_get_commit_editor3): Rev API, add an authz callback and


(svn_repos_get_commit_editor2): Deprecate.

* subversion/libsvn_repos/commit.c

(edit_baton): New fields for authz.

(check_authz): New internal function.

(open_root, delete_entry, add_directory, open_directory,

apply_textdelta, add_file, open_file, change_file_prop,

change_dir_prop): Perform authz lookups.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_commit_editor): Use the new commit editor API.

* subversion/svnserve/serve.c

(commit): Use the new commit editor API.

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

(commit_authz_cb): Callback implementation for the commit editor

authz test.

(commit_editor_authz): New test.

Revise new functions svn_config_enumerate2() and

svn_config_enumerate_sections2() to pass an iteration pool to the


Patch by: Bernd Rinn <>

* subversion/include/svn_config.h

(svn_config_section_enumerator_t, svn_config_enumerator_t):


(svn_config_section_enumerator2_t, svn_config_enumerator2_t):

New types with pool arguments.

(svn_config_enumerate_sections2, svn_config_enumerate2): Use new

callback types.

* subversion/libsvn_subr/config.c

(svn_config_enumerate_sections, svn_config_enumerate): Go back to

the old definitions, since it's no longer easy to define these in

terms of the new functions.

(svn_config_enumerate_sections2, svn_config_enumerate2): Create an

iteration subpool and pass it to the callbacks.

(search_groups): Accept and take advantage of new pool argument.

* subversion/libsvn_client/add.c

(auto_props_enumerator): Accept new pool argument.

* subversion/libsvn_repos/authz.c

(authz_lookup_baton, authz_validate_baton): We don't need to

remember a pool in the batons any more; remove those fields.

(authz_parse_line, authz_parse_section, authz_validate_rule,

authz_validate_group, authz_validate_section): Receive and take

advantage of new pool argument.

(authz_get_path_access, authz_get_tree_access, svn_repos_read):

Don't initialize the pool field of the batons any more.

Replace calls to deprecated functions svn_config_enumerate() and


Patch by: Bernd Rinn <>

* subversion/libsvn_client/add.c

(svn_client__get_auto_props): Replace call to svn_config_enumerate

with call to svn_config_enumerate2.

* subversion/libsvn_repos/authz.c

(authz_parse_section, authz_get_path_access, authz_get_tree_access,

authz_validate_section, svn_repos_authz_read): Replace calls to

svn_config_enumerate with calls to svn_config_enumerate2, and

calls to svn_config_enumerate_sections with calls to


Create revision 2 of the API of function svn_config_enumerate() and

svn_config_enumerate_sections() to get the memory pool handling right.

Patch by: Bernd Rinn <>

* subversion/libsvn_subr/config.c

(svn_config_enumerate2): New. Copy of svn_config_enumerate using

the provided pool.

(svn_config_enumerate_sections2): New. Copy of svn_config_enumerate_sections

using the provided pool.

(svn_config_enumerate): Deprecated. Create subpool of cfg->x_pool

and call svn_config_enumerate2.

(svn_config_enumerate_sections): Deprecated. Create subpool of cfg->x_pool

and call svn_config_enumerate_sections2.

(svn_config_find_group): Call the new svn_config_enumerate2().

* subversion/include/svn_config.h

(svn_config_enumerate2): New.

(svn_config_enumerate_sections2): New.

(svn_config_enumerate): Deprecated.

(svn_config_enumerate_sections): Deprecated.

Fix an implementation bug in svnserve that could cause failures with

locks and svnserve if anonymous write access to the repository is


Patch by: David Anderson <>

* subversion/svnserve/serve.c

(send_mechs): Use the needs_username parameter to force a

non-anonymous authentication mechanism if required.

Follow-up to r15404 to fix a secondary leak introduced there.

* subversion/libsvn_subr/config.c

(svn_config_enumerate): Delay creation of the subpool so that we

don't leak it when the section is not found.

Fix a small memory leak when enumerating config objects.

A better long-term fix is to rev the API for svn_config_enumerate and

svn_config_enumerate_sections to take a pool. However, this fix is

suitable for backporting should we choose to do so.

* subversion/libsvn_subr/config.c

(svn_config_enumerate_sections, svn_config_enumerate): Use a subpool

to invoke apr_hash_first().

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 <>

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


* 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


(authz_baton): Rename.

(authz_lookup_baton): Renamed from authz_baton. All references


(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


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

Use svn_authz_t instead of svn_config_t for handles to authz


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

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


(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


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


* subversion/libsvn_repos/reporter.c (update_entry): Flesh out comment

with descriptions of when the parameters may be NULL.

* STATUS: Add and vote for r15135.
Resolve performance issue when tracing locations against svn 1.0.x

servers, by not requesting more log data than we really need.

* subversion/libsvn_client/ra.c

(log_receiver): Eliminate unnecessary special case. Add a safety

check to prevent an assertion failure if the server sends bogus

log data.

(slow_locations): Compute the oldest as well as the youngest

revision, and only ask for the logs from youngest to oldest. Use

lrb.last_path to fill in any values not covered by the received log

information. Eliminate redundant code to start filling in the

baton. Avoid a network request in the common case when all three

revisions are the same.

* subversion/include/svn_repos.h: Fix some tabs accidentally

introduced in r15242.

Move authz routines from mod_authz_svn to libsvn_repos; rework authz

code to fit in with libsvn_repos; update mod_authz_svn to reflect

the move.

Patch by: David Anderson <>

* subversion/mod_authz_svn/mod_authz_svn.c: Add includes, remove

nameless enum. Update copyright notice.

(parse_authz_baton, group_contains_user_internal,

group_contains_user, parse_authz_line,

parse_authz_lines, parse_authz_section,

parse_authz_sections, check_access): Remove, functionality

moves to libsvn_repos.

(req_check_access): Use the authz routines in libsvn_repos and wrap

any errors reported by the authz layer. Test for a NULL repos_path

here rather than in check_access.

* subversion/include/svn_repos.h: Add include. Update copyright notice.

(svn_repos_authz_access_t): New enum type.

(svn_repos_authz_check_access): New public API.

* subversion/libsvn_repos/authz.c: New file. Contains the functionality

moved from mod_authz_svn. Rename functions and variable names to

better fit libsvn_repos. Add internal API and in-function


(authz_access_is_granted, authz_access_is_determined): New functions

that refactor and document obfuscated tests that were previously in

authz_parse_section and authz_get_path_access.

* subversion/tests/libsvn_repos/repos-test.c: Add include. Update

copyright notice.

(authz): New test.

* build.conf: Add dependancy on libsvn_repos to mod_authz_svn build


    • ?
* STATUS: Vote.
* STATUS: Propose r14373 for backport.
Pass all of the hostinfo part of a provided svn+ssh URL to the tunnel

agent; some versions of ssh support a ":port" designation.

Patch by: S. Ramaswamy <>

* subversion/libsvn_ra_svn/client.c

(find_tunnel_agent): Accept hostinfo instead of user and host; pass

it to the tunnel agent.

(ra_svn_open): Pass the hostinfo part of the URI to

find_tunnel_agent, rather than the user and host.

* STATUS: Adjust r14063 and friends backport so that svn_fs_initialize

is included, and calls to it made from svnserve and mod_dav_svn.


r14063: Cache uuid in memory

r14066: svn_fs_initialize and serialized_init

r14068: Bugfix for r14066 (release mutex on write-lock failure)

r14079: Bugfix for r14066 (memory leak)

r14121: Bugfix for r14066 (missing comment)

r14124: Bugfix for r14066 (multiple init calls, localization)

r14156: mod_dav_svn initialization calls

part of r14067: Add calls to svn_fs_initialize [only svnserve.c]

Create a backport branch for r14063, r14066, r14068, r14079, r14121,

r14124, and r14156.

Remove 1.2.x-r14063 branch; it will be recreated with a different scope.

* STATUS: Vote.
* STATUS: Nominate issue #2265 fix.
Merge r14063, r14066, r14068, r14079, r14121, and r14124 with some


* subversion/include/svn_fs.h

(svn_fs_initialize): Do not introduce this new API (so there are

actually no merged changes to this file).

* subversion/libsvn_fs/fs-loader.c

(svn_fs_initialize, serialized_init): Do not introduce this new API;

common pool initialization is done purely on a best-effort basis

in serialized_init.

Create 1.2.x backport branch for r14063, r14066, r14068, r14079,

r14121, and r14124.

* subversion/libsvn_delta/vdelta.c: Remove a couple of references to

the mailing list archive which don't work any more; they aren't very


Fix problems in r14066 noted by Peter Lundblad.

* subversion/include/svn_fs.h

(svn_fs_initialize): Document that multiple calls within the

lifetime of the first call's pool will have no effect.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_initialize): Check that common_pool isn't already defined.

Localize error strings.

* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__with_write_lock): Localize error strings.

* subversion/libsvn_fs_fs/fs.c

(fs_serialized_init): Localize error strings.

Nominate back-ported issue #2265 fix for 1.1.