[BUG] and a problem with ldap_start_tls_s 2.2.5
Gerald Carter
jerry at samba.org
Sat Jun 22 07:35:04 GMT 2002
I'll take care of this next week. Thanks.
cheers, jerry
On Sat, 22 Jun 2002, Ignacio Coupeau wrote:
> 1. The bug
> -------
> In the
> passdb/pdb_ldap.c
> case LDAP_SSL_START_TLS:
> #ifdef HAVE_LDAP_START_TLS_S
>
> if the HAVE_LDAP_START_TLS_S is definied the rc is used but not
> declared, so don't compile. A posible patch:
> ------------
> --- /usr/local/etc/samba-2.2.5/source/passdb/pdb_ldap.c-DIST Sat Jun
> 22 11:35:34 2002
> +++ /usr/local/etc/samba-2.2.5/source/passdb/pdb_ldap.c Sat Jun 22
> 11:37:53 2002
> @@ -114,7 +114,7 @@
> {
> int port;
> int version;
> - int tls;
> + int tls, rc;
> uid_t uid = geteuid();
> struct passwd* pass;
> -------------
>
> 2. The problem: configure don't catch the ldap_start_tls_s in the
> /usr/include|lib files:
> ------------------
> When I the configure --with-ldapsam with an openldap-2.0.23+openssl
> support, I fount that the AC_CHECK_FUNCS(ldap_start_tls_s) macro
> don't runs properly because says: ldap_start_tls_s (no).
> Of course, the samba compiles with ldap *but* dont start the tls
> (ldap_open_connection:
> StartTLS not supported by LDAP client libraries!).
>
> With the samba-2.2.4 runs well.
>
> In the configure.log I found:
> -----------
> lnsl -lcrypt 1>&5
> /tmp/ccX9dGzo.o: In function `main':
> /tmp/ccX9dGzo.o(.text+0x7): undefined reference to `ldap_start_tls_s'
> collect2: ld returned 1 exit status
> configure: failed program was:
> #line 12240 "configure"
> #include "confdefs.h"
> /* System header to define __stub macros and hopefully few prototypes,
> which can conflict with char ldap_start_tls_s(); below. */
> #include <assert.h>
> /* Override any gcc2 internal prototype to avoid an error. */
> /* We use char because int might match the return type of a gcc2
> builtin and then its argument prototype would still apply. */
> char ldap_start_tls_s();
> ----------------
>
> to avoid temporaly this problem I used the LDAP section from the 2.2.4
> configure.in patched, but is not the solution:
>
> #################################################
> # check for a LDAP password database
> AC_MSG_CHECKING(whether to use LDAP SAM database)
> AC_ARG_WITH(ldapsam,
> [ --with-ldapsam Include experimental LDAP SAM support
> (default=no)],
> [ case "$withval" in
> yes)
> AC_MSG_RESULT(yes)
> AC_DEFINE(WITH_LDAP_SAM)
> AC_DEFINE(HAVE_LDAP_START_TLS_S)
> LDAPLIBS="-lldap -llber -lresolv"
> with_smbpasswd_sam=no
> AC_SUBST(LDAPLIBS)
> ;;
> *)
> AC_MSG_RESULT(no)
> ;;
> esac ],
> AC_MSG_RESULT(no)
> )
>
>
> Ignacio
>
--
---------------------------------------------------------------------
Hewlett-Packard http://www.hp.com
SAMBA Team http://www.samba.org
-- http://www.plainjoe.org
"Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2
--"I never saved anything for the swim back." Ethan Hawk in Gattaca--
More information about the samba-technical
mailing list