--------------------- PatchSet 1003 Date: 2004/04/10 10:12:42 Author: serassio Branch: nt Tag: (none) Log: Arranged new Windows native NTLM authenticator with Squid 3.0 source changes Members: helpers/basic_auth/win32_locallogon/NT_auth.c:1.2.18.2->1.2.18.3 helpers/basic_auth/win32_locallogon/valid.h:1.2.18.2->1.2.18.3 helpers/ntlm_auth/NTLMSSP-WIN32/libntlmssp.c:1.2.18.5->1.2.18.6 helpers/ntlm_auth/NTLMSSP-WIN32/ntlm.h:1.2.18.3->1.2.18.4 helpers/ntlm_auth/NTLMSSP-WIN32/ntlm_auth.c:1.2.18.5->1.2.18.6 Index: squid3/helpers/basic_auth/win32_locallogon/NT_auth.c =================================================================== RCS file: /cvsroot/squid-sf//squid3/helpers/basic_auth/win32_locallogon/Attic/NT_auth.c,v retrieving revision 1.2.18.2 retrieving revision 1.2.18.3 diff -u -r1.2.18.2 -r1.2.18.3 --- squid3/helpers/basic_auth/win32_locallogon/NT_auth.c 28 Feb 2004 09:01:03 -0000 1.2.18.2 +++ squid3/helpers/basic_auth/win32_locallogon/NT_auth.c 10 Apr 2004 10:12:42 -0000 1.2.18.3 @@ -26,7 +26,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ -#include "squid.h" +#include "config.h" +#include +#include +#include "util.h" /* Check if we try to compile on a Windows Platform */ #if defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_) Index: squid3/helpers/basic_auth/win32_locallogon/valid.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/helpers/basic_auth/win32_locallogon/Attic/valid.h,v retrieving revision 1.2.18.2 retrieving revision 1.2.18.3 diff -u -r1.2.18.2 -r1.2.18.3 --- squid3/helpers/basic_auth/win32_locallogon/valid.h 28 Feb 2004 09:01:03 -0000 1.2.18.2 +++ squid3/helpers/basic_auth/win32_locallogon/valid.h 10 Apr 2004 10:12:42 -0000 1.2.18.3 @@ -31,6 +31,8 @@ #include "sspwin32.h" +#define safe_free(x) if (x) { free(x); x = NULL; } + /* SMB User verification function */ #define NTV_NO_ERROR 0 Index: squid3/helpers/ntlm_auth/NTLMSSP-WIN32/libntlmssp.c =================================================================== RCS file: /cvsroot/squid-sf//squid3/helpers/ntlm_auth/NTLMSSP-WIN32/Attic/libntlmssp.c,v retrieving revision 1.2.18.5 retrieving revision 1.2.18.6 diff -u -r1.2.18.5 -r1.2.18.6 --- squid3/helpers/ntlm_auth/NTLMSSP-WIN32/libntlmssp.c 28 Feb 2004 09:01:14 -0000 1.2.18.5 +++ squid3/helpers/ntlm_auth/NTLMSSP-WIN32/libntlmssp.c 10 Apr 2004 10:12:44 -0000 1.2.18.6 @@ -16,8 +16,9 @@ typedef unsigned char uchar; -#include "squid.h" +#include "util.h" #include "ntlm.h" +#include #include #include @@ -294,8 +295,8 @@ const char *encoded; memset(&ne, 0, sizeof(ntlm_negotiate)); /* reset */ memcpy(ne.signature, "NTLMSSP", 8); /* set the signature */ - ne.type = WSWAP(NTLM_NEGOTIATE); /* this is a challenge */ - ne.flags = WSWAP( + ne.type = le32toh(NTLM_NEGOTIATE); /* this is a challenge */ + ne.flags = le32toh( NEGOTIATE_ALWAYS_SIGN | NEGOTIATE_USE_NTLM | NEGOTIATE_USE_LM | Index: squid3/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/helpers/ntlm_auth/NTLMSSP-WIN32/Attic/ntlm.h,v retrieving revision 1.2.18.3 retrieving revision 1.2.18.4 diff -u -r1.2.18.3 -r1.2.18.4 --- squid3/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm.h 28 Feb 2004 09:01:14 -0000 1.2.18.3 +++ squid3/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm.h 10 Apr 2004 10:12:44 -0000 1.2.18.4 @@ -110,4 +110,6 @@ extern char *ntlm_check_auth(ntlm_authenticate * auth, int auth_length); extern void hex_dump(void *, int); +#define safe_free(x) if (x) { free(x); x = NULL; } + #endif /* _NTLM_H_ */ Index: squid3/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm_auth.c =================================================================== RCS file: /cvsroot/squid-sf//squid3/helpers/ntlm_auth/NTLMSSP-WIN32/Attic/ntlm_auth.c,v retrieving revision 1.2.18.5 retrieving revision 1.2.18.6 diff -u -r1.2.18.5 -r1.2.18.6 --- squid3/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm_auth.c 28 Feb 2004 09:01:14 -0000 1.2.18.5 +++ squid3/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm_auth.c 10 Apr 2004 10:12:44 -0000 1.2.18.6 @@ -52,8 +52,10 @@ * */ -#include "squid.h" +#include "util.h" +#include #include "ntlm.h" +#include #define BUFFER_SIZE 10240