summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-21 23:03:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:35 -0500
commit5b4acf8b10cf2817fa6beb54532e07481755f0eb (patch)
treec435d05a0bd13ea0e206928107061647d95f3042
parent221c1512a8b4de9a568c0a0cdafa97ab5c53368c (diff)
downloadsamba-5b4acf8b10cf2817fa6beb54532e07481755f0eb.tar.gz
samba-5b4acf8b10cf2817fa6beb54532e07481755f0eb.tar.bz2
samba-5b4acf8b10cf2817fa6beb54532e07481755f0eb.zip
r12412: - the 0x1E name must be registered as group name
- reject wins registration with a static record in the database metze (This used to be commit 66b57f5fbf1c2a35972950d655695f014e57d9c5)
-rw-r--r--source4/nbt_server/wins/winsserver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c
index caf56a2776..8b3b09487e 100644
--- a/source4/nbt_server/wins/winsserver.c
+++ b/source4/nbt_server/wins/winsserver.c
@@ -196,6 +196,12 @@ static void nbtd_winsserver_register(struct nbt_name_socket *nbtsock,
goto done;
}
+ /* w2k3 refuses 0x1E names with out marked as group */
+ if (name->type == NBT_NAME_BROWSER && !(nb_flags & NBT_NM_GROUP)) {
+ rcode = NBT_RCODE_RFS;
+ goto done;
+ }
+
status = winsdb_lookup(winssrv->wins_db, name, packet, &rec);
if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_NOT_FOUND, status)) {
rcode = wins_register_new(nbtsock, packet, src, new_type);
@@ -203,6 +209,13 @@ static void nbtd_winsserver_register(struct nbt_name_socket *nbtsock,
} else if (!NT_STATUS_IS_OK(status)) {
rcode = NBT_RCODE_SVR;
goto done;
+ } else if (rec->is_static) {
+ if (rec->type == WREPL_TYPE_GROUP || rec->type == WREPL_TYPE_SGROUP) {
+ rcode = NBT_RCODE_OK;
+ goto done;
+ }
+ rcode = NBT_RCODE_ACT;
+ goto done;
}
if (rec->type == WREPL_TYPE_GROUP) {