Enrico Sorcinelli wrote:OK, final questions for the day...
BTW, has anyone read the documentation in AuthenNTLM.pm? Here is an example on how to only call AuthenNTLM if a precondition is met...On Tue, 04 Nov 2003 09:13:34 -0600 Shannon Eric Peevey <[EMAIL PROTECTED]> wrote:
BTW, I don't see the module asking for authorization for every object, only when the client asks for something in a new directory. (It's a little hard to tell from the debug log if the calls to the samba server are made for every object, I need a little more time to follow its logic through. But, on the client side, I am not seeing the 401 returned for every object.)
How about improving the module by adding some caching mechanism for authenticated users?
Moreover it could be nice to control it with PerlSetVar directives (ttl and so on)
by
- Enrico
=head2 Example for overriding
The following code shows the a basic example for creating a module which
overrides the map_user method and calls AuthenNTLM's handler only if a
precondition is met. Note: The functions preconditon_met and lookup_user
do the real work and are not shown here.
package Apache::MyAuthenNTLM ;
use Apache::AuthenNTLM ;
@ISA = ('Apache::AuthenNTLM') ;
sub handler ($$)
{
my ($self, $r) = @_ ;
return Apache::AuthenNTLM::handler ($self, $r) if (precondition_met()) ;
return DECLINED ;
}
sub map_user
{
my ($self, $r) = @_ ;
return lookup_user ($self->{userdomain}, $self->{username}) ; }
This should work for now, and I will bang around and see how much work it will take to add in a caching feature directly into the module. Seems that it would be useful for a lot of people, right?
speeves cws
1. Apache-AuthenNTLM already caches the connections to the samba server. I am assuming that we are having a problem with queries passing through this connection, and not a "too many connections" problem on the samba server end, right?
(NOTE: (Mathias) Apache-AuthenSMB does not cache the connections, so what are we seeing with it exactly? )
2. Do we really need to handle caching within this module? Might it not be handled by one of the Caching modules that Michael Parker mentioned in an earlier email? (http://marc.theaimsgroup.com/?l=apache-modperl&m=106780304521226&w=2)
3. If we do add caching into the Apache-AuthenNTLM mod, where do we cache the yes/no variable, and when do we destroy it?
thanks for your input, speeves cws
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html