Skip to content

Commit

Permalink
Fix mod_rewrite to work with the new APR stat structure.
Browse files Browse the repository at this point in the history
Submitted by:  Paul Reder
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84402 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ryan Bloom committed Jan 7, 2000
1 parent f51096b commit 67ccb45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/mappers/mod_rewrite.c
Expand Up @@ -3762,8 +3762,8 @@ static char *lookup_variable(request_rec *r, char *var)
/* file stuff */
else if (strcasecmp(var, "SCRIPT_USER") == 0) {
result = "<unknown>";
if (r->finfo.st_mode != 0) {
if ((pw = getpwuid(r->finfo.st_uid)) != NULL) {
if (r->finfo.protection != 0) {
if ((pw = getpwuid(r->finfo.user)) != NULL) {
result = pw->pw_name;
}
}
Expand All @@ -3777,8 +3777,8 @@ static char *lookup_variable(request_rec *r, char *var)
}
else if (strcasecmp(var, "SCRIPT_GROUP") == 0) {
result = "<unknown>";
if (r->finfo.st_mode != 0) {
if ((gr = getgrgid(r->finfo.st_gid)) != NULL) {
if (r->finfo.protection != 0) {
if ((gr = getgrgid(r->finfo.group)) != NULL) {
result = gr->gr_name;
}
}
Expand Down

0 comments on commit 67ccb45

Please sign in to comment.