mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
Fix accidental overwrite of dnsHostName by the last netbios alias
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14396 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
b0b7325365
commit
aa0985324a
@ -1,2 +0,0 @@
|
|||||||
^samba4.blackbox.net_ads.nb_alias check dNSHostName
|
|
||||||
^samba4.blackbox.net_ads.nb_alias check main SPN
|
|
@ -507,6 +507,7 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
|
|||||||
ADS_STATUS status;
|
ADS_STATUS status;
|
||||||
ADS_MODLIST mods;
|
ADS_MODLIST mods;
|
||||||
fstring my_fqdn;
|
fstring my_fqdn;
|
||||||
|
fstring my_alias;
|
||||||
const char **spn_array = NULL;
|
const char **spn_array = NULL;
|
||||||
size_t num_spns = 0;
|
size_t num_spns = 0;
|
||||||
char *spn = NULL;
|
char *spn = NULL;
|
||||||
@ -587,11 +588,11 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
|
|||||||
/*
|
/*
|
||||||
* Add HOST/netbiosname.domainname
|
* Add HOST/netbiosname.domainname
|
||||||
*/
|
*/
|
||||||
fstr_sprintf(my_fqdn, "%s.%s",
|
fstr_sprintf(my_alias, "%s.%s",
|
||||||
*netbios_aliases,
|
*netbios_aliases,
|
||||||
lp_dnsdomain());
|
lp_dnsdomain());
|
||||||
|
|
||||||
spn = talloc_asprintf(frame, "HOST/%s", my_fqdn);
|
spn = talloc_asprintf(frame, "HOST/%s", my_alias);
|
||||||
if (spn == NULL) {
|
if (spn == NULL) {
|
||||||
status = ADS_ERROR_LDAP(LDAP_NO_MEMORY);
|
status = ADS_ERROR_LDAP(LDAP_NO_MEMORY);
|
||||||
goto done;
|
goto done;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user