summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-02-17 17:25:03 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-02-27 09:14:17 +0100
commit33991e5c9086d5d437d1d408be1b54cb55333856 (patch)
treeac557a6e29f685fecfc21b51ba77cc5c01ffc55e
parent28f7a1f754e0939870f2798dfe0e811b42dd83eb (diff)
downloadsamba-33991e5c9086d5d437d1d408be1b54cb55333856.tar.gz
nbt_server: nbtd_netlogon_getdc needs just the dst_name
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--source4/nbt_server/dgram/netlogon.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index f9fbf381cf4..36a214bdcf8 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -37,19 +37,19 @@
reply to a GETDC request
*/
static NTSTATUS nbtd_netlogon_getdc(struct nbtd_server *nbtsrv,
- struct nbt_dgram_packet *packet,
+ struct nbt_name *dst_name,
const struct socket_address *src,
struct nbt_netlogon_packet *netlogon,
TALLOC_CTX *mem_ctx,
struct nbt_netlogon_response **presponse)
{
- struct nbt_name *name = &packet->data.msg.dest_name;
struct nbt_netlogon_response_from_pdc *pdc;
struct ldb_context *samctx;
struct nbt_netlogon_response *response;
/* only answer getdc requests on the PDC or LOGON names */
- if (name->type != NBT_NAME_PDC && name->type != NBT_NAME_LOGON) {
+ if ((dst_name->type != NBT_NAME_PDC) &&
+ (dst_name->type != NBT_NAME_LOGON)) {
return NT_STATUS_NOT_SUPPORTED;
}
@@ -61,9 +61,10 @@ static NTSTATUS nbtd_netlogon_getdc(struct nbtd_server *nbtsrv,
return NT_STATUS_NOT_SUPPORTED;
}
- if (strcasecmp_m(name->name, lpcfg_workgroup(nbtsrv->task->lp_ctx)) != 0) {
+ if (strcasecmp_m(dst_name->name,
+ lpcfg_workgroup(nbtsrv->task->lp_ctx)) != 0) {
DBG_INFO("GetDC requested for a domain %s that we don't "
- "host\n", name->name);
+ "host\n", dst_name->name);
return NT_STATUS_NOT_SUPPORTED;
}
@@ -199,7 +200,8 @@ void nbtd_mailslot_netlogon_handler(struct dgram_mailslot_handler *dgmslot,
switch (netlogon->command) {
case LOGON_PRIMARY_QUERY:
- status = nbtd_netlogon_getdc(iface->nbtsrv, packet, src,
+ status = nbtd_netlogon_getdc(iface->nbtsrv,
+ &packet->data.msg.dest_name, src,
netlogon, netlogon, &response);
break;
case LOGON_SAM_LOGON_REQUEST: