summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-01 14:39:13 +0100
committerStefan Metzmacher <metze@samba.org>2010-02-01 15:23:33 +0100
commitea7ec4fb30a261cedb882c9325815679e5e20d57 (patch)
tree5d3ef2bb55f9844e9bb23b46552041583603b480
parent7a02a2ba80c2997947a2b2c48c33f8c7647f7471 (diff)
downloadsamba-ea7ec4fb30a261cedb882c9325815679e5e20d57.tar.gz
samba-ea7ec4fb30a261cedb882c9325815679e5e20d57.tar.bz2
samba-ea7ec4fb30a261cedb882c9325815679e5e20d57.zip
s4:winsserver: reject name registrations with a scope length > 237
This matches Windows 2008 behavior. Name releases are just ignored. metze
-rw-r--r--source4/nbt_server/wins/winsserver.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c
index 4b8b8cc137..ca8daedc66 100644
--- a/source4/nbt_server/wins/winsserver.c
+++ b/source4/nbt_server/wins/winsserver.c
@@ -496,6 +496,11 @@ static void nbtd_winsserver_register(struct nbt_name_socket *nbtsock,
goto done;
}
+ if (name->scope && strlen(name->scope) > 237) {
+ rcode = NBT_RCODE_SVR;
+ goto done;
+ }
+
duplicate_packet = wins_check_wack_queue(iface, packet, src);
if (duplicate_packet) {
/* just ignore the packet */
@@ -874,6 +879,10 @@ static void nbtd_winsserver_release(struct nbt_name_socket *nbtsock,
goto done;
}
+ if (name->scope && strlen(name->scope) > 237) {
+ goto done;
+ }
+
status = winsdb_lookup(winssrv->wins_db, name, packet, &rec);
if (!NT_STATUS_IS_OK(status)) {
goto done;