The Samba-Bugzilla – Attachment 16030 Details for
Bug 13124
StartTLS certificate verification broken in ldap ssl ads
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for 4.12, cherry-picked from master
fix-bug-13124_4-12.patch (text/plain), 1.65 KB, created by
Björn Baumbach
on 2020-06-11 13:02:43 UTC
(
hide
)
Description:
fix for 4.12, cherry-picked from master
Filename:
MIME Type:
Creator:
Björn Baumbach
Created:
2020-06-11 13:02:43 UTC
Size:
1.65 KB
patch
obsolete
>From 6a1a300f694db6a186b015b6780e252a05df71f5 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= <bb@sernet.de> >Date: Wed, 3 Jun 2020 19:40:59 +0200 >Subject: [PATCH] s3-libads: use ldap_init_fd() to initialize a ldap session if > possible >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Use the known ip address of the ldap server to open the connection and >initialize the ldap session with ldap_init_fd(). > >This avoid unnecessary DNS lookups which might block or prevent the >successful connection. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=13124 > >Signed-off-by: Björn Baumbach <bb@sernet.de> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit c8080bbd708eaa3212fa516861ac9e3b267989a0) >--- > source3/libads/ldap.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > >diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c >index f0fcf9fcd56..05ee2d0b344 100755 >--- a/source3/libads/ldap.c >+++ b/source3/libads/ldap.c >@@ -92,7 +92,23 @@ static void gotalarm_sig(int signum) > return NULL; > } > >-#ifdef HAVE_LDAP_INITIALIZE >+#ifdef HAVE_LDAP_INIT_FD >+ { >+ int fd = -1; >+ NTSTATUS status = NT_STATUS_UNSUCCESSFUL; >+ >+ status = open_socket_out(ss, port, to, &fd); >+ if (!NT_STATUS_IS_OK(status)) { >+ return NULL; >+ } >+ >+/* define LDAP_PROTO_TCP from openldap.h if required */ >+#ifndef LDAP_PROTO_TCP >+#define LDAP_PROTO_TCP 1 >+#endif >+ ldap_err = ldap_init_fd(fd, LDAP_PROTO_TCP, uri, &ldp); >+ } >+#elif defined(HAVE_LDAP_INITIALIZE) > ldap_err = ldap_initialize(&ldp, uri); > #else > ldp = ldap_open(server, port); >-- >2.26.2 >
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
Flags:
bbaumbach
:
ci-passed+
Actions:
View
Attachments on
bug 13124
:
16030
|
16031
|
16032
|
16033
|
16357
|
16358