ldap.c: clarify the need for ldap_get_values_len() in a code comment
authorIsaac Boukris <iboukris@gmail.com>
Mon, 22 Jun 2020 21:08:57 +0000 (23:08 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Jun 2020 00:54:26 +0000 (00:54 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14406

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/libads/ldap.c

index 36e7344049529f01bf4f23666683057a3165d527..55c9668089da0be6f6589c3fc1da07b6dfd0488a 100755 (executable)
@@ -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;