]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Markus <huaraz@moeller.plus.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 6 Aug 2008 12:51:15 +0000 (00:51 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 6 Aug 2008 12:51:15 +0000 (00:51 +1200)
Bug 2426: Increase buffer in authenticateNegotiateStart / squid_kerb_auth

- Kerberos helper bit left out of first patch.

helpers/negotiate_auth/squid_kerb_auth/squid_kerb_auth.c
src/auth/negotiate/auth_negotiate.cc

index bc2c3f5f54ae97f8e09f38d28cca63cf3ab5466e..2870a13f5602dc8915f7bd593edbfda8a71a4a81 100644 (file)
 #include "spnegohelp.h"
 #endif
 
+// AYJ: must match the definition in src/auth/negotiate/auth_negotiate.cc
+#define MAX_AUTHTOKEN_LEN      32768
+
+// AYJ: match define in include/rfc2181.h
 #ifndef HOST_NAME_MAX
 #define HOST_NAME_MAX 256
 #endif
@@ -177,11 +181,9 @@ int check_gss_err(OM_uint32 major_status, OM_uint32 minor_status, const char* fu
   return(0);
 }
 
-
-
 int main(int argc, char * const argv[])
 {
-  char buf[6400];
+  char buf[MAX_AUTHTOKEN_LEN];
   char *c;
   int length=0;
   static int err=0;
index cfde0a883a06b5d3a9f4cb00f474ccb2e892fcda..b656b6c46eb26919eb0ed6f8e8bd696cea0ae3d0 100644 (file)
@@ -58,6 +58,7 @@
 /**
  * Maximum length (buffer size) for token strings.
  */
+// AYJ: must match re-definition in helpers/negotiate_auth/squid_kerb_auth/squid_kerb_auth.c
 #define MAX_AUTHTOKEN_LEN   32768
 
 static void