svn commit: samba r6320 - in branches/SAMBA_4_0/source:
libcli/dgram librpc/idl nbt_server/dgram
tridge at samba.org
tridge at samba.org
Wed Apr 13 03:43:17 GMT 2005
Author: tridge
Date: 2005-04-13 03:43:17 +0000 (Wed, 13 Apr 2005)
New Revision: 6320
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6320
Log:
some minor netlogon datagram fixes - NT4 can now join a Samba4 domain without
Samba3 nmbd
Modified:
branches/SAMBA_4_0/source/libcli/dgram/mailslot.c
branches/SAMBA_4_0/source/libcli/dgram/netlogon.c
branches/SAMBA_4_0/source/librpc/idl/nbt.idl
branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c
Changeset:
Modified: branches/SAMBA_4_0/source/libcli/dgram/mailslot.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/dgram/mailslot.c 2005-04-12 21:56:34 UTC (rev 6319)
+++ branches/SAMBA_4_0/source/libcli/dgram/mailslot.c 2005-04-13 03:43:17 UTC (rev 6320)
@@ -159,7 +159,7 @@
ZERO_STRUCT(packet);
packet.msg_type = msg_type;
- packet.flags = DGRAM_FLAG_FIRST;
+ packet.flags = DGRAM_FLAG_FIRST | DGRAM_NODE_NBDD;
packet.dgram_id = generate_random() % UINT16_MAX;
packet.source = socket_get_my_addr(dgmsock->sock, tmp_ctx);
packet.src_port = socket_get_my_port(dgmsock->sock);
@@ -179,7 +179,7 @@
trans = &smb->body.trans;
trans->total_data_count = request->length;
- trans->timeout = (uint32_t)-1;
+ trans->timeout = 1000;
trans->data_count = request->length;
trans->data_offset = 70 + strlen(mailslot_name);
trans->opcode = 1; /* write mail slot */
Modified: branches/SAMBA_4_0/source/libcli/dgram/netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/dgram/netlogon.c 2005-04-12 21:56:34 UTC (rev 6319)
+++ branches/SAMBA_4_0/source/libcli/dgram/netlogon.c 2005-04-13 03:43:17 UTC (rev 6320)
@@ -70,6 +70,7 @@
NTSTATUS status;
DATA_BLOB blob;
TALLOC_CTX *tmp_ctx = talloc_new(dgmsock);
+ struct nbt_name myname;
status = ndr_push_struct_blob(&blob, tmp_ctx, reply,
(ndr_push_flags_fn_t)ndr_push_nbt_netlogon_packet);
@@ -78,11 +79,15 @@
return status;
}
+ myname.name = lp_netbios_name();
+ myname.type = NBT_NAME_CLIENT;
+ myname.scope = NULL;
+
status = dgram_mailslot_send(dgmsock, DGRAM_DIRECT_UNIQUE,
mailslot_name,
&request->data.msg.source_name,
request->source, request->src_port,
- &request->data.msg.dest_name, &blob);
+ &myname, &blob);
talloc_free(tmp_ctx);
return status;
}
Modified: branches/SAMBA_4_0/source/librpc/idl/nbt.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/nbt.idl 2005-04-12 21:56:34 UTC (rev 6319)
+++ branches/SAMBA_4_0/source/librpc/idl/nbt.idl 2005-04-13 03:43:17 UTC (rev 6320)
@@ -327,7 +327,7 @@
/* \MAILSLOT\NET\NETLOGON mailslot requests */
- typedef [enum8bit] enum {
+ typedef enum {
NETLOGON_QUERY_FOR_PDC = 0x7,
NETLOGON_ANNOUNCE_UAS = 0xa,
NETLOGON_RESPONSE_FROM_PDC = 0xc
@@ -391,7 +391,6 @@
typedef [flag(NDR_NOALIGN),public] struct {
nbt_netlogon_command command;
- [value(0)] uint8 pad;
[switch_is(command)] nbt_netlogon_request req;
} nbt_netlogon_packet;
}
Modified: branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c 2005-04-12 21:56:34 UTC (rev 6319)
+++ branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c 2005-04-13 03:43:17 UTC (rev 6320)
@@ -44,6 +44,7 @@
}
/* setup a GETDC reply */
+ ZERO_STRUCT(reply);
reply.command = NETLOGON_RESPONSE_FROM_PDC;
pdc = &reply.req.response;
More information about the samba-cvs
mailing list