From: Isaac Boukris Date: Mon, 22 Jun 2020 21:08:57 +0000 (+0200) Subject: ldap.c: clarify the need for ldap_get_values_len() in a code comment X-Git-Tag: ldb-2.2.0~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68d716bdd8cf1f8492b4b875b3c1a69f2be7702b;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andrew Bartlett --- 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;