The Samba-Bugzilla – Attachment 1528 Details for
Bug 3196
[patch] Build fails with Solaris ldap library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
samba-solaris-ldap.patch (text/plain), 5.70 KB, created by
Alex Deiter
on 2005-10-19 10:53:43 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Alex Deiter
Created:
2005-10-19 10:53:43 UTC
Size:
5.70 KB
patch
obsolete
>diff -ur samba-3.0.20b/source/configure.in samba-3.0.20b-sun-ldap/source/configure.in >--- samba-3.0.20b/source/configure.in Wed Oct 12 21:03:39 2005 >+++ samba-3.0.20b-sun-ldap/source/configure.in Tue Oct 18 09:35:42 2005 >@@ -2784,8 +2784,6 @@ > # now see if we can find the ldap libs in standard paths > AC_CHECK_LIB_EXT(ldap, LDAP_LIBS, ldap_init) > >- AC_CHECK_FUNC_EXT(ldap_domain2hostlist,$LDAP_LIBS) >- > ######################################################## > # If we have LDAP, does it's rebind procedure take 2 or 3 arguments? > # Check found in pam_ldap 145. >@@ -2804,9 +2802,7 @@ > > AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $smb_ldap_cv_ldap_set_rebind_proc, [Number of arguments to ldap_set_rebind_proc]) > >- AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS) >- >- if test x"$ac_cv_lib_ext_ldap_ldap_init" = x"yes" -a x"$ac_cv_func_ext_ldap_domain2hostlist" = x"yes"; then >+ if test x"$ac_cv_lib_ext_ldap_ldap_init" = x"yes"; then > AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available]) > default_static_modules="$default_static_modules pdb_ldap idmap_ldap"; > SMBLDAP="lib/smbldap.o" >@@ -2855,6 +2851,33 @@ > fi > with_ads_support=no > fi >+ >+AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS) >+if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then >+ if test x"$with_ads_support" = x"yes"; then >+ AC_MSG_ERROR(Active Directory Support requires ldap_initialize) >+ fi >+ AC_MSG_WARN(Active Directory Support requires ldap_initialize) >+ with_ads_support=no >+fi >+ >+AC_CHECK_FUNC_EXT(ldap_domain2hostlist,$LDAP_LIBS) >+if test x"$ac_cv_func_ext_ldap_domain2hostlist" != x"yes"; then >+ if test x"$with_ads_support" = x"yes"; then >+ AC_MSG_ERROR(Active Directory Support requires ldap_domain2hostlist) >+ fi >+ AC_MSG_WARN(Active Directory Support requires ldap_domain2hostlist) >+ with_ads_support=no >+fi >+ >+AC_CHECK_FUNC_EXT(ldap_add_result_entry,$LDAP_LIBS) >+if test x"$ac_cv_func_ext_ldap_add_result_entry" != x"yes"; then >+ if test x"$with_ads_support" = x"yes"; then >+ AC_MSG_ERROR(Active Directory Support requires ldap_add_result_entry) >+ fi >+ AC_MSG_WARN(Active Directory Support requires ldap_add_result_entry) >+ with_ads_support=no >+fi > > if test x"$with_ads_support" != x"no"; then > >diff -ur samba-3.0.20b/source/include/config.h.in samba-3.0.20b-sun-ldap/source/include/config.h.in >--- samba-3.0.20b/source/include/config.h.in Thu Oct 13 06:20:00 2005 >+++ samba-3.0.20b-sun-ldap/source/include/config.h.in Tue Oct 18 10:00:07 2005 >@@ -671,6 +671,9 @@ > /* Whether ldap is available */ > #undef HAVE_LDAP > >+/* Define to 1 if you have the `ldap_add_result_entry' function. */ >+#undef HAVE_LDAP_ADD_RESULT_ENTRY >+ > /* Define to 1 if you have the `ldap_domain2hostlist' function. */ > #undef HAVE_LDAP_DOMAIN2HOSTLIST > >diff -ur samba-3.0.20b/source/include/includes.h samba-3.0.20b-sun-ldap/source/include/includes.h >--- samba-3.0.20b/source/include/includes.h Wed Oct 12 21:03:38 2005 >+++ samba-3.0.20b-sun-ldap/source/include/includes.h Mon Oct 17 15:07:27 2005 >@@ -456,10 +456,19 @@ > > #if HAVE_LBER_H > #include <lber.h> >+#ifndef LBER_USE_DER >+#define LBER_USE_DER 0x01 > #endif >+#endif > > #if HAVE_LDAP_H > #include <ldap.h> >+#ifndef LDAP_CONST >+#define LDAP_CONST const >+#endif >+#ifndef LDAP_OPT_SUCCESS >+#define LDAP_OPT_SUCCESS 0 >+#endif > #else > #undef HAVE_LDAP > #endif >diff -ur samba-3.0.20b/source/libads/ldap.c samba-3.0.20b-sun-ldap/source/libads/ldap.c >--- samba-3.0.20b/source/libads/ldap.c Wed Oct 12 21:03:41 2005 >+++ samba-3.0.20b-sun-ldap/source/libads/ldap.c Tue Oct 18 10:14:09 2005 >@@ -579,6 +579,7 @@ > > if (!ADS_ERR_OK(status)) return status; > >+#ifdef HAVE_LDAP_ADD_RESULT_ENTRY > while (cookie) { > void *res2 = NULL; > ADS_STATUS status2; >@@ -598,6 +599,10 @@ > /* note that we do not free res2, as the memory is now > part of the main returned list */ > } >+#else >+ DEBUG(0, ("no ldap_add_result_entry() support in LDAP libs!\n")); >+ status = ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL); >+#endif > > return status; > } >diff -ur samba-3.0.20b/source/passdb/pdb_ldap.c samba-3.0.20b-sun-ldap/source/passdb/pdb_ldap.c >--- samba-3.0.20b/source/passdb/pdb_ldap.c Wed Oct 12 21:03:35 2005 >+++ samba-3.0.20b-sun-ldap/source/passdb/pdb_ldap.c Wed Oct 19 16:47:29 2005 >@@ -1584,7 +1584,7 @@ > if (retdata) > ber_bvfree(retdata); > if (retoid) >- ber_memfree(retoid); >+ ldap_memfree(retoid); > } > ber_bvfree(bv); > } >diff -ur samba-3.0.20b/source/passdb/pdb_nds.c samba-3.0.20b-sun-ldap/source/passdb/pdb_nds.c >--- samba-3.0.20b/source/passdb/pdb_nds.c Wed Oct 12 21:03:35 2005 >+++ samba-3.0.20b-sun-ldap/source/passdb/pdb_nds.c Mon Oct 17 15:22:18 2005 >@@ -846,6 +846,7 @@ > > /* Turn on ssl if required */ > if(strequal(protocol, "ldaps")) { >+#ifdef LDAP_OPT_X_TLS > int tls = LDAP_OPT_X_TLS_HARD; > if (ldap_set_option (ld, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS) { > DEBUG(1, ("pdb_nds_update_login_attempts: Failed to setup a TLS session\n")); >@@ -852,6 +853,10 @@ > } else { > DEBUG(4, ("pdb_nds_update_login_attempts: Activated TLS on session\n")); > } >+#else >+ DEBUG(0,("pdb_nds_update_login_attempts: Secure connection not supported by LDAP client libraries!\n")); >+ return NT_STATUS_INVALID_PARAMETER; >+#endif > } > } > >diff -ur samba-3.0.20b/source/utils/net_lookup.c samba-3.0.20b-sun-ldap/source/utils/net_lookup.c >--- samba-3.0.20b/source/utils/net_lookup.c Wed Oct 12 21:03:41 2005 >+++ samba-3.0.20b-sun-ldap/source/utils/net_lookup.c Mon Oct 17 17:42:50 2005 >@@ -84,7 +84,7 @@ > > static int net_lookup_ldap(int argc, const char **argv) > { >-#ifdef HAVE_LDAP >+#ifdef HAVE_ADS > char *srvlist; > const char *domain; > int rc; >@@ -126,7 +126,7 @@ > } > return -1; > #endif >- DEBUG(1,("No LDAP support\n")); >+ DEBUG(1,("No ADS support\n")); > return -1; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3196
: 1528 |
1530