[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [TSVN] odd authentication problems

From: Nathan Creek <nathan_at_adweb.com.au>
Date: 2004-11-04 03:59:19 CET

Hi Ben,

This seems a bit off topic for this list, but i'll help you out anyway.

> The error says something about, erm "samba not being in state 3"
I has exactly the same problem when i was setting up our server.
Apache-2.0.50 + svn-1.1.0-rc2 + AuthenNTLM-2.08 + perl-5.8.4

I spent a couple of days figuring this out, although it took me a bit
longer because i don't know perl all that well. In the end i had to hack
the AuthenNTLM.pm script to get it working.

There were two problems i found.
One was to do with a temporary array variable used to get around
differences between apache-1.3 and apache-2. It was not returning data
from the array that was assigned to it.
The second was because of an IE check that was being done. The IE check
was failing sometimes because it only allowed certain methods. To begin
with i started adding in the extra methods that svn needs, like MKCOL
and MKACTIVITY, but in the end i decided just to ignore the check
altogether and everything seems to be working fine.

I've appended a diff of the changes i made.

Cheers,
Nathan

--- /usr/local/src/Apache-AuthenNTLM-2.08/AuthenNTLM.pm 2004-10-05
03:11:24.000000000 +1000
+++ AuthenNTLM.pm 2004-11-04 13:40:18.000000000 +1100
@@ -558,26 +558,22 @@
  # bless $self, $class ;
  # $cache = $self ;
  # print STDERR "[$$] AuthenNTLM: Setup new object\n" if ($debug) ;
  # }

- my $table;
- MP2 ? $table = $conn->notes() : $table = $r->notes();
       if (ref ($cache) ne $class || $$conn != $cache->{connectionid} ||
         (!MP2 && $conn->remote_host ne $cache->{remote_host}) ||
- (MP2 && $table->get('status') ne "AUTHSTARTED"))
+ (MP2 && $conn->notes()->get('status') ne "AUTHSTARTED"))
         {
           if (!MP2)
           {
               $conn->remote_host ($conn->remote_host . ' ');
               $self = {connectionid => $$conn, remote_host => $conn ->
remote_host} ;
           }
           elsif (MP2)
           {
- my $table = $conn->notes();
- $table->add('status','AUTHSTARTED');
- $conn->notes($table);
+ $conn->notes()->add('status', 'AUTHSTARTED');
               $self = {connectionid => $$conn } ;
          }
           bless $self, $class ;
           $cache = $self ;
           print STDERR "[$$] AuthenNTLM: Setup new object\n" if ($debug) ;
@@ -603,16 +599,12 @@

              # IE (5.5, 6.0, probably others) can send a type 1 message
              # after authenticating on the same connection. This is a
              # problem for POST messages, because IE also sends a
              # "Content-length: 0" with no POST data.
- if ($method eq 'GET' || $method eq 'HEAD' || $method eq
'OPTION' || $method eq 'DELETE' ||
- $content_len > 0 || $type == 3)
- {
                  print STDERR "[$$] AuthenNTLM: OK because same
connection\n" if ($debug) ;
                  return MP2 ? Apache::OK : Apache::Constants::OK ;
- }

              }
          }
      # end of if statement

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Nov 4 03:59:41 2004

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.