---------------------
PatchSet 5540 
Date: 2002/12/07 18:21:33
Author: hno
Branch: ntlm_smbpasswd
Tag: (none) 
Log:
An old documentation update found on my laptop..

Members: 
	src/auth/ntlm/helpers/smbpasswd/README:1.1.2.1->1.1.2.2 
	src/auth/ntlm/helpers/smbpasswd/ntlm.h:1.1.2.3->1.1.2.4 

Index: squid/src/auth/ntlm/helpers/smbpasswd/README
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/smbpasswd/Attic/README,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- squid/src/auth/ntlm/helpers/smbpasswd/README	24 Feb 2002 03:54:28 -0000	1.1.2.1
+++ squid/src/auth/ntlm/helpers/smbpasswd/README	7 Dec 2002 18:21:33 -0000	1.1.2.2
@@ -1,7 +1,7 @@
 README for ntlm_smbpasswd
 
 ntlm_smbpasswd is a NTLM helper to Squid, allowing you to perform
-NTLM authentication to Samba smbpasswd files.
+NTLM authentication to Samba like smbpasswd files.
 
 ntlm_smbpasswd is (C)2002 Henrik Nordstrom <hno@squid-cache.org>. It includes
 components copyrighted by others. See respective source file for details.
Index: squid/src/auth/ntlm/helpers/smbpasswd/ntlm.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/smbpasswd/Attic/ntlm.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- squid/src/auth/ntlm/helpers/smbpasswd/ntlm.h	1 Apr 2002 11:16:53 -0000	1.1.2.3
+++ squid/src/auth/ntlm/helpers/smbpasswd/ntlm.h	7 Dec 2002 18:21:33 -0000	1.1.2.4
@@ -1,5 +1,5 @@
 /*
- * $Id: ntlm.h,v 1.1.2.3 2002/04/01 11:16:53 hno Exp $
+ * $Id: ntlm.h,v 1.1.2.4 2002/12/07 18:21:33 hno Exp $
  *
  * AUTHOR: Andrew Doran <ad@interlude.eu.org>
  *
@@ -52,33 +52,33 @@
 #define NTLMSSP_ANY			0
 
 /* flags */
-#define NTLMSSP_NEGOTIATE_UNICODE		0x00000001
-#define NTLMSSP_NEGOTIATE_OEM			0x00000002
-#define NTLMSSP_REQUEST_TARGET			0x00000004
-#define NTLMSSP_NEGOTIATE_SIGN			0x00000010
-#define NTLMSSP_NEGOTIATE_SEAL			0x00000020
-#define NTLMSSP_NEGOTIATE_DATAGRAM_STYLE	0x00000040
-#define NTLMSSP_NEGOTIATE_LM			0x00000080
-#define NTLMSSP_NEGOTIATE_NETWARE		0x00000100
-#define NTLMSSP_NEGOTIATE_NTLM			0x00000200
-#define NTLMSSP_OEM_DOMAIN_SUPPLIED		0x00001000
-#define NTLMSSP_OEM_WORKSTATION_SUPPLIED	0x00002000
-#define NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL	0x00004000
-#define NTLMSSP_NEGOTIATE_ALWAYS_SIGN		0x00008000
-#define NTLMSSP_NEGOTIATE_NTLM2			0x00080000
-#define NTLMSSP_NEGOTIATE_TARGET_INFO		0x00800000
-#define NTLMSSP_NEGOTIATE_128			0x20000000
-#define NTLMSSP_NEGOTIATE_KEY_EXCH		0x40000000
-
-/* challenge NTLMSSP_request flags */
-#define NTLMSSP_CHALLENGE_TARGET_IS_DOMAIN	0x00010000
-#define NTLMSSP_CHALLENGE_TARGET_IS_SERVER	0x00020000
-#define NTLMSSP_CHALLENGE_TARGET_IS_SHARE	0x00040000
+#define NTLMSSP_NEGOTIATE_UNICODE			0x00000001  /* Text are in unicode */
+#define NTLMSSP_NEGOTIATE_OEM				0x00000002  /* Text are in OEM (???) */
+#define NTLMSSP_REQUEST_TARGET				0x00000004  /* Ask server to return its target/realm */
+#define NTLMSSP_NEGOTIATE_SIGN				0x00000010  /* Request signature capability */
+#define NTLMSSP_NEGOTIATE_SEAL				0x00000020  /* Request seal capability */
+#define NTLMSSP_NEGOTIATE_DATAGRAM_STYLE		0x00000040
+#define NTLMSSP_NEGOTIATE_LM				0x00000080  /* Client/Server supports LM key for sign/seal */
+#define NTLMSSP_NEGOTIATE_NETWARE			0x00000100  /* Client/Server supports Netware authentication (???) */
+#define NTLMSSP_NEGOTIATE_NTLM				0x00000200  /* Client/Server supports NTLM */
+#define NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED		0x00001000
+#define NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED	0x00002000
+#define NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL		0x00004000
+#define NTLMSSP_NEGOTIATE_ALWAYS_SIGN			0x00008000
+#define NTLMSSP_NEGOTIATE_NTLM2				0x00080000  /* Client/Server supports NTLMv2 */
+#define NTLMSSP_NEGOTIATE_TARGET_INFO			0x00800000  /* ??? */
+#define NTLMSSP_NEGOTIATE_128				0x20000000  /* ??? */
+#define NTLMSSP_NEGOTIATE_KEY_EXCH			0x40000000  /* ??? */
+
+/* challenge TargetName is a XXX */
+#define NTLMSSP_CHALLENGE_TARGET_IS_DOMAIN		0x00010000  /* TargetName is a domain name */
+#define NTLMSSP_CHALLENGE_TARGET_IS_SERVER		0x00020000  /* TargetName is a server name */
+#define NTLMSSP_CHALLENGE_TARGET_IS_SHARE		0x00040000  /* TargetName is a share name */
 
 /* these NTLMSSP_are marked as "extra" fields */
-#define NTLMSSP_REQUEST_INIT_RESPONSE		0x00100000
-#define NTLMSSP_REQUEST_ACCEPT_RESPONSE		0x00200000
-#define NTLMSSP_REQUEST_NON_NT_SESSION_KEY	0x00400000
+#define NTLMSSP_REQUEST_INIT_RESPONSE			0x00100000  /* request NT session key */
+#define NTLMSSP_REQUEST_ACCEPT_RESPONSE			0x00200000  /* request session key, LUID? */
+#define NTLMSSP_REQUEST_NON_NT_SESSION_KEY		0x00400000  /* request non-NT session key (LM?) */
 
 /* This is an header common to all signatures, it's used to discriminate
  * among the different signature types. */
@@ -98,6 +98,7 @@
 typedef struct {
     ntlmhdr hdr;		/* NTLM header */
     int32_t flags;		/* Request flags */
+    /* the rest is optional fields */
     strhdr domain;		/* Domain we wish to authenticate in */
     strhdr workstation;		/* Client workstation name */
     char pad[256];		/* String data */
@@ -106,10 +107,10 @@
 /* Challenge request sent by server. */
 typedef struct {
     ntlmhdr hdr;		/* NTLM header */
-    strhdr target;		/* Authentication target (domain/server ...) */
+    strhdr target;		/* Authentication target (domain/server/share ...) */
     int32_t flags;		/* Request flags */
     u_char challenge[8];	/* Challenge string */
-    int16_t unknown1[4];	/* Some sort of context data */
+    uint32_t ServerContextHandle[2];	/* Some sort of context data */
     strhdr unknown2;		/* Some sort of context string data */
     char pad[256];		/* String data */
 } ntlm_challenge;
