summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-20 15:35:49 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-20 15:35:49 +1000
commitcd167fd44b1833789f6e57766e4c5393bc468ff7 (patch)
tree0a394bfa562b1a4d53976cdf4db429f46602f8a1
parent5ca6f42510cd746f62d3973a3c01085876c71b7b (diff)
parent52f0af3990f79dfc6b2e784eed9e58a2a705d1ea (diff)
downloadsamba-cd167fd44b1833789f6e57766e4c5393bc468ff7.tar.gz
samba-cd167fd44b1833789f6e57766e4c5393bc468ff7.tar.bz2
samba-cd167fd44b1833789f6e57766e4c5393bc468ff7.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit e360be0b99b638afdfa789e217bf08f99d09be7a)
-rw-r--r--source4/libcli/dgram/dgramsocket.c2
-rw-r--r--source4/libcli/dgram/libdgram.h1
-rw-r--r--source4/nbt_server/dgram/browse.c1
-rw-r--r--source4/nbt_server/dgram/netlogon.c9
-rw-r--r--source4/nbt_server/irpc.c5
-rw-r--r--source4/torture/nbt/dgram.c3
6 files changed, 7 insertions, 14 deletions
diff --git a/source4/libcli/dgram/dgramsocket.c b/source4/libcli/dgram/dgramsocket.c
index 2cdda654ef..06b7bd5771 100644
--- a/source4/libcli/dgram/dgramsocket.c
+++ b/source4/libcli/dgram/dgramsocket.c
@@ -88,7 +88,7 @@ static void dgm_socket_recv(struct nbt_dgram_socket *dgmsock)
struct dgram_mailslot_handler *dgmslot;
dgmslot = dgram_mailslot_find(dgmsock, mailslot_name);
if (dgmslot) {
- dgmslot->handler(dgmslot, packet, mailslot_name, src);
+ dgmslot->handler(dgmslot, packet, src);
} else {
DEBUG(2,("No mailslot handler for '%s'\n", mailslot_name));
}
diff --git a/source4/libcli/dgram/libdgram.h b/source4/libcli/dgram/libdgram.h
index 51408d029e..e1209e7a54 100644
--- a/source4/libcli/dgram/libdgram.h
+++ b/source4/libcli/dgram/libdgram.h
@@ -70,7 +70,6 @@ struct nbt_dgram_socket {
typedef void (*dgram_mailslot_handler_t)(struct dgram_mailslot_handler *,
struct nbt_dgram_packet *,
- const char *mailslot_name,
struct socket_address *src);
struct dgram_mailslot_handler {
diff --git a/source4/nbt_server/dgram/browse.c b/source4/nbt_server/dgram/browse.c
index 36f0160e1b..2e12fa114a 100644
--- a/source4/nbt_server/dgram/browse.c
+++ b/source4/nbt_server/dgram/browse.c
@@ -49,7 +49,6 @@ static const char *nbt_browse_opcode_string(enum nbt_browse_opcode r)
*/
void nbtd_mailslot_browse_handler(struct dgram_mailslot_handler *dgmslot,
struct nbt_dgram_packet *packet,
- const char *mailslot_name,
struct socket_address *src)
{
struct nbt_browse_packet *browse = talloc(dgmslot, struct nbt_browse_packet);
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index c66089523b..b8fb1b8677 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -38,7 +38,6 @@
static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
struct nbtd_interface *iface,
struct nbt_dgram_packet *packet,
- const char *mailslot_name,
const struct socket_address *src,
struct nbt_netlogon_packet *netlogon)
{
@@ -106,7 +105,6 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
static void nbtd_netlogon_samlogon(struct dgram_mailslot_handler *dgmslot,
struct nbtd_interface *iface,
struct nbt_dgram_packet *packet,
- const char *mailslot_name,
const struct socket_address *src,
struct nbt_netlogon_packet *netlogon)
{
@@ -135,7 +133,7 @@ static void nbtd_netlogon_samlogon(struct dgram_mailslot_handler *dgmslot,
}
if (netlogon->req.logon.sid_size) {
- if (strcasecmp(mailslot_name, NBT_MAILSLOT_NTLOGON) == 0) {
+ if (strcasecmp(dgmslot->mailslot_name, NBT_MAILSLOT_NTLOGON) == 0) {
DEBUG(2,("NBT netlogon query failed because SID specified in request to NTLOGON\n"));
/* SID not permitted on NTLOGON (for some reason...) */
return;
@@ -171,7 +169,6 @@ static void nbtd_netlogon_samlogon(struct dgram_mailslot_handler *dgmslot,
*/
void nbtd_mailslot_netlogon_handler(struct dgram_mailslot_handler *dgmslot,
struct nbt_dgram_packet *packet,
- const char *mailslot_name,
struct socket_address *src)
{
NTSTATUS status = NT_STATUS_NO_MEMORY;
@@ -200,11 +197,11 @@ void nbtd_mailslot_netlogon_handler(struct dgram_mailslot_handler *dgmslot,
switch (netlogon->command) {
case LOGON_PRIMARY_QUERY:
- nbtd_netlogon_getdc(dgmslot, iface, packet, mailslot_name,
+ nbtd_netlogon_getdc(dgmslot, iface, packet,
src, netlogon);
break;
case LOGON_SAM_LOGON_REQUEST:
- nbtd_netlogon_samlogon(dgmslot, iface, packet, mailslot_name,
+ nbtd_netlogon_samlogon(dgmslot, iface, packet,
src, netlogon);
break;
default:
diff --git a/source4/nbt_server/irpc.c b/source4/nbt_server/irpc.c
index 3a70c98041..8f1f74afcf 100644
--- a/source4/nbt_server/irpc.c
+++ b/source4/nbt_server/irpc.c
@@ -61,7 +61,6 @@ struct getdc_state {
static void getdc_recv_netlogon_reply(struct dgram_mailslot_handler *dgmslot,
struct nbt_dgram_packet *packet,
- const char *mailslot_name,
struct socket_address *src)
{
struct getdc_state *s =
@@ -85,8 +84,6 @@ static void getdc_recv_netlogon_reply(struct dgram_mailslot_handler *dgmslot,
goto done;
}
- status = NT_STATUS_NO_LOGON_SERVERS;
-
p = netlogon.samlogon.nt4.server;
DEBUG(10, ("NTLOGON_SAM_LOGON_REPLY: server: %s, user: %s, "
@@ -103,6 +100,8 @@ static void getdc_recv_netlogon_reply(struct dgram_mailslot_handler *dgmslot,
goto done;
}
+ status = NT_STATUS_OK;
+
done:
irpc_send_reply(s->msg, status);
}
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index ce5758977d..2bc3d3d75e 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -39,7 +39,6 @@
*/
static void netlogon_handler(struct dgram_mailslot_handler *dgmslot,
struct nbt_dgram_packet *packet,
- const char *mailslot_name,
struct socket_address *src)
{
NTSTATUS status;
@@ -54,7 +53,7 @@ static void netlogon_handler(struct dgram_mailslot_handler *dgmslot,
src->addr, src->port);
return;
}
-
+
(*replies)++;
}