1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

s4:winsserver: reject name registrations with a scope length > 237

This matches Windows 2008 behavior. Name releases are just ignored.

metze
This commit is contained in:
Stefan Metzmacher 2010-02-01 14:39:13 +01:00
parent 7a02a2ba80
commit ea7ec4fb30

View File

@ -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;