Checkout Tools
  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Introduce a warning callback to the authz file parser API.

We need this to warn about the use of empty groups in authz files;

this is not an error and doesn't affect the authz file semantics,

but it's nice to be able to tell the user about it.

See issues #4794, #4802 and #4803.

* subversion/include/svn_repos.h

(svn_repos_authz_warning_func_t): New callback function type.

(svn_repos_authz_read4): New; API revision.

(svn_repos_authz_read3): Deprecated.

(svn_repos_authz_parse2): New; API revision.

(svn_repos_authz_parse): Deprecated.

* subversion/libsvn_repos/authz.h

(svn_authz__parse): Add warning function and baton parameters.

* subversion/libsvn_repos/authz.c

(authz_read): Add warning function and baton parameters.

Update calls to svn_authz__parse.

(svn_repos_authz_read4): Revised from svn_repos_authz_read3.

(svn_repos_authz_parse2): Revised from svn_repos_authz_parse.

* subversion/libsvn_repos/authz_parse.c

(struct ctor_baton_t): Add members warning_func and warning_baton.

(create_ctor_baton): Initialise these new members of the constructor baton.

(emit_parser_warning): New.

(SVN_AUTHZ_PARSE_WARN): New; wrapper macro for the above.

(array_insert_ace): Ignore and warn about the use of empty groups.

(svn_authz__parse): Update implementation to match prototype.

* subversion/libsvn_repos/deprecated.c

(svn_repos_authz_read3, svn_repos_authz_parse): Implement deprecated functions.

* subversion/mod_authz_svn/mod_authz_svn.c

(log_svn_message): New; replaces log_svn_error so that it's useful for

logging warnings as well.

(log_svn_error): Reimplement, calling log_svn_message.

(struct authz_warning_baton_t): New.

(log_authz_warning): New.

(get_access_conf): Set up an authz warning handler and baton, and call

svn_repos_authz_read4 instead of svn_repos_authz_read3.

* subversion/svnserve/logger.h

(logger__log_error): Make the 'err' parameter a pointer-to-const.

Update the docstring to say that the error is not cleared.

(logger__log_warning): New.

* subversion/svnserve/logger.c

(log_message): New; common base for logger__log_error and logger__log_message.

Also *do not* allocate 8k on the stack, use the logger pool, which gets

cleared at the end of the function.

(logger__log_error): Reimplement.

(logger__log_warning): Implement.

* subversion/svnserve/serve.c

(log_error): Make the error parameter const. Fix the docstring.

(log_warning): New.

(load_authz_config): Add warning function and baton parameters and fix pool

handling. Now calls svn_repos_authz_read4 instead of svn_repos_authz_read3.

(find_repos): Add warning function and baton parameters for load_authz_config.

(handle_authz_warning): New.

(construct_server_baton): Pass an authz warning handler and baton to find_repos.

* subversion/tests/cmdline/authz_tests.py

(group_member_empty_string): Fix docstring.

(empty_group): New test case.

(test_list): Run it.

* subversion/tests/cmdline/svnauthz_tests.py

(svnauthz_empty_group_test): Extend the @Issues decorator.

Add a check for the expected warning on stderr.

  1. … 12 more files in changeset.
In the libsvn_repos authz code, rename struct access_t to path_access_t.

This is more consistent with names used for other similar structs such

as struct config_access_t.

* subversion/libsvn_repos/authz.c

(access_t): Rename this struct type to path_access_t.

(limited_rights_t, insert_path, process_acl): Track above rename.

Rename local variables to avoid a naming collision with POSIX's access(2).

Silences compiler warnings on OpenBSD and perhaps elsewhere.

* subversion/libsvn_repos/authz.c

(insert_path, process_acl): Rename 'access' to 'path_access'.

(authz_read): Rename 'access' to 'config_access'.

* subversion/libsvn_repos/authz.c

(insert_path): Fix whitespace.

Fix a crash during init in libsvn_repos with pool debugging enabled.

* subversion/libsvn_repos/authz.c

(synchronized_authz_initialize): With APR_POOL_DEBUG, the function

apr_pool_allocator_get() will return NULL (there is no global allocator).

So dereferencing that pointer to find the allocator's mutex will segfault.

It is unclear to me if using apr_allocator_mutex_get() is a sane way to find

out if we're running in multithreaded mode, and I can't find a better way

