]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libnet: Convert myalias to lower case
authorAndreas Schneider <asn@samba.org>
Fri, 12 Apr 2024 06:33:06 +0000 (08:33 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 22 May 2024 20:33:36 +0000 (20:33 +0000)
This will be more consistent as it is a dnsname.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/libnet/libnet_join.c

index 43ade678bdd9e38f95dede2921717e0f11c356ce..490f8ea37ab77c775b3433db6455ec4c848e6ff4 100644 (file)
@@ -596,6 +596,10 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
                fstr_sprintf(my_alias, "%s.%s",
                             *netbios_aliases,
                             lp_dnsdomain());
+               if (!strlower_m(my_alias)) {
+                       status = ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+                       goto done;
+               }
 
                spn = talloc_asprintf(frame, "HOST/%s", my_alias);
                if (spn == NULL) {