GETDC request - finally settled on a length-detecting algorithm to see if
authorLuke Leighton <lkcl@samba.org>
Sun, 26 Mar 2000 23:42:43 +0000 (23:42 +0000)
committerLuke Leighton <lkcl@samba.org>
Sun, 26 Mar 2000 23:42:43 +0000 (23:42 +0000)
there is a domain name in the GETDC request.  this, after hand-editing
the fields in netmon to see if there was any way to detect differences
in various fields (DGRAM_UNIQUE to DGRAM_GROUP; type of NetBIOS name tried
0x1c and 0x1b) and there wasn't.

source/nmbd/nmbd_processlogon.c

index 23292f1081764ebb78c6a6eeebff1c3b1d5fce49..87e8e67e72e4a760012b87eac2c235bab49cd7a3 100644 (file)
@@ -136,8 +136,11 @@ logons are not enabled.\n",
                        else
                        {       /* A full length request */
 
-                               if ((!dgram_unique) ||
-                                     dgram->dest_name.name_type == 0x1b)
+                               /* if there is more than 16 bytes left,
+                                * then there is a domain name in here
+                                * which we have to skip.
+                                */
+                               if (len - PTR_DIFF(q, buf) > 16)
                                {
                                        /* skip domain name */
                                        int dom_len = CVAL(q, 0);