From 6e827f6d5e64e0be316f4e17111b2884899d302c Mon Sep 17 00:00:00 2001 From: tbordaz Date: Wed, 16 Dec 2020 16:30:28 +0100 Subject: [PATCH] Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information during a bind relates: https://github.com/389ds/389-ds-base/issues/4480 Reviewed by: William Brown, Viktor Ashirov, Mark Reynolds (thank you all) Platforms tested: F31 --- dirsrvtests/tests/suites/basic/basic_test.py | 1 - ldap/servers/slapd/back-ldbm/ldbm_config.c | 2 +- ldap/servers/slapd/result.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dirsrvtests/tests/suites/basic/basic_test.py b/dirsrvtests/tests/suites/basic/basic_test.py index 120207321..1ae82dcdd 100644 --- a/dirsrvtests/tests/suites/basic/basic_test.py +++ b/dirsrvtests/tests/suites/basic/basic_test.py @@ -1400,7 +1400,6 @@ def test_dscreate_multiple_dashes_name(dscreate_long_instance): assert not dscreate_long_instance.exists() - if __name__ == '__main__': # Run isolated # -s for DEBUG mode diff --git a/ldap/servers/slapd/back-ldbm/ldbm_config.c b/ldap/servers/slapd/back-ldbm/ldbm_config.c index 3fe86d567..10cef250f 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_config.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_config.c @@ -1234,7 +1234,7 @@ ldbm_config_search_entry_callback(Slapi_PBlock *pb __attribute__((unused)), if (attrs) { for (size_t i = 0; attrs[i]; i++) { if (ldbm_config_moved_attr(attrs[i])) { - slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, "at least one required attribute has been moved to the BDB scecific configuration entry"); + slapi_pblock_set(pb, SLAPI_RESULT_TEXT, "at least one required attribute has been moved to the BDB scecific configuration entry"); break; } } diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c index 9daf3b151..ab0d79454 100644 --- a/ldap/servers/slapd/result.c +++ b/ldap/servers/slapd/result.c @@ -355,7 +355,7 @@ send_ldap_result_ext( if (text) { pbtext = text; } else { - slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &pbtext); + slapi_pblock_get(pb, SLAPI_RESULT_TEXT, &pbtext); } if (operation == NULL) { -- 2.26.2