diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-24 12:42:32 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-24 14:01:06 +0200 |
commit | 8e1e6b0112c06b8587c0823a62d2103c047f8310 (patch) | |
tree | 6ac6bc0b1c26d8f428325ab7cc2501fdbbd3537c /source4/rpc_server | |
parent | ee524d3182de85dff2febaad2481e37ad5a8be8f (diff) | |
download | samba-8e1e6b0112c06b8587c0823a62d2103c047f8310.tar.gz samba-8e1e6b0112c06b8587c0823a62d2103c047f8310.tar.xz samba-8e1e6b0112c06b8587c0823a62d2103c047f8310.zip |
s4:LogonGetDomainInfo - allow to set DNS hostname for the first time
Otherwise it obviously can never be set.
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 011341641a..c57f4145c6 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -1259,17 +1259,6 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal } /* - * 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 * info structure. @@ -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); |