right now. For now, just assume that we're multithreaded if APR has threads.

This should be safe and allows me to run the tests over DAV again.

Fix compiler warnings.

* subversion/libsvn_repos/authz.c (authz_pool, filtered_pool):

Mark these global objects static.

* subversion/libsvn_repos/config_file.c (config_access_t):

Do not override the typedef from config_file.h.

  1. … 1 more file in changeset.
Fix build on systems without multi-thread support.

* subversion/libsvn_repos/authz.c

(synchronized_authz_initialize): Don't try to access mutexes when the

system does not support them.

Merging branches/authzperf to /trunk and remove BRANCH-README.
  1. … 35 more files in changeset.
Follow-up to r1589048: update callers of deprecated svn_repos_open2().

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/config_pool.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

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

* subversion/tests/svn_test_fs.c

* tools/server-side/svn-populate-node-origins-index.c

* tools/server-side/svn-rep-sharing-stats.c

* tools/server-side/svnauthz.c

(authz_retrieve_config_repo, find_repos_config, open_repos,

get_ctxt_baton, test_repos_fs_type, svn_test__create_repos,

build_index, process, get_authz_from_txn): Use svn_repos_open3()

instead of svn_repos_open2().

  1. … 8 more files in changeset.
Revert r1508225, which moved the include of svn_private_config.h before all

includes of our public headers. Public headers shouldn't depend on private

headers and all changes that required this are long reverted on trunk.

This patch excludes all conflicting cases.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/changelist.c

* subversion/libsvn_client/cleanup.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/diff_summarize.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_client/resolved.c

* subversion/libsvn_client/revert.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_diff/util.c

* subversion/libsvn_fs/access.c

* subversion/libsvn_fs_base/bdb/changes-table.c

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_base/dag.c

* subversion/libsvn_fs_base/fs.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_fs/caching.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra/deprecated.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/blame.c

* subversion/libsvn_ra_serf/blncache.c

* subversion/libsvn_ra_serf/commit.c

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/getlocationsegments.c

* subversion/libsvn_ra_serf/getlocks.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/log.c

* subversion/libsvn_ra_serf/merge.c

* subversion/libsvn_ra_serf/mergeinfo.c

* subversion/libsvn_ra_serf/options.c

* subversion/libsvn_ra_serf/property.c

* subversion/libsvn_ra_serf/replay.c

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_serf/xml.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/editorp.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/commit.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_repos/deprecated.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/hooks.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/replay.c

* subversion/libsvn_repos/reporter.c

* subversion/libsvn_repos/repos.c

* subversion/libsvn_repos/rev_hunt.c

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/compat.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/deprecated.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/simple_providers.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/ssl_client_cert_providers.c

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c

* subversion/libsvn_subr/ssl_server_trust_providers.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/username_providers.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/win32_crypto.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/conflicts.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/deprecated.c

* subversion/libsvn_wc/diff_editor.c

* subversion/libsvn_wc/diff_local.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/externals.c

* subversion/libsvn_wc/info.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/old-and-busted.c

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/revert.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/libsvn_wc/wc_db_wcroot.c

* subversion/mod_dav_svn/repos.c

* subversion/mod_dav_svn/version.c

* subversion/svn/cl-conflicts.c

* subversion/svn/commit-cmd.c

* subversion/svn/conflict-callbacks.c

* subversion/svn/diff-cmd.c

* subversion/svn/help-cmd.c

* subversion/svn/notify.c

* subversion/svn/propedit-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/props.c

* subversion/svn/status-cmd.c

* subversion/svn/status.c

* subversion/svn/svn.c

* subversion/svn/util.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/util.c

* subversion/svnserve/serve.c

* subversion/svnsync/svnsync.c

* subversion/svnsync/sync.c

* subversion/tests/libsvn_fs/fs-test.c

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

* subversion/tests/libsvn_subr/hashdump-test.c

* subversion/tests/libsvn_subr/mergeinfo-test.c

* subversion/tests/libsvn_subr/subst_translate-test.c

* subversion/tests/libsvn_wc/conflict-data-test.c

* subversion/tests/libsvn_wc/op-depth-test.c

* subversion/tests/libsvn_wc/wc-test.c

* subversion/tests/svn_test_fs.c

* tools/server-side/fsfs-stats.c

