r12425: match w2k3 and store 0x1D names when they're registered as group name,
authorStefan Metzmacher <metze@samba.org>
Thu, 22 Dec 2005 08:27:10 +0000 (08:27 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:47:36 +0000 (13:47 -0500)
but queries still give not found

metze

source/nbt_server/wins/winsserver.c

index 4c4619b5c8d97e8e8ebf24cce080f98ed0100d47..6e2d470a1e25929721a452d4d6cc6c2a9bbdbae7 100644 (file)
@@ -183,9 +183,12 @@ static void nbtd_winsserver_register(struct nbt_name_socket *nbtsock,
        enum wrepl_name_type new_type = wrepl_type(nb_flags, name, mhomed);
        struct winsdb_addr *winsdb_addr = NULL;
 
-       /* as a special case, the local master browser name is always accepted
-          for registration, but never stored */
-       if (name->type == NBT_NAME_MASTER) {
+       /*
+        * as a special case, the local master browser name is always accepted
+        * for registration, but never stored, but w2k3 stores it if it's registered
+        * as a group name, (but a query for the 0x1D name still returns not found!)
+        */
+       if (name->type == NBT_NAME_MASTER && !(nb_flags & NBT_NM_GROUP)) {
                rcode = NBT_RCODE_OK;
                goto done;
        }
@@ -328,6 +331,10 @@ static void nbtd_winsserver_query(struct nbt_name_socket *nbtsock,
        const char **addresses;
        uint16_t nb_flags = 0; /* TODO: ... */
 
+       if (name->type == NBT_NAME_MASTER) {
+               goto notfound;
+       }
+
        status = winsdb_lookup(winssrv->wins_db, name, packet, &rec);
        if (!NT_STATUS_IS_OK(status)) {
                goto notfound;