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>


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1438407 13f79535-47bb-0310-9956-ffa450edef68