Move the svn_string_private.h include back to the original location.

  1. … 162 more files in changeset.
Use the new object pool API to implement an authz pool.

This requires a few minor extensions to existing authz and config APIs

to make the respective functionality available where needed.

* subversion/include/private/svn_repos_private.h

(svn_repos__authz_pool_t,

svn_repos__authz_pool_create,

svn_repos__authz_pool_get): declare new private API

* subversion/libsvn_repos/repos.h

(svn_repos__authz_validate): publish private API

* subversion/libsvn_repos/authz.c

(svn_authz_t): update commentary mentioning a new dependency

(authz_validate): rename to ...

(svn_repos__authz_validate): ... this

(svn_repos__authz_read,

svn_repos_authz_parse): update existing callers

* subversion/include/private/svn_subr_private.h

(svn_config__shallow_replace_section): declare new utility API

* subversion/libsvn_subr/config_file.c

(svn_config__shallow_replace_section): implement

* subversion/libsvn_repos/authz_pool.c

(): new file

(svn_authz_t

authz_object_t

svn_repos__authz_pool_t): define data types

(construct_key,

getter): utility functions

(svn_repos__authz_pool_create,

svn_repos__authz_pool_get): implement the new authz pool API

  1. … 5 more files in changeset.
Bring our config_pool API up on par with the standard config API

by adding support for MUST_EXIST and CASE_SENSITIVE parameters.

This requires a similar extension to the svn_repos__retrieve_config

API that we rely on. Since the underlying svn_config_t API already

support c/s, we simply need to pass the extra flag through to it.

The config_pool internal storage now harbors up to two alternative

config instances - one case sensitive one case in-sensitive. In most

cases, we will read any given config with consistent c/s settings,

i.e. only one of the config entries will actually be used.

* subversion/include/private/svn_repos_private.h

(svn_repos__retrieve_config): add c/s parameter to API

(svn_repos__config_pool_get): add c/s and must_exist parameters

* subversion/libsvn_repos/authz.c

(authz_retrieve_config_repo,

svn_repos__retrieve_config): add c/s pass-through parameter

(svn_repos__authz_read): update caller

* subversion/libsvn_repos/config_pool.c

(config_ref_t): use separate config struct for c/s and c/i

(return_config_ref): add c/s parameter and return appropriate config object

(config_by_checksum): add c/s parameter and check appropriate config object

for availability

(config_add): add c/s parameter and update the correct config variant

(auto_parse,

add_checksum,

find_repos_config): add c/s pass-through parameter

(config_by_url): add c/s parameter and select the correct config variant

(svn_repos__config_pool_get): add c/s pass-through parameter

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

(test_config_pool): update API caller

  1. … 3 more files in changeset.
Introduce a null-pointer constant that we can use as a termination sentinel

in variable argument lists. This avoids the ugliness of writing

"(char *) NULL" all over the place.

* subversion/include/svn_types.h (SVN_VA_NULL): New symbol.

* subversion/include/svn_dirent_uri.h (svn_dirent_join_many),

subversion/include/svn_path.h (svn_path_join_many),

subversion/include/svn_xml.h (svn_xml_make_open_tag):

Update docstrings, mentioning SVN_VA_NULL as the argument list terminator.

[Lots of implementation files]: Replace typecast-NULL with SVN_VA_NULL in

function calls with variable argument lists.

  1. … 89 more files in changeset.
* subversion/libsvn_repos/authz.c

(includes): Add private/svn_repos_private.h to verify the prototype of

svn_repos__retrieve_config, and avoid a gcc warning.

Publish authz_retrieve_config as svn_repos__retrieve_config

(we will need it soon).

* develop/trunk/subversion/include/private/svn_repos_private.h

(svn_repos__retrieve_config): declare as private API function

* develop/trunk/subversion/libsvn_repos/authz.c

(authz_retrieve_config): rename to ...

(svn_repos__retrieve_config): ... this

(svn_repos__authz_read): update caller

  1. … 1 more file in changeset.
Fix the #include order such that svn_private_config.h is always

included first before any other svn header - if we also include

svn_hash.h.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp,

subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c,

subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c,

subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c,

subversion/libsvn_auth_gnome_keyring/gnome_keyring.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/cat.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/commit_util.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/copy_foreign.c,

subversion/libsvn_client/ctx.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/deprecated.c,

