You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Graham Leggett <mi...@sharp.fm> on 2015/02/25 17:35:57 UTC
[Patch] Expression support for SVNPath and SVNParentPath
Hi all,
The SVNParentPath directive allows a set of repos to be placed at an URL, but if you have more complex needs such as providing many customers (with separately mounted home directories) access to many repositories, this may not be enough.
The attached patch brings httpd v2.4 expression support to the SVNPath and SVNParentPath directories through the addition of an optional second parameter, which allows you to do stuff like this:
<LocationMatch ^/svn/(?<CUSTOMERNAME>[^/]+)/>
# customer has their own partition, inside is an “svn” directory with repos in it
SVNParentPath /home/partition %{env:MATCH_CUSTOMERNAME}/svn
# customer repos are protected by this group
require ldap-group cn=https://svn.${SERVER_SUFFIX}/%{env:MATCH_CUSTOMERNAME},ou=svn,ou=Groups,o=Somewhere
</LocationMatch>
Or perhaps this based on the HOST header (and a wildcard SSL cert):
<Location />
# customer has their own partition, inside is an “svn” directory with repos in it
SVNParentPath /home/svn %{HTTP_HOST}
# customer repos are protected by this group
require ldap-group cn=%{HTTP_HOST},ou=svn,ou=Groups,o=Somewhere
</Location>
Both the SVNPath and SVNParentPath directives now take an optional second argument, containing a string expression to be evaluated and added to the end of the primary path. If the expression evaluates to a path above the first argument, an error will be returned.
The patch was developed against trunk, and applies clean to v1.7.19.
Regards,
Graham
—
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:
>> >> + if (expr_err) {
>
> Did you see the '{' ^^^ here?
>
>> >> + apr_pstrcat(cmd->temp_pool,
>> >> + "Cannot parse expression in SVNPath: ",
>> >> + expr_err, NULL);
>> >
>> > expr_err contains the error message if parsing fails but it appears to
>> > be discared.
>> >
>> >> + }
>
> Which is closed here?
Ah, yes that is OK.
--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
RE: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Philip Martin [mailto:philip.martin@wandisco.com]
> Sent: donderdag 26 februari 2015 20:13
> To: Bert Huijben
> Cc: Graham Leggett; 'Subversion Development'
> Subject: Re: [Patch] Expression support for SVNPath and SVNParentPath
>
> Bert Huijben <be...@qqmail.nl> writes:
>
> > The ‘}’ is matched by that at the end of the if lines in both
> > blocks. (Not really our common code style)
>
> The problem is that there is a '{' before the #if and a '}' inside the
> #if but no '}' in the #else. I think #if code compiles and the #else
> code fails.
>
> >> + if (arg2) {
> >> +#if AP_MODULE_MAGIC_AT_LEAST(20111025,3)
> >> + const char *expr_err = NULL;
> >> +
> >> + conf->fs_path->expr = ap_expr_parse_cmd(cmd, arg2,
> >> AP_EXPR_FLAG_STRING_RESULT,
> >> + &expr_err, NULL);
> >> + if (expr_err) {
Did you see the '{' ^^^ here?
> >> + apr_pstrcat(cmd->temp_pool,
> >> + "Cannot parse expression in SVNPath: ",
> >> + expr_err, NULL);
> >
> > expr_err contains the error message if parsing fails but it appears to
> > be discared.
> >
> >> + }
Which is closed here?
Bert
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Philip Martin <ph...@wandisco.com>.
Bert Huijben <be...@qqmail.nl> writes:
> The ‘}’ is matched by that at the end of the if lines in both
> blocks. (Not really our common code style)
The problem is that there is a '{' before the #if and a '}' inside the
#if but no '}' in the #else. I think #if code compiles and the #else
code fails.
>> + if (arg2) {
>> +#if AP_MODULE_MAGIC_AT_LEAST(20111025,3)
>> + const char *expr_err = NULL;
>> +
>> + conf->fs_path->expr = ap_expr_parse_cmd(cmd, arg2,
>> AP_EXPR_FLAG_STRING_RESULT,
>> + &expr_err, NULL);
>> + if (expr_err) {
>> + apr_pstrcat(cmd->temp_pool,
>> + "Cannot parse expression in SVNPath: ",
>> + expr_err, NULL);
>
> expr_err contains the error message if parsing fails but it appears to
> be discared.
>
>> + }
>
> You have an unmatched } inside the #if but not in the #else, one of them
> is wrong.
>
>> +#else
>> + return "Expressions require httpd v2.4.0 or higher"
>> +#endif
>> + }
>> +
--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Bert Huijben <be...@qqmail.nl>.
The ‘}’ is matched by that at the end of the if lines in both blocks. (Not really our common code style)
Bert
Sent from Windows Mail
From: Philip Martin
Sent: Thursday, February 26, 2015 7:13 PM
To: Graham Leggett
Cc: 'Subversion Development'
Graham Leggett <mi...@sharp.fm> writes:
> + if (arg2) {
> +#if AP_MODULE_MAGIC_AT_LEAST(20111025,3)
> + const char *expr_err = NULL;
> +
> + conf->fs_path->expr = ap_expr_parse_cmd(cmd, arg2, AP_EXPR_FLAG_STRING_RESULT,
> + &expr_err, NULL);
> + if (expr_err) {
> + apr_pstrcat(cmd->temp_pool,
> + "Cannot parse expression in SVNPath: ",
> + expr_err, NULL);
expr_err contains the error message if parsing fails but it appears to
be discared.
> + }
You have an unmatched } inside the #if but not in the #else, one of them
is wrong.
> +#else
> + return "Expressions require httpd v2.4.0 or higher"
> +#endif
> + }
> +
> return NULL;
> }
>
>
> static const char *
> -SVNParentPath_cmd(cmd_parms *cmd, void *config, const char *arg1)
> +SVNParentPath_cmd(cmd_parms *cmd, void *config, const char *arg1, const char *arg2)
> {
> dir_conf_t *conf = config;
>
> if (conf->fs_path != NULL)
> return "SVNParentPath cannot be defined at same time as SVNPath.";
>
> - conf->fs_parent_path = svn_dirent_internal_style(arg1, cmd->pool);
> + conf->fs_parent_path = apr_pcalloc(cmd->pool, sizeof(path_expr_t));
> + conf->fs_parent_path->base = svn_dirent_internal_style(arg1, cmd->pool);
>
> + if (arg2) {
> +#if AP_MODULE_MAGIC_AT_LEAST(20111025,3)
> + const char *expr_err = NULL;
> +
> + conf->fs_path->expr = ap_expr_parse_cmd(cmd, arg2, AP_EXPR_FLAG_STRING_RESULT,
> + &expr_err, NULL);
> + if (expr_err) {
> + apr_pstrcat(cmd->temp_pool,
> + "Cannot parse expression in SVNParentPath: ",
> + expr_err, NULL);
> + }
> +#else
> + return "Expressions require httpd v2.4.0 or higher"
> +#endif
> + }
Same problems as above in this repeated code. It's relatively small but
perhaps factor into a separate function?
> +
> return NULL;
> }
>
> @@ -668,7 +713,61 @@
> dir_conf_t *conf;
>
> conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
> - return conf->fs_path;
> +
> + if (conf->fs_path)
> + {
> +
> + #if AP_MODULE_MAGIC_AT_LEAST(20111025,3)
> + if (conf->fs_path->expr)
> + {
> + svn_error_t *serr;
> + svn_boolean_t under_root;
> + const char *err = NULL, *suffix;
> +
> + suffix = ap_expr_str_exec(r, conf->fs_path->expr, &err);
> + if (!err)
> + {
> + serr = svn_dirent_is_under_root(&under_root,
> + &suffix, conf->fs_path->base, suffix, r->pool);
> + if (!serr && under_root)
> + {
> + return svn_dirent_join(conf->fs_path->base,
> + svn_dirent_internal_style(suffix, r->pool), r->pool);
> + }
> + else if (serr)
> + {
> + ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, r,
> + "mod_dav_svn: SVNParentPath: '%s' not under '%s': '%s'",
> + suffix, conf->fs_path->base,
> + serr->message ? serr->message : "(no more info)");
> + return NULL;
> + }
> + else
> + {
> + ap_log_rerror(
> + APLOG_MARK, APLOG_ERR, 0, r,
> + "mod_dav_svn: SVNParentPath: '%s' not under '%s'",
> + suffix, conf->fs_path->base);
> + return NULL;
> + }
> + }
> + else
> + {
> + ap_log_rerror(
> + APLOG_MARK, APLOG_ERR, 0, r, "mod_dav_svn: SVNParentPath: can't "
> + "evaluate expression: %s", err);
> + return NULL;
> + }
> +
> + }
> + #endif
This bit of code is also repeated and is probably big enough to be
factored into a separate function.
> +
> + return conf->fs_path->base;
> + }
> + else
> + {
> + return NULL;
> + }
> }
--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Philip Martin <ph...@wandisco.com>.
Graham Leggett <mi...@sharp.fm> writes:
> + if (arg2) {
> +#if AP_MODULE_MAGIC_AT_LEAST(20111025,3)
> + const char *expr_err = NULL;
> +
> + conf->fs_path->expr = ap_expr_parse_cmd(cmd, arg2, AP_EXPR_FLAG_STRING_RESULT,
> + &expr_err, NULL);
> + if (expr_err) {
> + apr_pstrcat(cmd->temp_pool,
> + "Cannot parse expression in SVNPath: ",
> + expr_err, NULL);
expr_err contains the error message if parsing fails but it appears to
be discared.
> + }
You have an unmatched } inside the #if but not in the #else, one of them
is wrong.
> +#else
> + return "Expressions require httpd v2.4.0 or higher"
> +#endif
> + }
> +
> return NULL;
> }
>
>
> static const char *
> -SVNParentPath_cmd(cmd_parms *cmd, void *config, const char *arg1)
> +SVNParentPath_cmd(cmd_parms *cmd, void *config, const char *arg1, const char *arg2)
> {
> dir_conf_t *conf = config;
>
> if (conf->fs_path != NULL)
> return "SVNParentPath cannot be defined at same time as SVNPath.";
>
> - conf->fs_parent_path = svn_dirent_internal_style(arg1, cmd->pool);
> + conf->fs_parent_path = apr_pcalloc(cmd->pool, sizeof(path_expr_t));
> + conf->fs_parent_path->base = svn_dirent_internal_style(arg1, cmd->pool);
>
> + if (arg2) {
> +#if AP_MODULE_MAGIC_AT_LEAST(20111025,3)
> + const char *expr_err = NULL;
> +
> + conf->fs_path->expr = ap_expr_parse_cmd(cmd, arg2, AP_EXPR_FLAG_STRING_RESULT,
> + &expr_err, NULL);
> + if (expr_err) {
> + apr_pstrcat(cmd->temp_pool,
> + "Cannot parse expression in SVNParentPath: ",
> + expr_err, NULL);
> + }
> +#else
> + return "Expressions require httpd v2.4.0 or higher"
> +#endif
> + }
Same problems as above in this repeated code. It's relatively small but
perhaps factor into a separate function?
> +
> return NULL;
> }
>
> @@ -668,7 +713,61 @@
> dir_conf_t *conf;
>
> conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
> - return conf->fs_path;
> +
> + if (conf->fs_path)
> + {
> +
> + #if AP_MODULE_MAGIC_AT_LEAST(20111025,3)
> + if (conf->fs_path->expr)
> + {
> + svn_error_t *serr;
> + svn_boolean_t under_root;
> + const char *err = NULL, *suffix;
> +
> + suffix = ap_expr_str_exec(r, conf->fs_path->expr, &err);
> + if (!err)
> + {
> + serr = svn_dirent_is_under_root(&under_root,
> + &suffix, conf->fs_path->base, suffix, r->pool);
> + if (!serr && under_root)
> + {
> + return svn_dirent_join(conf->fs_path->base,
> + svn_dirent_internal_style(suffix, r->pool), r->pool);
> + }
> + else if (serr)
> + {
> + ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, r,
> + "mod_dav_svn: SVNParentPath: '%s' not under '%s': '%s'",
> + suffix, conf->fs_path->base,
> + serr->message ? serr->message : "(no more info)");
> + return NULL;
> + }
> + else
> + {
> + ap_log_rerror(
> + APLOG_MARK, APLOG_ERR, 0, r,
> + "mod_dav_svn: SVNParentPath: '%s' not under '%s'",
> + suffix, conf->fs_path->base);
> + return NULL;
> + }
> + }
> + else
> + {
> + ap_log_rerror(
> + APLOG_MARK, APLOG_ERR, 0, r, "mod_dav_svn: SVNParentPath: can't "
> + "evaluate expression: %s", err);
> + return NULL;
> + }
> +
> + }
> + #endif
This bit of code is also repeated and is probably big enough to be
factored into a separate function.
> +
> + return conf->fs_path->base;
> + }
> + else
> + {
> + return NULL;
> + }
> }
--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Graham Leggett <mi...@sharp.fm>.
On 02 Mar 2015, at 1:25 PM, Branko Čibej <br...@wandisco.com> wrote:
> You may have missed my mail from a couple days ago:
I did, sorry - I’m not subscribed to the list.
>> I think this would be a nice feature to have in mod_dav_svn. It is, IMO,
>> a better approach than the one currently implemented on the
>> SVNParentPathTemplate branch, even if it is limited to httpd-2.4+.
>>
>> Graham, I've created a branch for this:
>>
>> ^/subversion/branches/mod-dav-svn-expressions
>>
>> you can commit your patch there, if you will; you have the necessary
>> karma since Subversion-the-project uses the universal-commit bit.
>>
>> Once that's done, we'll want to tweak our test suite so that we can test
>> the new feature, and probably update docs and so on.
>
> Please go ahead and commit the patch (and any further changes) to the
> branch.
Over the weekend I discovered that things aren’t that simple (or at least they are simple if you don’t want to use elements of the path in your templates, but that is quite a nasty limitation when we have SVNParentPath doing this very thing).
Two patches posted to the dev@httpd mailing list lift the above limitation[1][2], by providing an optional mechanism to a) pass a proper effective path to mod_dav_svn instead of the (useless) raw regular expression, and b) allow expressions to be used in this effective path so we can place dynamic elements of the uri into our template.
This allows us to do this:
<LocationMatch /svn/%{env:MATCH_PARTITIONNAME} ^/svn/(?<PARTITIONNAME>[^/]+)/>
DAV svn
SVNParentPath /home/${HOST} %{env:MATCH_PARTITIONNAME}/svn
SVNListParentPath on
</Location>
The above will map https://svn.example.com/svn/customer1/repo1 to /home/server/customer1/svn/repo1. (Explanation: customer1 has a dedicated partition, and the partition contains a number of services, including but not limited to many svn repos anchored below “svn”)
The most recent path is attached, I’ll commit it to the branch as well. I just wanted to explain the limitation and patches above before anyone reviewed it. Obviously on the httpd side documentation will be updated accordingly.
[1] http://mail-archives.apache.org/mod_mbox/httpd-dev/201503.mbox/%3c05B811A5-1B6E-4417-BC3B-172673A78817@sharp.fm%3e
[2] http://mail-archives.apache.org/mod_mbox/httpd-dev/201503.mbox/%3c03FFF05A-6002-4B71-90FC-6C82B6BCFB6F@sharp.fm%3e
Regards,
Graham
—
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Branko Čibej <br...@wandisco.com>.
On 01.03.2015 15:23, Graham Leggett wrote:
> On 27 Feb 2015, at 2:14 AM, Graham Leggett <mi...@sharp.fm> wrote:
>
>> By way of background, I added the regex named grouping support to httpd that allowed you to do stuff like <LocationMatch ^/svn/(?<CUSTOMERNAME>[^/]+)/>, and I’ve been adding expression support to a growing list of httpd directives, starting with all the require directives, and then following up with Alias and Redirect.
>>
>> What I’m trying to achieve is to lower the cost of httpd directives, both in terms of the amount of config required to achieve a certain aim, as well as making it possible to administer an httpd server (and svn repository) using changes to an LDAP directory only.
>>
>> I chose the two argument layout for SVNPath and SVNParentPath as it was both backwards compatible with existing configs and had the side effect that the expression could be rooted below a specific root directory for safety, given that the directory pointed at by SVNPath isn’t protected (to my knowledge) by <Directory> blocks. It also had the side effect that SVNParentPath could give us a list of repositories rather nicely.
> Here is an updated patch below that fixes the return issue (apr_pstrcat does nothing) and some formatting.
>
> I have found a new issue - mod_dav_svn (and mod_dav itself) don’t work properly inside a <LocationMatch>, This is caused as the raw regex is passed as the path, which then triggers an assertion failure inside libsvn. This needs an httpd fix, will look at that in the mean time.
Hi Graham,
You may have missed my mail from a couple days ago:
> I think this would be a nice feature to have in mod_dav_svn. It is, IMO,
> a better approach than the one currently implemented on the
> SVNParentPathTemplate branch, even if it is limited to httpd-2.4+.
>
> Graham, I've created a branch for this:
>
> ^/subversion/branches/mod-dav-svn-expressions
>
> you can commit your patch there, if you will; you have the necessary
> karma since Subversion-the-project uses the universal-commit bit.
>
> Once that's done, we'll want to tweak our test suite so that we can test
> the new feature, and probably update docs and so on.
Please go ahead and commit the patch (and any further changes) to the
branch.
-- Brane
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Graham Leggett <mi...@sharp.fm>.
On 27 Feb 2015, at 2:14 AM, Graham Leggett <mi...@sharp.fm> wrote:
> By way of background, I added the regex named grouping support to httpd that allowed you to do stuff like <LocationMatch ^/svn/(?<CUSTOMERNAME>[^/]+)/>, and I’ve been adding expression support to a growing list of httpd directives, starting with all the require directives, and then following up with Alias and Redirect.
>
> What I’m trying to achieve is to lower the cost of httpd directives, both in terms of the amount of config required to achieve a certain aim, as well as making it possible to administer an httpd server (and svn repository) using changes to an LDAP directory only.
>
> I chose the two argument layout for SVNPath and SVNParentPath as it was both backwards compatible with existing configs and had the side effect that the expression could be rooted below a specific root directory for safety, given that the directory pointed at by SVNPath isn’t protected (to my knowledge) by <Directory> blocks. It also had the side effect that SVNParentPath could give us a list of repositories rather nicely.
Here is an updated patch below that fixes the return issue (apr_pstrcat does nothing) and some formatting.
I have found a new issue - mod_dav_svn (and mod_dav itself) don’t work properly inside a <LocationMatch>, This is caused as the raw regex is passed as the path, which then triggers an assertion failure inside libsvn. This needs an httpd fix, will look at that in the mean time.
Regards,
Graham
—
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Graham Leggett <mi...@sharp.fm>.
On 26 Feb 2015, at 10:18 PM, Mark Phippard <ma...@gmail.com> wrote:
> Just a note to those reviewing this patch. C-Mike did something "similar" on a branch here:
>
> http://svn.apache.org/repos/asf/subversion/branches/SVNParentPathTemplate/ <http://svn.apache.org/repos/asf/subversion/branches/SVNParentPathTemplate/>
>
> I notice there is no branch.readme but the commit messages probably explain the behavior and there was thread on it here:
>
> http://svn.haxx.se/dev/archive-2013-08/0168.shtml <http://svn.haxx.se/dev/archive-2013-08/0168.shtml>
By way of background, I added the regex named grouping support to httpd that allowed you to do stuff like <LocationMatch ^/svn/(?<CUSTOMERNAME>[^/]+)/>, and I’ve been adding expression support to a growing list of httpd directives, starting with all the require directives, and then following up with Alias and Redirect.
What I’m trying to achieve is to lower the cost of httpd directives, both in terms of the amount of config required to achieve a certain aim, as well as making it possible to administer an httpd server (and svn repository) using changes to an LDAP directory only.
I chose the two argument layout for SVNPath and SVNParentPath as it was both backwards compatible with existing configs and had the side effect that the expression could be rooted below a specific root directory for safety, given that the directory pointed at by SVNPath isn’t protected (to my knowledge) by <Directory> blocks. It also had the side effect that SVNParentPath could give us a list of repositories rather nicely.
Regards,
Graham
—
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Mark Phippard <ma...@gmail.com>.
Just a note to those reviewing this patch. C-Mike did something "similar"
on a branch here:
http://svn.apache.org/repos/asf/subversion/branches/SVNParentPathTemplate/
I notice there is no branch.readme but the commit messages probably explain
the behavior and there was thread on it here:
http://svn.haxx.se/dev/archive-2013-08/0168.shtml
Mark
On Wed, Feb 25, 2015 at 11:35 AM, Graham Leggett <mi...@sharp.fm> wrote:
> Hi all,
>
> The SVNParentPath directive allows a set of repos to be placed at an URL,
> but if you have more complex needs such as providing many customers (with
> separately mounted home directories) access to many repositories, this may
> not be enough.
>
> The attached patch brings httpd v2.4 expression support to the SVNPath and
> SVNParentPath directories through the addition of an optional second
> parameter, which allows you to do stuff like this:
>
> <LocationMatch ^/svn/(?<CUSTOMERNAME>[^/]+)/>
>
> # customer has their own partition, inside is an “svn” directory
> with repos in it
> SVNParentPath /home/partition %{env:MATCH_CUSTOMERNAME}/svn
>
> # customer repos are protected by this group
> require ldap-group cn=https://svn.
> ${SERVER_SUFFIX}/%{env:MATCH_CUSTOMERNAME},ou=svn,ou=Groups,o=Somewhere
>
> </LocationMatch>
>
> Or perhaps this based on the HOST header (and a wildcard SSL cert):
>
> <Location />
>
> # customer has their own partition, inside is an “svn” directory
> with repos in it
> SVNParentPath /home/svn %{HTTP_HOST}
>
> # customer repos are protected by this group
> require ldap-group cn=%{HTTP_HOST},ou=svn,ou=Groups,o=Somewhere
>
> </Location>
>
> Both the SVNPath and SVNParentPath directives now take an optional second
> argument, containing a string expression to be evaluated and added to the
> end of the primary path. If the expression evaluates to a path above the
> first argument, an error will be returned.
>
> The patch was developed against trunk, and applies clean to v1.7.19.
>
> Regards,
> Graham
> —
>
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
Re: [Patch] Expression support for SVNPath and SVNParentPath
Posted by Branko Čibej <br...@wandisco.com>.
On 25.02.2015 17:35, Graham Leggett wrote:
> Hi all,
>
> The SVNParentPath directive allows a set of repos to be placed at an URL, but if you have more complex needs such as providing many customers (with separately mounted home directories) access to many repositories, this may not be enough.
>
> The attached patch brings httpd v2.4 expression support to the SVNPath and SVNParentPath directories through the addition of an optional second parameter, which allows you to do stuff like this:
>
> <LocationMatch ^/svn/(?<CUSTOMERNAME>[^/]+)/>
>
> # customer has their own partition, inside is an “svn” directory with repos in it
> SVNParentPath /home/partition %{env:MATCH_CUSTOMERNAME}/svn
>
> # customer repos are protected by this group
> require ldap-group cn=https://svn.${SERVER_SUFFIX}/%{env:MATCH_CUSTOMERNAME},ou=svn,ou=Groups,o=Somewhere
>
> </LocationMatch>
>
> Or perhaps this based on the HOST header (and a wildcard SSL cert):
>
> <Location />
>
> # customer has their own partition, inside is an “svn” directory with repos in it
> SVNParentPath /home/svn %{HTTP_HOST}
>
> # customer repos are protected by this group
> require ldap-group cn=%{HTTP_HOST},ou=svn,ou=Groups,o=Somewhere
>
> </Location>
>
> Both the SVNPath and SVNParentPath directives now take an optional second argument, containing a string expression to be evaluated and added to the end of the primary path. If the expression evaluates to a path above the first argument, an error will be returned.
>
> The patch was developed against trunk, and applies clean to v1.7.19.
I think this would be a nice feature to have in mod_dav_svn. It is, IMO,
a better approach than the one currently implemented on the
SVNParentPathTemplate branch, even if it is limited to httpd-2.4+.
Graham, I've created a branch for this:
^/subversion/branches/mod-dav-svn-expressions
you can commit your patch there, if you will; you have the necessary
karma since Subversion-the-project uses the universal-commit bit.
Once that's done, we'll want to tweak our test suite so that we can test
the new feature, and probably update docs and so on.
-- Brane