[patch- V3] lib/smbldap.c not honoring config.h settings

John E. Malmberg wb8tyw at qsl.net
Thu Jun 1 19:07:09 GMT 2006


Hello all,

lib/smbldap.c is not paying attention to the config.h settings for 
HAVE_LDAP_SET_REBIND_PROC or HAVE_UNIXSOCKET.

On OpenVMS the LDAP client library currently does not have the 
ldap_set_rebind_proc() routine.

I am not sure what the impact of this is to the SAMBA functionality.

OpenVMS also does not have the ldap_initialize() routine at this time 
either, so full participation in an Active Directory has been disabled 
by the configure process.

OpenVMS also does not support UNIX domain sockets, however it does 
support equivalent functionality through a different API.

Thanks,
-John
wb8tyw at qsl.net
Personal Opinion Only
-------------- next part --------------
--- /src_root/samba_3_0/source/lib/smbldap.c	Thu Jun  1 01:33:38 2006
+++ /lcl_root/samba_3_0/source/lib/smbldap.c	Wed May 31 08:29:09 2006
@@ -944,6 +944,7 @@
 	DEBUG(10,("ldap_connect_system: Binding to ldap server %s as \"%s\"\n",
 		  ldap_state->uri, ldap_dn));
 
+#ifdef HAVE_LDAP_SET_REBIND_PROC
 #if defined(LDAP_API_FEATURE_X_OPENLDAP) && (LDAP_API_VERSION > 2000)
 # if LDAP_SET_REBIND_PROC_ARGS == 2	
 	ldap_set_rebind_proc(ldap_struct, &rebindproc_connect);	
@@ -959,7 +960,7 @@
 	ldap_set_rebind_proc(ldap_struct, &rebindproc_with_state, (void *)ldap_state);	
 # endif
 #endif /*defined(LDAP_API_FEATURE_X_OPENLDAP) && (LDAP_API_VERSION > 2000)*/
-
+#endif
 	rc = ldap_simple_bind_s(ldap_struct, ldap_dn, ldap_secret);
 
 	if (rc != LDAP_SUCCESS) {
@@ -1009,7 +1010,11 @@
 
 	if ((ldap_state->ldap_struct != NULL) && ((ldap_state->last_ping + SMBLDAP_DONT_PING_TIME) < time(NULL))) {
 
+#ifdef HAVE_UNIXSOCKET
 		struct sockaddr_un addr;
+#else
+		struct sockaddr addr;
+#endif
 		socklen_t len = sizeof(addr);
 		int sd;
 


More information about the samba-technical mailing list