subversion/libsvn_client/diff.c,

subversion/libsvn_client/diff_local.c,

subversion/libsvn_client/diff_summarize.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/import.c,

subversion/libsvn_client/info.c,

subversion/libsvn_client/iprops.c,

subversion/libsvn_client/list.c,

subversion/libsvn_client/locking_commands.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/prop_commands.c,

subversion/libsvn_client/ra.c,

subversion/libsvn_client/repos_diff.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/status.c,

subversion/libsvn_client/switch.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/util.c,

subversion/libsvn_delta/compat.c,

subversion/libsvn_delta/xdelta.c,

subversion/libsvn_diff/parse-diff.c,

subversion/libsvn_diff/util.c,

subversion/libsvn_fs/access.c,

subversion/libsvn_fs_base/bdb/changes-table.c,

subversion/libsvn_fs_base/bdb/env.c,

subversion/libsvn_fs_base/dag.c,

subversion/libsvn_fs_base/fs.c,

subversion/libsvn_fs_base/lock.c,

subversion/libsvn_fs_base/revs-txns.c,

subversion/libsvn_fs_base/tree.c,

subversion/libsvn_fs_fs/caching.c,

subversion/libsvn_fs_fs/fs_fs.c,

subversion/libsvn_fs/fs-loader.c,

subversion/libsvn_fs_fs/lock.c,

subversion/libsvn_fs_fs/temp_serializer.c,

subversion/libsvn_fs_fs/tree.c,

subversion/libsvn_fs_util/fs-util.c,

subversion/libsvn_ra/compat.c,

subversion/libsvn_ra/deprecated.c,

subversion/libsvn_ra_local/ra_plugin.c,

subversion/libsvn_ra/ra_loader.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/blncache.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/getlocationsegments.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/inherited_props.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/mergeinfo.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/replay.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/util.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_ra_svn/client.c,

subversion/libsvn_ra_svn/editorp.c,

subversion/libsvn_ra_svn/marshal.c,

subversion/libsvn_repos/authz.c,

subversion/libsvn_repos/commit.c,

subversion/libsvn_repos/delta.c,

subversion/libsvn_repos/deprecated.c,

subversion/libsvn_repos/fs-wrap.c,

subversion/libsvn_repos/hooks.c,

subversion/libsvn_repos/log.c,

subversion/libsvn_repos/replay.c,

subversion/libsvn_repos/reporter.c,

subversion/libsvn_repos/repos.c,

subversion/libsvn_repos/rev_hunt.c,

subversion/libsvn_subr/auth.c,

subversion/libsvn_subr/cmdline.c,

subversion/libsvn_subr/compat.c,

subversion/libsvn_subr/config_auth.c,

subversion/libsvn_subr/config.c,

subversion/libsvn_subr/deprecated.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_subr/hash.c,

subversion/libsvn_subr/io.c,

subversion/libsvn_subr/mergeinfo.c,

subversion/libsvn_subr/opt.c,

subversion/libsvn_subr/properties.c,

subversion/libsvn_subr/simple_providers.c,

subversion/libsvn_subr/sorts.c,

subversion/libsvn_subr/ssl_client_cert_providers.c,

subversion/libsvn_subr/ssl_client_cert_pw_providers.c,

subversion/libsvn_subr/ssl_server_trust_providers.c,

subversion/libsvn_subr/subst.c,

subversion/libsvn_subr/types.c,

subversion/libsvn_subr/username_providers.c,

subversion/libsvn_subr/utf.c,

subversion/libsvn_subr/win32_crypto.c,

subversion/libsvn_wc/adm_crawler.c,

subversion/libsvn_wc/adm_files.c,

subversion/libsvn_wc/adm_ops.c,

subversion/libsvn_wc/conflicts.c,

subversion/libsvn_wc/copy.c,

subversion/libsvn_wc/deprecated.c,

subversion/libsvn_wc/diff_editor.c,

subversion/libsvn_wc/diff_local.c,

subversion/libsvn_wc/entries.c,

subversion/libsvn_wc/externals.c,

subversion/libsvn_wc/info.c,

subversion/libsvn_wc/lock.c,

subversion/libsvn_wc/node.c,

subversion/libsvn_wc/old-and-busted.c,

subversion/libsvn_wc/props.c,

subversion/libsvn_wc/revert.c,

