mirror of
https://github.com/samba-team/samba.git
synced 2025-02-24 13:57:43 +03:00
s4:LogonGetDomainInfo - allow to set DNS hostname for the first time
Otherwise it obviously can never be set.
This commit is contained in:
parent
ee524d3182
commit
8e1e6b0112
@ -1258,17 +1258,6 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
/*
|
||||
* Updates the DNS hostname when the client wishes that the
|
||||
* server should handle this for him
|
||||
* ("NETR_WS_FLAG_HANDLES_SPN_UPDATE" not set).
|
||||
* See MS-NRPC section 3.5.4.3.9
|
||||
*/
|
||||
if ((r->in.query->workstation_info->workstation_flags
|
||||
& NETR_WS_FLAG_HANDLES_SPN_UPDATE) != 0) {
|
||||
update_dns_hostname = false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks that the computer name parameter without possible "$"
|
||||
* matches as prefix with the DNS hostname in the workstation
|
||||
@ -1302,6 +1291,20 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
|
||||
old_dns_hostname = samdb_result_string(res1[0], "dNSHostName",
|
||||
NULL);
|
||||
|
||||
/*
|
||||
* Updates the DNS hostname when the client wishes that the
|
||||
* server should handle this for him
|
||||
* ("NETR_WS_FLAG_HANDLES_SPN_UPDATE" not set). And this is
|
||||
* obviously only checked when we do already have a
|
||||
* "dNSHostName".
|
||||
* See MS-NRPC section 3.5.4.3.9
|
||||
*/
|
||||
if ((old_dns_hostname != NULL) &&
|
||||
(r->in.query->workstation_info->workstation_flags
|
||||
& NETR_WS_FLAG_HANDLES_SPN_UPDATE) != 0) {
|
||||
update_dns_hostname = false;
|
||||
}
|
||||
|
||||
/* Gets host informations and put them in our directory */
|
||||
new_msg = ldb_msg_new(mem_ctx);
|
||||
NT_STATUS_HAVE_NO_MEMORY(new_msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user