experimenting on getting GETDC responses right: there is a domain name
authorLuke Leighton <lkcl@samba.org>
Sun, 19 Mar 2000 02:14:07 +0000 (02:14 +0000)
committerLuke Leighton <lkcl@samba.org>
Sun, 19 Mar 2000 02:14:07 +0000 (02:14 +0000)
length+name (sometimes length = 0) plus 16 bytes of padding and i'm
trying to work out the rules as to when this domain name is in there.

so far:

- if request is sent to DOMAIN<1b> or

- DGRAM type is a DGRAM_GROUP (msg_type of 17)

source/nmbd/nmbd_processlogon.c

index 3fd817e2e00e67c62c819ed51b65fd1e96049b01..1355eebbf7443dede7289cfaf4e6e50ed8d14de7 100644 (file)
@@ -136,10 +136,15 @@ logons are not enabled.\n",
                        else
                        {       /* A full length request */
 
-                               if (dgram_unique)
+                               if ((!dgram_unique) ||
+                                     dgram->dest_name.name_type == 0x1b)
                                {
                                        /* skip domain name */
-                                       q += 22;
+                                       int dom_len = CVAL(q, 0);
+                                       q+= 1;
+                                       DEBUG(10,("domain name :%s\n", q));
+                                       q += dom_len;
+                                       q += 16;
                                }
 
                                ntversion = IVAL(q, 0);