subversion/libsvn_wc/status.c,

subversion/libsvn_wc/translate.c,

subversion/libsvn_wc/update_editor.c,

subversion/libsvn_wc/upgrade.c,

subversion/libsvn_wc/wc_db.c,

subversion/libsvn_wc/wc_db_update_move.c,

subversion/libsvn_wc/wc_db_wcroot.c,

subversion/libsvn_wc/workqueue.c,

subversion/mod_dav_svn/activity.c,

subversion/mod_dav_svn/deadprops.c,

subversion/mod_dav_svn/lock.c,

subversion/mod_dav_svn/merge.c,

subversion/mod_dav_svn/mod_dav_svn.c,

subversion/mod_dav_svn/reports/update.c,

subversion/mod_dav_svn/repos.c,

subversion/mod_dav_svn/version.c,

subversion/svnadmin/svnadmin.c,

subversion/svnauth/svnauth.c,

subversion/svn/cl-conflicts.c,

subversion/svn/commit-cmd.c,

subversion/svn/conflict-callbacks.c,

subversion/svn/diff-cmd.c,

subversion/svn/help-cmd.c,

subversion/svnlook/svnlook.c,

subversion/svnmucc/svnmucc.c,

subversion/svn/notify.c,

subversion/svn/propedit-cmd.c,

subversion/svn/propget-cmd.c,

subversion/svn/props.c,

subversion/svnrdump/dump_editor.c,

subversion/svnrdump/svnrdump.c,

subversion/svnrdump/util.c,

subversion/svnserve/serve.c,

subversion/svn/status.c,

subversion/svn/status-cmd.c,

subversion/svn/svn.c,

subversion/svnsync/svnsync.c,

subversion/svnsync/sync.c,

subversion/svn/util.c,

subversion/tests/libsvn_fs/fs-test.c,

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

subversion/tests/libsvn_subr/hashdump-test.c,

subversion/tests/libsvn_subr/mergeinfo-test.c,

subversion/tests/libsvn_subr/subst_translate-test.c,

subversion/tests/libsvn_wc/conflict-data-test.c,

subversion/tests/libsvn_wc/op-depth-test.c,

subversion/tests/libsvn_wc/wc-test.c,

subversion/tests/svn_test_fs.c,

tools/dev/fsfs-reorg.c,

tools/server-side/fsfs-stats.c): #include svn_private_config.h first

  1. … 180 more files in changeset.
Fix issue #4361 (user/group names in authz files are case-insensitive).

Because of the way the original svn_config structure was designed to be

case-preserving but case-insensitive, when using it to parse authz

and group definition files, we had the following problems:

* User- and group names that differed only in case could not be

represented in the authorization configuration.

* The results returned from authorization queries depended,

although predictably, on the order in which the authz entries

appeared in the authz file.

In 1.7.0, we added an option to svn_config to make configuration groups

(hence, repository paths in the authz config) case-sensitive. This change

does the same for option names, which map to group and user names.

* subversion/include/svn_config.h

(svn_config_create2): New, revised from svn_config_create, with additional

flag to treat option names as case-sensitive.

(svn_config_read3): New, revised from svn_config_read2, with same

additional flag as above.

(svn_config_parse): Add flag to treat option names as case-sensitive.

(svn_config_create): Deprecated.

(svn_config_read2): Deprecated; argument "pool" renamde to "result_pool".

(svn_config_read): Argument "pool" renamde to "result_pool".

* subversion/libsvn_subr/config_impl.h (struct svn_config_t): Add new

struct member option_names_case_sensitive.

* subversion/libsvn_subr/config.c: Replace the newly deprecated

svn_config APIs with their revised versions.

(svn_config_create2): Renamed from

svn_config_create and implementation updated to the new spec.

(svn_config_read3): Renamed from svn_config_read; then same as above.

(svn_config_merge): Make sure both sides of the merged config

have the same case-(in)sensitive behaviour.

(svn_config_create_option): Added case-sensitive flag.

* subversion/libsvn_subr/deprecated.c

(svn_config_create, svn_config_read2): Implement deprecated wrappers.

* subversion/libsvn_repos/authz.c

(authz_retrieve_config_repo, authz_retrieve_config,

svn_repos__authz_read, svn_repos_authz_parse): Parse authz and groups config

files with case-sensitive user and group names.

