Small patch for ldap in NoCatAuth.

Pieppo <[email protected]>
Newsgroups gmane.network.nocat
Message-ID <[email protected]>
Hi all,

   here is a small patch to add ldap_version do
NoCatAuth.
This way you can choose to bind to ldap server using
ldap version 3 (required by the server I use).

Ciao

Pietro


		
___________________________________
Scopri Mister Yahoo! - il fantatorneo sul calcio di Yahoo! Sport
http://it.seriea.fantasysports.yahoo.com/

_______________________________________________
NoCat mailing list
[email protected]
http://lists.nocat.net/mailman/listinfo/nocat
ldap_version.patch (text/x-patch, 1.7 KB)
diff -rup NoCatAuth-nightly/authserv.conf NoCatAuth-nightly.patched/authserv.conf
--- NoCatAuth-nightly/authserv.conf	Mon Mar 17 23:46:11 2003
+++ NoCatAuth-nightly.patched/authserv.conf	Tue Sep 14 12:01:41 2004
@@ -73,6 +73,7 @@ DB_Passwd	whodatatmydo?!
 #	    everything but creation should be done as anonymous
 #    LDAP_Filter - Attribute name containing user's ID, email address 
 #	or username.
+#    LDAP_Version - Set the protocol version being used (default is LDAPv2)
 #
 # This version of LDAP.pm has been updated and tested against a Novell eDirectory
 # LDAP server.  The login "unique ID" - the e-mail address - is stored as an
@@ -91,6 +92,7 @@ DB_Passwd	whodatatmydo?!
 # LDAP_Hash_Passwords	Yes
 # LDAP_Search_as_Admin	Yes
 # LDAP_Filter		mail
+# LDAP_Version		2
 
 ## RADIUS support. Requires Authen::Radius to be installed from the CPAN.
 #
diff -rup NoCatAuth-nightly/lib/NoCat/Source/LDAP.pm NoCatAuth-nightly.patched/lib/NoCat/Source/LDAP.pm
--- NoCatAuth-nightly/lib/NoCat/Source/LDAP.pm	Fri Mar  7 02:24:21 2003
+++ NoCatAuth-nightly.patched/lib/NoCat/Source/LDAP.pm	Tue Sep 14 11:59:16 2004
@@ -32,7 +32,7 @@ use vars qw( @ISA @REQUIRED );
 
 @ISA	    = qw( NoCat::Source );
 @REQUIRED   = qw(
-    LDAP_Host LDAP_Base LDAP_Admin_User LDAP_Admin_PW LDAP_Filter
+    LDAP_Host LDAP_Base LDAP_Admin_User LDAP_Admin_PW LDAP_Filter LDAP_Version
     UserIDField GroupTable GroupIDField GroupAdminField
 );
 
@@ -40,7 +40,7 @@ use vars qw( @ISA @REQUIRED );
 sub ldap {
     my ($self) = @_;
     unless ($self->{LDAP}) {
-	my $ldap = Net::LDAP->new( $self->{LDAP_Host} );
+	my $ldap = Net::LDAP->new( $self->{LDAP_Host}, version => $self->{LDAP_Version} );
 	if ($ldap) {
 	    $self->{LDAP} = $ldap;
 	} else {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.