Full_Name: Kurt Zeilenga
Version: most every
OS: MacOS
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (2001:470:f052:8000:7cca:294:b2d:2652)
The client tools were designed to support optimistic encryption (-Z)... in
cases where the server says "yes, let's start TLS...", TLS negotiations must be
entered into and, if they fail, no further LDAP traffic should be allowed on the
stream. Upon TLS alert, the session should no longer usable. Further attempts
to send any PDU should fail.
But one could argue that the bug is simply the LDAP application software
ignoring the local (non-LDAP) errors coming from ldap_start_tls_s(). In this
case, the following trivial patch would address the issue.
diff --git a/clients/tools/common.c b/clients/tools/common.c
index 7f758cb..089dd9b 100644
--- a/clients/tools/common.c
+++ b/clients/tools/common.c
@@ -1367,7 +1367,7 @@ dnssrv_free:;
ldap_get_option( ld,
LDAP_OPT_DIAGNOSTIC_MESSAGE, (void*)&msg);
tool_perror( "ldap_start_tls", rc, NULL, NULL,
msg, NULL );
ldap_memfree(msg);
- if ( use_tls > 1 ) {
+ if ( use_tls > 1 || rc < 0) {
tool_exit( ld, EXIT_FAILURE );
}
}
However, it might be better to do something at a lower level to ensure that all
subsequent attempts to send LDAP PDUs over the wire after a TLS Alert fail.
I hereby place the above patch into the public domain.
Full_Name: Matt Johnson
Version: 2.4.40
OS: RedHat 7.2 (Maipo)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (15.203.233.86)
The LDAPClient::modify logic has a leak within the
ldap_create_assertion_control method. The leaky code occurs when the
existing ld_errno is anything but 0 when
the method is invoked. Not only that, but your assertion
returned is NULL.
The workaround is to call the following before calling
ldap_create_assertion_control.
int lvErrno = 0;
ldap_set_option(myLDAPPtr, LDAP_OPT_RESULT_CODE, &lvErrno);
--On Thursday, June 01, 2017 12:22 AM +0000 quanah(a)openldap.org wrote:
> Full_Name: Quanah Gibson-Mount
> Version: 2.4.44
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (47.208.148.239)
Going to close this out, as the problem statement & other bits is
incorrect. I will file a new ITS with a better summary of the issues.
Looking forward to a different bug tracker that allows modification of the
bug summary, etc. ;)
--Quanah
--
Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>
Full_Name: Quanah Gibson-Mount
Version: 2.4.45
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (47.208.148.239)
We log the duration of an operation at stats level which allows being able to
see how long a write OP took on a master. However we do not have any duration
logging at the sync log level and therefore cannot determine how long a write op
takes on a replica for the same modification. This is problematic when
attempting to debug issues related to replication.
A more self-contained log of the same issue, available at
ftp://ftp.openldap.org/incoming/its8444.log
(line numbers below are against current master, commit
91f4d3a6b75e73bf4ea498e83e2e4cb4e7a320e0)
There are some things that occur in all the failures I have seen so far:
- the server that received the operation (#1) sends the accesslog entry
with no CSN in the cookie, then another provider (#2) picks up this
message and relays it to its consumers, this one with a CSN in the
cookie
- a consumer picks up these two in short succession, in the log above,
processing of the one from #2 is finished first (they are being
processed concurrently)
Usually, once one of them gets processed, the new CSN should be noted
and the other threads should just skip it (syncrepl.c:943 and onwards).
In this one, having no CSN in the cookie seems to allow both to process
so far as to run syncrepl_message_to_op(), and one of them will then
inevitably fail to add the entry.
I don't understand yet why server #1 sends the operations without a CSN
in the cookie and (especially if I reorder the overlays to set up
memberof last), the race goes the other way around and the operation to
fail is the one from server #2.
My take on it was that in a delta-sync environment all entries would be
passed with a new CSN and that should end up in the cookie, allowing
syncrepl.c:986 to do its job.
--=20
Ond=C5=99ej Kuzn=C3=ADk
Senior Software Engineer
Symas Corporation http://www.symas.com
Packaged, certified, and supported LDAP solutions powered by OpenLDAP
--On Thursday, June 08, 2017 2:06 PM +0000 remy.dernat(a)umontpellier.fr
wrote:
> Best regards,
> R?my
Hi,
Thanks for the report. Please confirm you can reproduce the issue with
OpenLDAP 2.4.45. If you can, then please provide your /initial/ cn=config
database prior to doing the modifications as well.
Thanks!
--Quanah
--
Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>
--On Wednesday, June 07, 2017 4:11 PM +0000 quanah(a)symas.com wrote:
> --On Wednesday, June 07, 2017 3:35 PM +0200 Hallvard Breien Furuseth
> <h.b.furuseth(a)usit.uio.no> wrote:
>
>> On 06. juni 2017 21:59, quanah(a)openldap.org wrote:
>>> /usr/include/signal.h:233:12: note: declared here
>>> extern int sigwait(sigset_t *);
>>> ^
>>
>> POSIX says it has two arguments:
>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigwait.html
>> Is there a two-argument version of sigwait in the Solaris headers
>> somewhere,
>> maybe enabled by #define POSIX_C_SOURCE 1 or something like that?
>
> It's insanely long....
This patch fixed it on my box:
quanah@sol11-3:~/git/sold-2445/openldap$ git diff
diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c
index 8a62eff..1976340 100644
--- a/libraries/liblmdb/mdb.c
+++ b/libraries/liblmdb/mdb.c
@@ -113,6 +113,9 @@ typedef SSIZE_T ssize_t;
/* Most platforms have posix_memalign, older may only have memalign */
#define HAVE_MEMALIGN 1
#include <malloc.h>
+#if defined (__sun)
+#define _POSIX_PTHREAD_SEMANTICS 1
+#endif
#endif
#if !(defined(BYTE_ORDER) || defined(__BYTE_ORDER))
--Quanah
--
Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>