diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/libnet/libnet_join.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c index 7451cb27c6f..86cbce02242 100644 --- a/source/libnet/libnet_join.c +++ b/source/libnet/libnet_join.c @@ -357,15 +357,10 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx, strupper_m(spn); spn_array[0] = spn; - if (!name_to_fqdn(my_fqdn, r->in.machine_name) - || (strchr(my_fqdn, '.') == NULL)) { - fstr_sprintf(my_fqdn, "%s.%s", r->in.machine_name, - r->out.dns_domain_name); - } - - strlower_m(my_fqdn); + if (name_to_fqdn(my_fqdn, r->in.machine_name) && + !strequal(my_fqdn, r->in.machine_name)) { - if (!strequal(my_fqdn, r->in.machine_name)) { + strlower_m(my_fqdn); spn = talloc_asprintf(mem_ctx, "HOST/%s", my_fqdn); if (!spn) { return ADS_ERROR_LDAP(LDAP_NO_MEMORY); |