Dallas N Antley
2003-Mar-17 22:32 UTC
[Samba] Samba 2.2.8 compile failure - Solaris 8, SunCC, LDAP
My apologies if this isn't the correct posting address -- I didn't see an obvious "report problems here" on the website. Some of the code modifications introduced between 2.2.7 and 2.2.8 don't appear to agree with Solaris, using Sun's CC, with the LDAP support code. Note that I'm linking against the Solaris-bundled LDAP package (SUNWlldap). |% env CFLAGS="-xcg92 -xO4 -xspace" LDFLAGS="-s" ./configure \ | --with-quotas --with-utmp --with-acl-support --with-winbind \ | --with-pam --with-ldapsam --prefix=/opt/samba_2.2.8 \ | --mandir=/opt/samba_2.2.8/share/man \ | --infodir=/opt/samba_2.2.8/share/info \ | --sysconfdir=/opt/samba_2.2.8/share/conf \ | --with-configdir=/opt/samba_2.2.8/share/conf \ | --with-privatedir=/var/samba/private --with-piddir=/var/run \ | --with-swatdir=/opt/samba_2.2.8/share/swat \ | --localstatedir=/var/samba |& tee DEPOT.conf |% cc -V |cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15 |usage: cc [ options] files. Use 'cc -flags' for details |% uname -a |SunOS XXXX 5.8 Generic_108528-19 sun4u sparc SUNW,Sun-Fire-280R While this worked fine for 2.2.7, using '--with-ldapsam' yields the following fatal error. |Compiling passdb/pdb_ldap.c |"passdb/pdb_ldap.c", line 276: undefined symbol: ldap_state |"passdb/pdb_ldap.c", line 276: undefined struct/union member: bind_dn |"passdb/pdb_ldap.c", line 276: left operand of "->" must be pointer to struct/union |"passdb/pdb_ldap.c", line 276: warning: improper pointer/integer combination: arg #1 |"passdb/pdb_ldap.c", line 938: warning: argument #2 is incompatible with prototype: | prototype: pointer to char : "include/proto.h", line 843 | argument : pointer to const char |cc: acomp failed for passdb/pdb_ldap.c |*** Error code 2 |make: Fatal error: Command failed for target `passdb/pdb_ldap.o' Re-configuring without '--with-ldapsam' allows the build to complete, albeit with a fair number more compiler warnings then with 2.2.7. Thanks much for any help you can provide. Dallas PS. On a related note, it doesn't appear possible to build Samba with support for more than one potential SAM source. I'd like one build to support both /etc/smbpasswd and LDAP-SAM, with config file options specifying which source. Did I miss some compile-time option? Thanks.
John H Terpstra
2003-Mar-17 22:50 UTC
[Samba] Samba 2.2.8 compile failure - Solaris 8, SunCC, LDAP
On Mon, 17 Mar 2003, Dallas N Antley wrote:> My apologies if this isn't the correct posting address -- I didn't see > an obvious "report problems here" on the website. Some of the code > modifications introduced between 2.2.7 and 2.2.8 don't appear to agree > with Solaris, using Sun's CC, with the LDAP support code. Note that > I'm linking against the Solaris-bundled LDAP package (SUNWlldap). > > |% env CFLAGS="-xcg92 -xO4 -xspace" LDFLAGS="-s" ./configure \ > | --with-quotas --with-utmp --with-acl-support --with-winbind \ > | --with-pam --with-ldapsam --prefix=/opt/samba_2.2.8 \ > | --mandir=/opt/samba_2.2.8/share/man \ > | --infodir=/opt/samba_2.2.8/share/info \ > | --sysconfdir=/opt/samba_2.2.8/share/conf \ > | --with-configdir=/opt/samba_2.2.8/share/conf \ > | --with-privatedir=/var/samba/private --with-piddir=/var/run \ > | --with-swatdir=/opt/samba_2.2.8/share/swat \ > | --localstatedir=/var/samba |& tee DEPOT.conf > |% cc -V > |cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15 > |usage: cc [ options] files. Use 'cc -flags' for details > |% uname -a > |SunOS XXXX 5.8 Generic_108528-19 sun4u sparc SUNW,Sun-Fire-280R > > While this worked fine for 2.2.7, using '--with-ldapsam' yields the > following fatal error. > > |Compiling passdb/pdb_ldap.c > |"passdb/pdb_ldap.c", line 276: undefined symbol: ldap_state > |"passdb/pdb_ldap.c", line 276: undefined struct/union member: bind_dn > |"passdb/pdb_ldap.c", line 276: left operand of "->" must be pointer to struct/union > |"passdb/pdb_ldap.c", line 276: warning: improper pointer/integer combination: arg #1 > |"passdb/pdb_ldap.c", line 938: warning: argument #2 is incompatible with prototype: > | prototype: pointer to char : "include/proto.h", line 843 > | argument : pointer to const char > |cc: acomp failed for passdb/pdb_ldap.c > |*** Error code 2 > |make: Fatal error: Command failed for target `passdb/pdb_ldap.o'Is OpenLDAP installed on your system, with the development libraries?> > Re-configuring without '--with-ldapsam' allows the build to complete, > albeit with a fair number more compiler warnings then with 2.2.7. > > Thanks much for any help you can provide. > > Dallas > > PS. On a related note, it doesn't appear possible to build Samba with > support for more than one potential SAM source. I'd like one > build to support both /etc/smbpasswd and LDAP-SAM, with config > file options specifying which source. Did I miss some > compile-time option? Thanks.Samba-3.0.0 supports multiple password back-ends. See man smb.conf and look for "passdb backend". - John T. -- John H Terpstra Email: jht@samba.org
Gerald (Jerry) Carter
2003-Mar-25 18:26 UTC
[Samba] Samba 2.2.8 compile failure - Solaris 8, SunCC, LDAP
-----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) {
Reasonably Related Threads
- Re: samba (2.2.7a) + openldap (2.0.x)
- source code for samba-2.2.8a-1-sol8-suncc-64bit.pkg
- Stymied with samba vs openldap SSL ("Failed to issue the StartTLS instruction...")
- samba + slave OpenLdap (read-only)
- Segmentation Fault when trying to set root samba password, IPA as a backend