#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
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;
#include "negotiateScheme.h"
#include "wordlist.h"
+/**
+ * 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
authenticateNegotiateReleaseServer(AuthUserRequest * auth_user_request);
AuthNegotiateUserRequest::module_start(RH * handler, void *data)
{
authenticateStateData *r = NULL;
- static char buf[8192];
+ static char buf[MAX_AUTHTOKEN_LEN];
negotiate_user_t *negotiate_user;
auth_user_t *auth_user = user();
AUTHUSERREQUESTLOCK(r->auth_user_request, "r");
if (auth_state == AUTHENTICATE_STATE_INITIAL) {
- snprintf(buf, 8192, "YR %s\n", client_blob); //CHECKME: can ever client_blob be 0 here?
+ snprintf(buf, MAX_AUTHTOKEN_LEN, "YR %s\n", client_blob); //CHECKME: can ever client_blob be 0 here?
} else {
- snprintf(buf, 8192, "KK %s\n", client_blob);
+ snprintf(buf, MAX_AUTHTOKEN_LEN, "KK %s\n", client_blob);
}
waiting = 1;