--- subversion-1.4.2dfsg1.orig/subversion/mod_authz_svn/mod_authz_svn.c +++ subversion-1.4.2dfsg1/subversion/mod_authz_svn/mod_authz_svn.c @@ -48,6 +48,7 @@ int no_auth_when_anon_ok; const char *base_path; const char *access_file; + const char *override_repos_name; } authz_svn_config_rec; /* @@ -62,6 +63,7 @@ /* By default keep the fortress secure */ conf->authoritative = 1; conf->anonymous = 1; + conf->override_repos_name = NULL; return conf; } @@ -92,6 +94,11 @@ "Set to 'On' to suppress authentication and authorization " "for requests which anonymous users are allowed to perform. " "(default is Off.)"), + AP_INIT_TAKE1("AuthzSVNRepositoryName", ap_set_string_slot, + (void*)APR_OFFSETOF(authz_svn_config_rec, override_repos_name), + OR_AUTHCFG, + "Use this repository name for looking up permissions" + "instead of the default one (default is (none))"), { NULL } }; @@ -290,6 +297,10 @@ if (repos_path || (!repos_path && (authz_svn_type & svn_authz_write))) { + if (conf->override_repos_name != NULL) { + repos_name = apr_pstrdup(r->pool, conf->override_repos_name); + } + svn_err = svn_repos_authz_check_access(access_conf, repos_name, repos_path, r->user, authz_svn_type, @@ -334,6 +345,10 @@ repos_path == NULL (see above for explanations) */ if (repos_path) { + if (conf->override_repos_name != NULL) { + dest_repos_name = apr_pstrdup(r->pool, conf->override_repos_name); + } + svn_err = svn_repos_authz_check_access(access_conf, dest_repos_name, dest_repos_path,