ASF Bugzilla – Attachment 22188 Details for
Bug 45259
Add /home/[a-z]/* scheme to UserDir conf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for mod_userdir.c to add a new UserDir conf scheme.
mod_userdir.patch (text/plain), 1.18 KB, created by
sandoz
on 2008-06-27 06:42:19 UTC
(
hide
)
Description:
Patch for mod_userdir.c to add a new UserDir conf scheme.
Filename:
MIME Type:
Creator:
sandoz
Created:
2008-06-27 06:42:19 UTC
Size:
1.18 KB
patch
obsolete
>--- apache2-2.2.3.orig/modules/mappers/mod_userdir.c 2006-07-12 05:38:44.000000000 +0200 >+++ apache2-2.2.3/modules/mappers/mod_userdir.c 2008-06-27 11:22:45.129901954 +0200 >@@ -245,12 +245,23 @@ > > while (*userdirs) { > const char *userdir = ap_getword_conf(r->pool, &userdirs); >- char *filename = NULL, *x = NULL; >+ char *filename = NULL, *x = NULL, *S = NULL, *s = NULL; > apr_status_t rv; > int is_absolute = ap_os_is_path_absolute(r->pool, userdir); > >- if (ap_strchr_c(userdir, '*')) >- x = ap_getword(r->pool, &userdir, '*'); >+ if ((S = ap_strchr_c(userdir, '?')) && S < ap_strchr_c(userdir, '*')) { >+ // Get the characters until '?' >+ S = ap_getword(r->pool, &userdir, '?'); >+ // Copy the first letter of the username! >+ s= apr_pstrndup(r->pool, w, 1); >+ // Get the next characters until '*' (usally only '/') >+ x = ap_getword(r->pool, &userdir, '*'); >+ // Concat everything together. >+ x = apr_pstrcat(r->pool, S, s, x, NULL); >+ } else { >+ if (ap_strchr_c(userdir, '*')) >+ x = ap_getword(r->pool, &userdir, '*'); >+ } > > if (userdir[0] == '\0' || is_absolute) { > if (x) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45259
: 22188