httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch...@netzone.com
Subject user_dir
Date Tue, 07 Nov 1995 17:29:01 GMT
I need help in modifying the mod_userdir.c module. I am just 
learning c and need help in setting the apache to recognize 
user directories on a nfs. Here is a diff file from a modified 
ncsa system. If you can comment the mod I would appreciate it!

bash# diff http_alias.c http_alias.c~
77,115c77,84
<               {
<                       struct stat finfo;
<                       char t[HUGE_STRING_LEN];
<
<                       /*
<                       ** at this point we don't have ~user 
on our machine, but
 lets try
<                       ** to look for the files in 
/global/www/users/USERNAME
<                       */
<                       strcpy(t,"/global/netzone/");
<                       strcat(t,w);
<
<                       if(!(stat(t,&finfo)))
<                       {
<                               if(S_ISDIR(finfo.st_mode))
<                               {
<                                       fake[0] = '/';
<                                       fake[1] = '~';
<                                       strcpy(&fake[2],w);
<                                       
make_full_path(t,user_dir,real);
<                                       
add_alias(fake,real,STD_DOCUMENT);
<                                       strsubfirst(strlen(w) 
+ 2,name,real);
<                                       return STD_DOCUMENT;
<                               }
<                               else
<                                       
die(NOT_FOUND,name,fd);
<                       }
<                       else
<                               die(NOT_FOUND,name,fd);
<               }
<               else
<               {
<                       fake[0] = '/';
<                       fake[1] = '~';
<                       strcpy(&fake[2],w);
<                       
make_full_path(pw->pw_dir,user_dir,real);
<                       add_alias(fake,real,STD_DOCUMENT);
<                       strsubfirst(strlen(w) + 2,name,real);
<                       return STD_DOCUMENT;
<               }
---
>             die(NOT_FOUND,name,fd);
>         fake[0] = '/';
>         fake[1] = '~';
>         strcpy(&fake[2],w);
>         make_full_path(pw->pw_dir,user_dir,real);
>         add_alias(fake,real,STD_DOCUMENT);
>         strsubfirst(strlen(w) + 2,name,real);
>         return STD_DOCUMENT;




Mime
View raw message