Changes with Apache 2.0b1
- *) Corrected an OS2'ism of apr_get_home_directory. OS2 now returns the
- proper directory, including the user's name.
-
- *) Removed private os2errno.h and integrated the OS2 network error codes
- into apr_errno.h for optimized error tests (APR_STATUS_IS_EFOO(rv)).
- [William Rowe]
-
- *) Moved inclusion of <os2.h> header from multiple modules into apr.h
- [William Rowe]
+ *) Adopt apr features for simplifing mod_userdir, and accept the new
+ Win32/OS2 exceptions without hiccuping. [William Rowe]
*) Replace configure --with-optim option by using and saving the
environment variable OPTIM instead. This is needed because configure
while (*userdirs) {
const char *userdir = ap_getword_conf(r->pool, &userdirs);
char *filename = NULL;
+ apr_status_t rv;
if (ap_strchr_c(userdir, '*'))
x = ap_getword(r->pool, &userdir, '*');
char *homedir;
if (apr_get_home_directory(&homedir, w, r->pool) == APR_SUCCESS) {
-#ifdef OS2 /* XXX should this OS/2 logic move to APR? */
- /* Need to manually add user name for OS/2 */
- filename = apr_pstrcat(r->pool, homedir, w, "/", userdir, NULL);
-#else
filename = apr_pstrcat(r->pool, homedir, "/", userdir, NULL);
-#endif
}
else {
- /* XXX old code ignored this error... */
+ return DECLINED;
}
#else
return DECLINED;
* anyway, in the hope that some handler might handle it. This can be
* used, for example, to run a CGI script for the user.
*/
- if (filename && (!*userdirs ||
- apr_stat(&statbuf, filename,
- APR_FINFO_NORM, r->pool) == APR_SUCCESS)) {
+ if (filename && (!*userdirs
+ || ((rv = apr_stat(&statbuf, filename, APR_FINFO_NORM,
+ r->pool)) == APR_SUCCESS
+ || rv == APR_INCOMPLETE))) {
r->filename = apr_pstrcat(r->pool, filename, dname, NULL);
- /* when statbuf contains info on r->filename we can save a syscall
+ /* XXX: Does this walk us around FollowSymLink rules?
+ * When statbuf contains info on r->filename we can save a syscall
* by copying it to r->finfo
*/
if (*userdirs && dname[0] == 0)