[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Binary vs. Shared Objects





On Tue, 10 Aug 2004, Jason Gerfen wrote:

ldap_simple_bind_s()
ldap_simple_bind()

My question is regarding the two api calls listed above. I have made two items, one is a regular search program designed to filter out everything except fields I need. and the other is a shared object, or pam module.

The application called from ./search works fine, initializes, binds, searches and retrives values. I attempt the same thing in a shared object compiled with the -lpam option and the ldap_simple_bind() & ldap_simple_bind_s() api calls fail everytime.

For a ldap_simple_bind() calls I do the following:

if( ldap_simple_bind( ld, "username", "password" ) != 0 ) {
_log_err( LOG_WARN, "Bind successful" );
}

For a ldap_simple_bind_s() call I do the following:

if( ldap_simple_bind_s( ld, "username", "password" ) == LDAP_SUCCESS ) {
_log_err( LOG_WARN, "Bind successful" );
}

In both cases if I compile it as a shared object with the following compile commands it fails:

gcc -fPIC -o pam_ldap.o -c pam_ldap.c
ld -x --shared -o pam_ldap.so -lpam -lldap

Any help, pointers etc. is appreciated as I have scoured the ldap man pages and found nothing on this, as well as the SDK pages from netscape.


You are on the wrong list. This list is for OpenLDAP related questions. Try general ldap mailing list ldap@umich.edu.


--
Igor