symcbean
symcbean

Reputation: 48367

Why is Perl using LDAP?

Amongst the stuff I have inherited in my current role is an ancient Perl CGI web application (circa 2002). The connects to an Oracle database. It appears to be using an equally ancient LDAP server to resolve the Oracle database. Formerly, everything here used the LDAP service to retrieve the TNS connection definition. We have migrated everything else to use a simpler DNS name based connection string. I want to do the same for the Perl code.

But I can't find any references to the LDAP server in the Perl code.

I can establish a direct correlation between an HTTP request being made (and hence the perl code executing) and a connection to the LDAP server.

Looking in the code, the DBI constructor looks like this:

$dbh = DBI->connect("DBI:Oracle:DB","username","password", {RaiseError => 1,AutoCommit => 1}) || die("Connecting to oracle");

(but with different literals for DB, username and password).

Clearly this is using a TNS definition, but I can't see how Perl knows to lookup the TNS definition in the LDAP service, nor any indication of where it should find the LDAP service.

I've looked through all the referenced Perl module files and can't see any reference to "LDAP" nor the LDAP host.

(but I did scan te entire filesystem for a tnsnames.ora file and didn't find one other than the sample file in the Oracle client install).

Where else should I be looking?

Upvotes: 0

Views: 108

Answers (1)

Justin Cave
Justin Cave

Reputation: 231761

I would expect that you'd find a sqlnet.ora file on the server that has a names.directory_path setting that includes LDAP. Likely, there will be some names.ldap_* settings in that file as well.

Upvotes: 2

Related Questions