* subversion/libsvn_repos/hooks.c (svn_repos__parse_hooks_env):

Likewise for the hooks environment file.

* subversion/libsvn_fs_fs/fs_fs.c,

subversion/svnserve/serve.c,

subversion/svnserve/svnserve.c,

subversion/tests/libsvn_subr/cache-test.c,

tools/server-side/mod_dontdothat/mod_dontdothat.c: Replace the newly

deprecated svn_config APIs with their revised versions.

No functional changes were made.

  1. … 12 more files in changeset.
* **/**

Run tools/dev/remove-trailing-whitespace.sh to remove all trailing whitespace

before we branch 1.8, like we did before creating previous branches.

No functional changes.

  1. … 199 more files in changeset.
Remove the ability of svn_repos_authz_read2() to handle repos-relative URLs.

This cleans up a case where it was impossible to canonicalize the paths

being passed into it and also ends up removing the need to pass repos_root

into it. If callers want to support repos-relative URLs then they should

resolve them into absolute file URLs and canonicalize them prior to calling

svn_repos_authz_read2().

* subversion/include/svn_repos.h

(svn_repos_authz_read2): Remove repos_root argument and adjust documentation

to account for no longer accepting repos-root URLs. Also change "a file"

in the documented formats for path to a dirent to be more precise.

* subversion/libsvn_repos/authz.c

(authz_retrieve_config_repo, svn_repos__authz_read, svn_repos_authz_read2):

Remove repos_root parameter and support for repos-relative URLs in path.

* subversion/libsvn_repos/deprecated.c

(svn_repos_authz_read): Adjust call of svn_repos__authz_read().

* subversion/libsvn_repos/repos.h

(svn_repos_authz_read): Adjust declaration and documentation to match the

removal of repos_root and support for repos-relative URLs.

* subversion/mod_authz_svn/mod_authz_svn.c

(canonicalize_access_file): Adjust comment about why we are not canonicalizing

here.

(get_access_conf): When access_file is a repos-relative URL resolve and

canonicalize it before calling svn_repos_authz_read2().

* subversion/svnserve/serve.c

(canonicalize_access_file): Change access_file to an arginout and return

an svn_error_t so that we can resolve and canonicalize repos-relative

urls.

(load_authz_config): Adjust calls to canonicalize_access_file() due to

above changes.

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

(in_repo_authz, in_repo_groups_authz): Remove repos-relative URL tests

and convert still needed tests that were using repos-relative URls to

absolute URLs.

* tools/server-side/svnauthz.c

(get_authz): Fix call to svn_repos_authz_read2() to match above changes.

  1. … 7 more files in changeset.
Use svn_hash_gets and svn_hash_sets.

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/commit.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_repos/deprecated.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/hooks.c

* subversion/libsvn_repos/load-fs-vtable.c

* subversion/libsvn_repos/load.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/replay.c

* subversion/libsvn_repos/reporter.c

* subversion/libsvn_repos/repos.c

* subversion/libsvn_repos/rev_hunt.c

  1. … 13 more files in changeset.
Fix a memory bug: using pool memory after clear.

* subversion/libsvn_repos/authz.c

(authz_retrieve_config_repo): Allocate result in result pool.

(authz_retrieve_config): Typo in docstring.

Resolve incorrect exit code from svnauthz when testing a non-existant url.

* subversion/include/svn_repos.h

(svn_repos_authz_read2): Improve the documentation to be clear that

SVN_ERR_AUTHZ_INVALID_CONFIG is only returned for validation failures

and not for missing files.

* subversion/libsvn_repos/authz.c

(authz_retrieve_config_repo): Never return SVN_AUTHZ_INVALID_CONFIG since

all of these error paths are not validation errors but some sort of

operational error like invalid paths. Documentation adjusted to match.

(authz_retrieve_config): This never returns SVN_AUTHZ_INVALID_CONFIG,

documentation adjusted to reflect this.

* subversion/tests/cmdline/svnauthz_tests.py

(svnauthz_validate_repo_test, svnauthz_compat_mode_repo_test): Adjust

the expected return code for the two tests that test non-existant urls.

  1. … 2 more files in changeset.
Introduce AuthzSVNGroupsFile option to allow Subversion configurations with

groups stored in a separate file.

* subversion/include/svn_config.h

(SVN_CONFIG_OPTION_GROUPS_DB): New define.

* subversion/include/svn_repos.h

(SVN_REPOS__CONF_GROUPS): New define.

(svn_repos_authz_read2): New optional 'groups_path' parameter.

(svn_repos_authz_parse): New optional 'groups_stream' parameter.

* subversion/libsvn_repos/authz.c

(authz_copy_group): Introduce a callback for groups copying.

(authz_copy_groups): Introduce a helper routine to copy groups from a

specified config to the authz structure. Report error if the

destination authz already contains group definitions.

(svn_repos__authz_read): Support the 'groups_path' parameter. If it is set,

parse the corresponding groups config and copy the groups to the

resulting authz structure using authz_copy_groups.

(svn_repos_authz_read2): New optional 'groups_path' parameter.

(svn_repos_authz_read): Support the 'groups_stream' parameter. If it is

set, parse the corresponding groups config stream and copy the groups

to the resulting authz structure.

* subversion/libsvn_repos/deprecated.c

(svn_repos_authz_read): Pass NULL as the 'groups_path' parameter when

calling svn_repos__authz_read.

* subversion/libsvn_repos/repos.h

(svn_repos__authz_read): New optional 'groups_path' parameter.

* subversion/libsvn_repos/repos.с

(create_conf): Explain the purpose of the new groups-db option.

* subversion/mod_authz_svn/mod_authz_svn.c

(authz_svn_config_rec): Add the 'groups_file' config member.

(AuthzSVNGroupsFile_cmd): Introduce a function to canonicalize the groups

file config value.

(authz_svn_cmds): Add the AuthzSVNGroupsFile option.

(get_access_conf): Log the path to the groups file if it is set. Pass the

groups file path to svn_repos_authz_read2.

* subversion/svnserve/serve.c

(canonicalize_access_file): New function. Factored out from

load_authz_config to be reused for the groups file.

(load_authz_config): Retrieve the SVN_CONFIG_OPTION_GROUPS_DB from the

svnserve config. Canonicalize this value if it is present and pass

it to svn_repos_authz_read2 when loading the authz configuration.

* tools/server-side/svnauthz.c

(svnauthz_opt_state): Add the 'groups_file' member.

(svnauthz__cmdline_options_t): Add the svnauthz__groups_file enum member.

(options_table): Add the --groups-file option and short description for it.

(cmd_table): Update the documentation to reflect the added

svnauthz__groups_file option.

(read_file_contents): New function. Factored out from get_authz_from_txn to

be reused for the groups file contents.

(get_authz_from_txn): Use read_file_contents for both authz and groups

files. Pass the resulting contents to svn_repos_authz_parse.

(get_authz): Pass the groups file from options to get_authz_from_txn

or svn_repos_authz_read2 depending on whether transaction option is set.

(canonicalize_access_file): New function. Factored out from

sub_main to be reused for the groups file.

(sub_main): Grab the groups file option from the command line, canonicalize

it if it present and pass it further as a part of the opt_state.

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

(authz-get-handle, in_repo_authz): Pass NULL as the 'groups_path' parameter

when calling svn_repos_authz_read2. Pass NULL as the 'groups_stream'

parameter when calling svn_repos_authz_parse.

(authz_groups_get_handle): Introduce the helper routine for tests similiar

to authz_get_handle but supporting a separate groups file.

(groups_authz, in_repo_groups_authz): Add.

* subversion/tests/cmdline/authz_tests.py

(authz_svnserve_groups): Add the access test for svnserve configured with

a separate groups file.

(test_list): Add a reference to the new test.

* subversion/tests/cmdline/svntest/main.py

(write_restrictive_svnserve_conf_with_groups): New method. Creates a

default restrictive svnserve configuration with a separate groups file.

(write_groups_file): Introduce a helper method to write the groups file

in tests.

* subversion/tests/cmdline/svntest/sandbox.py

(_set_name): Store the default path to the groups file in the

'Sandbox.groups_file' variable.

* subversion/mod_authz_svn/INSTALL

(II.1): Describe usage of AuthzSVNGroupsFile directive.

Patch by: Evgeny Kotkov <evgeny.kotkov{_AT_}visualsvn.com>

  1. … 13 more files in changeset.
* subversion/libsvn_repos/authz.c

(authz_retrieve_config_repo): Make the error message more consistent with

what we use within svn_config_read().

Coding style patch: in logical expressions, instead of comparing

with arithmetic constants use boolean operations. I.e. replace

<expr> == TRUE with <expr> and

<expr> == FALSE with !<expr>

* subversion/libsvn_delta/svndiff.c

(send_simple_insertion_window,

window_handler): change condition style

* subversion/libsvn_fs_base/fs.c

(svn_fs_base__clean_logs): ditto

* subversion/libsvn_fs_fs/fs_fs.c

(representation_string,

create_rep_state_body,

build_rep_list): ditto

* subversion/libsvn_ra_serf/locks.c

(handle_lock): ditto

* subversion/libsvn_ra_serf/property.c

(create_propfind_body): same here,

* subversion/libsvn_ra_serf/update.c

(cancel_fetch,

handle_fetch,

end_report,

finish_report): here,

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__handle_xml_parser): here,

* subversion/libsvn_ra_svn/client.c

(optbool_to_tristate): here,

* subversion/libsvn_repos/authz.c

(authz_parse_section): and here.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos__validate_prop): here as well

* subversion/libsvn_subr/cmdline.c

(svn_cmdline_create_auth_baton): and here

* subversion/libsvn_subr/deprecated.c

(print_command_info): here

* subversion/libsvn_subr/opt.c

(print_command_info2): more of the same

* subversion/libsvn_subr/subst.c

(translate_chunk): ditto

* subversion/libsvn_subr/win32_crashrpt.c

(write_var_values,

svn__unhandled_exception_filter): ditto

* subversion/svn/svn.c

(sub_main): ditto

* subversion/svnsync/svnsync.c

(filter_props): and more of the

* subversion/tests/libsvn_subr/stream-test.c

(test_readonly): same thing

* subversion/tests/libsvn_subr/string-test.c

(test21): ditto

* subversion/tests/libsvn_subr/subst_translate-test.c

(test_svn_subst_translate_string2_null_encode): here

* subversion/tests/libsvn_wc/db-test.c

(test_getting_info,

test_working_info): and here

* tools/client-side/svn-bench/svn-bench.c

(sub_main): and finally here

  1. … 21 more files in changeset.
Within the implementation of svn_repos_authz_read2() only canonicalize

repos relative URLs.

* subversion/libsvn_repos/authz.c

(authz_retreive_config_repo): Don't canonicalize dirent here but rather ...

(authz_retrieve_config): canonicalize repos relative URLs here.

Add a svn_repos_authz_parse() function which parses an authz config from

a stream.

This also switches most testing of the authz code to using streams, which

should result in a tiny bit faster testing since we're not needing to

do disk I/O.

* subversion/libsvn_repos/authz.c

(svn_repos__authz_read): Factor out walking the config for authz errors

into ...

(authz_validate): New function.

(svn_repos_authz_parse): New function.

* subversion/include/svn_repos.h

(svn_repos_authz_parse): New function.

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

(authz_get_handle): Adjust to allow authz conf to be optionally written

to a in memory stream rather than always going to a temp file.

(authz): Change most of the tests to use in memory streams and duplicate

one test so that the code that is unique to the file path is excercised.

(commit_editor_authz,issue_4060): Use in memory streams.

  1. … 2 more files in changeset.
Merge the in-repo-authz branch back to trunk.

See http://svn.haxx.se/dev/archive-2012-12/0397.shtml

  1. … 23 more files in changeset.
Fix issue #3531 ("Error with AuthzSVNAccessFile groups parsing in

mod_authz_svn"). The authz validation logic was treating any section

whose name began with "groups" (e.g. "groupsomething" or

"groups:/trunk") as a group section; likewise for aliases and sections

which begin with "aliases". This prevented users from defining access

rules for repositories with those names, resulting in some cases in

access being forbidden to those repositories.

* subversion/libsvn_repos/authz.c

(authz_validate_section): Use strcmp() instead of strncmp() when

checking for the special authz sections "groups" and "aliases".

While here, fix a bit of stale commentary.

Fix issue 4060, spurious authz denied when svnserve root is a repository.

* subversion/include/svn_repos.h

(svn_repos_authz_read): Document NULL repos_path.

* subversion/libsvn_repos/authz.c

(svn_repos_authz_check_access): Handle NULL repos_path.

  1. … 1 more file in changeset.