Hi mattnovi,

On Saturday, 19. January 2008, Graham Barr wrote:
> On Jan 17, 2008, at 10:14 PM, [EMAIL PROTECTED] wrote:
> > It seems that Net::LDAP is not correctly using the loopback interface
> > when being used to connect to an LDAP server on the same machine.
> > This cases SElinux to think it is attempting to make an off-box
> > connection. SELinux has restrictions on web applications doing this by
> > default.
> >
> > Symptom:  When attemtping ot login BugZilla reports that the
> > connection to the ldap server "ldap://localhost"; failed yet the server
> > is running and other clients (even a test Perl script I wrote) works
> > fine. The Net::LDAP->new call is simply failing and causing this.
>
> Net::LDAP will be using IO::Socket::INET with host "localhost" and
> port 389
>
> What do you see when you run
>
> telnet localhost 389
>
> Do you get connection refused ?
>
> > Other socket-based applications such as MySQL seem to work.
>
> MySQL will use UNIX domain sockets instead of INET domain sockets if
> the hostname is localhost

If your LDAP server supports LDAPI connections, i.e. LDAP over Unix domain 
sockets (as e.g. OpenLDAP does), you may use ldapi:// style URLs.
See Net::LDAP(3pm) for details.

Hope this helps
Peter

-- 
Peter Marschall
[EMAIL PROTECTED]

Reply via email to