[users@httpd] Modifying the WebDAV module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Apache users,

I'm part of a project where we are trying to slightly change the
behavior of the way the WebDAV module works.  Basically, our goal is to
be able to create a number of directories under a given webroot
(/.../htdocs/user1, /.../htdocs/user2, etc), and then make it such that
each user's requests for file activities take place in their own little
"sandbox".  Thus, the user "user1" requesting the file "/test.txt" gets
the file from /.../htdocs/user1/test.txt and is unaware the file is
coming from his own sandbox directory.  We want to do this in such a way
that adding a new user doesn't require modifications to httpd.conf, as well.

Our original plan was to require authentication to the root directory. 
This would put the user's id in a field in the request_rec structure. 
Then, we would modify the code in mod_dav.c to detect the user's id and
rewrite the fields in the request_rec structure to point to a location
inside the user's sandbox directory.  This seemed like a good idea at
the time, but our attempts at implementing this haven't worked.  To be
specific, our modifications seem to do nothing at all.  Specifically,
we've been focusing on altering the function dav_get_resource( ) in
mod_dav.c.  Within this function, we have tried rewriting the field
r->uri and have also tried rewriting the field conf->dir.  In either
case, the effect produced behavior identical to an unmodified copy of
mod_dav.c.

So, I have two questions: (1) Is there an easier way to do this?  (2) If
the idea is sound, what would be the correct way to rewrite the
variables involved in mod_dav's behavior?

--
Rhett.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux