[Samba] Samba 2.2.8 compile failure - Solaris 8, SunCC, LDAP

Gerald (Jerry) Carter jerry at samba.org
Tue Mar 25 18:26:18 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 20 Mar 2003, Dallas N Antley wrote:

> Please let me know when you have a chance to play with this.  I'll be
> happy to test the mods for you.
> 
> I ran into some problems with compiling OpenLDAP (or rather, its
> dependencies), so I haven't had a chance to test linking against that
> instead of Sun's LDAP.

Here's the patch.  Already checked into CVS.



cheers, jerry
 ----------------------------------------------------------------------
 Hewlett-Packard            ------------------------- http://www.hp.com
 SAMBA Team                 ---------------------- http://www.samba.org
 GnuPG Key                  ---- http://www.plainjoe.org/gpg_public.asc
 "You can never go home again, Oatman, but I guess you can shop there."  
                            --John Cusack - "Grosse Point Blank" (1997)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+gJ9KIR7qMdg1EfYRApiwAKDIGeAujnszcziXOwY3o66yoiwTOwCgrZiX
BNwKgmTk2PQInHAvDg6CstQ=
=QFmK
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: passdb/pdb_ldap.c
===================================================================
RCS file: /data/cvs/samba/source/passdb/pdb_ldap.c,v
retrieving revision 1.1.2.43
diff -u -b -B -r1.1.2.43 pdb_ldap.c
--- passdb/pdb_ldap.c	17 Mar 2003 22:20:18 -0000	1.1.2.43
+++ passdb/pdb_ldap.c	25 Mar 2003 17:34:11 -0000
@@ -115,7 +115,9 @@
 {
 	int port;
 	int version;
+#ifdef HAVE_LDAP_START_TLS_S
 	int tls, rc;
+#endif
 	uid_t uid = geteuid();
 	struct passwd* pass;
 	
@@ -265,20 +267,17 @@
                        int *method, int freeit )
 # endif
 {
-    register char   *to_clear = *credp;
-
 
 	if (freeit) {
                 SAFE_FREE(*whop);
                 memset(*credp, '\0', strlen(*credp));
                 SAFE_FREE(*credp);
 	} else {
-                *whop = strdup(ldap_state->bind_dn);
+                *whop = strdup(lp_ldap_admin_dn());
                 if (!*whop) {
                         return LDAP_NO_MEMORY;
                 }
-                DEBUG(5,("ldap_connect_system: Rebinding as \"%s\"\n",
-                          whop));
+                DEBUG(5,("ldap_connect_system: Rebinding as \"%s\"\n", *whop));
 
                 *credp = strdup(ldap_secret);
                 if (!*credp) {


More information about the samba mailing list