The branch, master has been updated
       via  d701bc15187 libcli ldap tests: remove use of zero length array
       via  68d716bdd8c ldap.c: clarify the need for ldap_get_values_len() in a 
code comment
      from  ba5a73b1544 tests: Only run mdsparser test if we build with 
spotlight support

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit d701bc1518766f36b1c7a3a00a82485098a8ee3d
Author: Gary Lockyer <g...@catalyst.net.nz>
Date:   Mon Jun 22 13:42:56 2020 +1200

    libcli ldap tests: remove use of zero length array
    
    libcli/ldap/tests/ldap_message_test.c defines a zero length array
    (uint8_t buf[0]), which is a GCC extension and breaks the build with
    some strict compilers like xlc.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14387
    
    Signed-off-by: Gary Lockyer <g...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abart...@samba.org>
    Autobuild-Date(master): Tue Jun 23 02:15:35 UTC 2020 on sn-devel-184

commit 68d716bdd8cf1f8492b4b875b3c1a69f2be7702b
Author: Isaac Boukris <ibouk...@gmail.com>
Date:   Mon Jun 22 23:08:57 2020 +0200

    ldap.c: clarify the need for ldap_get_values_len() in a code comment
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14406
    
    Signed-off-by: Isaac Boukris <ibouk...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 libcli/ldap/tests/ldap_message_test.c | 2 +-
 source3/libads/ldap.c                 | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/libcli/ldap/tests/ldap_message_test.c 
b/libcli/ldap/tests/ldap_message_test.c
index c5aacd4bc6b..f4b49bc47bc 100644
--- a/libcli/ldap/tests/ldap_message_test.c
+++ b/libcli/ldap/tests/ldap_message_test.c
@@ -115,7 +115,7 @@ static void test_empty_input(void **state)
        struct asn1_data *asn1;
        struct ldap_message *ldap_msg;
        NTSTATUS status;
-       uint8_t buf[0];
+       uint8_t *buf = NULL;
        size_t len = 0;
        struct ldap_request_limits limits = {
                .max_search_size = 256000,
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 36e73440495..55c9668089d 100755
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -3693,6 +3693,12 @@ static char **get_addl_hosts(ADS_STRUCT *ads, TALLOC_CTX 
*mem_ctx,
        char **ret = NULL;
        size_t i, converted_size;
 
+       /*
+        * Windows DC implicitly adds a short name for each FQDN added to
+        * msDS-AdditionalDnsHostName, but it comes with a strage binary
+        * suffix "\0$" which we should ignore (see bug #14406).
+        */
+
        values = ldap_get_values_len(ads->ldap.ld, msg, field);
        if (values == NULL) {
                return NULL;


-- 
Samba Shared Repository

Reply via email to