r21059: add an option to implement what windows wins server confgure via
authorStefan Metzmacher <metze@samba.org>
Tue, 30 Jan 2007 19:05:40 +0000 (19:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:44:26 +0000 (14:44 -0500)
HKEY_LOCAL_MACHINE\System\CurrentControlset\Services\WINS\Parameters\Prepend1BTo1CQueries

nbtd:wins_prepend1Bto1Cqueries=no will turn it off

metze
(This used to be commit 5362eede6b097c3a62d5c4d59151f8e26d89f1c0)

source4/nbt_server/wins/winsserver.c

index 9f9e72cbdc74573f964fe91da118b70fcf7dbd4e..4d40b31ba651e9f77c12fc4ec2002fe7b87f90b6 100644 (file)
@@ -583,8 +583,14 @@ static void nbtd_winsserver_query(struct nbt_name_socket *nbtsock,
        /*
         * w2k3 returns the first address of the 0x1B record as first address
         * to a 0x1C query
+        *
+        * since Windows 2000 Service Pack 2 there's on option to trigger this behavior:
+        *
+        * HKEY_LOCAL_MACHINE\System\CurrentControlset\Services\WINS\Parameters\Prepend1BTo1CQueries
+        * Typ: Daten REG_DWORD
+        * Value: 0 = deactivated, 1 = activated
         */
-       if (name->type == NBT_NAME_LOGON) {
+       if (name->type == NBT_NAME_LOGON && lp_parm_bool(-1, "nbtd", "wins_prepend1Bto1Cqueries", True)) {
                struct nbt_name name_1b;
 
                name_1b = *name;