From 1b47bac1c93c53d6c2501b080c969adc65d1dbe1 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 15 Jun 2006 22:42:53 +0000 Subject: [PATCH] Increase buffer sizes to 64K where a Kerberos 5 authenticator might be exchanged. Suggested by Markus Moeller. ticket: 2615 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18151 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gssftp/ftp/Makefile.in | 2 +- src/appl/telnet/libtelnet/Makefile.in | 2 +- src/appl/telnet/libtelnet/kerberos5.c | 2 +- src/appl/telnet/telnet/Makefile.in | 2 +- src/appl/telnet/telnet/network.c | 2 +- src/appl/telnet/telnetd/Makefile.in | 2 +- src/appl/telnet/telnetd/state.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/appl/gssftp/ftp/Makefile.in b/src/appl/gssftp/ftp/Makefile.in index 512483469..ded4c95da 100644 --- a/src/appl/gssftp/ftp/Makefile.in +++ b/src/appl/gssftp/ftp/Makefile.in @@ -5,7 +5,7 @@ BUILDTOP=$(REL)..$(S)..$(S).. # # appl/gssftp/ftp/Makefile.in # -DEFINES = -DGSSAPI -DFTP_BUFSIZ=10240 +DEFINES = -DGSSAPI -DFTP_BUFSIZ=65535 PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/appl/telnet/libtelnet/Makefile.in b/src/appl/telnet/libtelnet/Makefile.in index aec819d73..a52071c07 100644 --- a/src/appl/telnet/libtelnet/Makefile.in +++ b/src/appl/telnet/libtelnet/Makefile.in @@ -26,7 +26,7 @@ BUILDTOP=$(REL)..$(S)..$(S).. AUTH_DEF=-DAUTHENTICATION -DENCRYPTION -DDES_ENCRYPTION -DKRB5 -DFORWARD \ -UNO_LOGIN_F -DLOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN LOCALINCLUDES=-I.. -I$(srcdir)/.. @KRB4_INCLUDES@ -DEFINES = $(AUTH_DEF) +DEFINES = -DTELNET_BUFSIZE=65535 $(AUTH_DEF) LIBOBJS=@LIBOBJS@ SETENVSRC=@SETENVSRC@ diff --git a/src/appl/telnet/libtelnet/kerberos5.c b/src/appl/telnet/libtelnet/kerberos5.c index ad36aedda..ab8e04d3c 100644 --- a/src/appl/telnet/libtelnet/kerberos5.c +++ b/src/appl/telnet/libtelnet/kerberos5.c @@ -99,7 +99,7 @@ static void kerberos5_forward(Authenticator *); #endif /* FORWARD */ -static unsigned char str_data[8192] = {IAC, SB, TELOPT_AUTHENTICATION, 0, +static unsigned char str_data[TELNET_BUFSIZE] = {IAC, SB, TELOPT_AUTHENTICATION, 0, AUTHTYPE_KERBEROS_V5, }; /*static unsigned char str_name[1024] = { IAC, SB, TELOPT_AUTHENTICATION, TELQUAL_NAME, };*/ diff --git a/src/appl/telnet/telnet/Makefile.in b/src/appl/telnet/telnet/Makefile.in index 5e7b6c028..42a057899 100644 --- a/src/appl/telnet/telnet/Makefile.in +++ b/src/appl/telnet/telnet/Makefile.in @@ -27,7 +27,7 @@ BUILDTOP=$(REL)..$(S)..$(S).. AUTH_DEF=-DAUTHENTICATION -DENCRYPTION -DKRB5 -DFORWARD -UNO_LOGIN_F -DLOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN OTHERDEFS=-DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON LOCALINCLUDES=-I.. -I$(srcdir)/.. -DEFINES = $(AUTH_DEF) $(OTHERDEFS) +DEFINES = -DTELNET_BUFSIZE=65535 $(AUTH_DEF) $(OTHERDEFS) ARPA_TELNET= $(srcdir)/../arpa/telnet.h PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/appl/telnet/telnet/network.c b/src/appl/telnet/telnet/network.c index 1282bdb7e..60dc3bdcf 100644 --- a/src/appl/telnet/telnet/network.c +++ b/src/appl/telnet/telnet/network.c @@ -52,7 +52,7 @@ #include "fdset.h" Ring netoring, netiring; -unsigned char netobuf[2*BUFSIZ], netibuf[BUFSIZ]; +unsigned char netobuf[2*TELNET_BUFSIZE], netibuf[TELNET_BUFSIZE]; /* * Initialize internal network data structures. diff --git a/src/appl/telnet/telnetd/Makefile.in b/src/appl/telnet/telnetd/Makefile.in index c1368629b..0b19dd369 100644 --- a/src/appl/telnet/telnetd/Makefile.in +++ b/src/appl/telnet/telnetd/Makefile.in @@ -27,7 +27,7 @@ BUILDTOP=$(REL)..$(S)..$(S).. AUTH_DEF=-DAUTHENTICATION -DENCRYPTION -DKRB5 -DFORWARD -UNO_LOGIN_F -ULOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN OTHERDEFS=-DKLUDGELINEMODE -DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON LOCALINCLUDES=-I.. -I$(srcdir)/.. -DEFINES = $(AUTH_DEF) $(OTHERDEFS) +DEFINES = -DTELNET_BUFSIZE=65535 $(AUTH_DEF) $(OTHERDEFS) ARPA_TELNET= $(srcdir)/../arpa/telnet.h PROG_LIBPATH=-L$(TOPLIBD) $(KRB4_LIBPATH) diff --git a/src/appl/telnet/telnetd/state.c b/src/appl/telnet/telnetd/state.c index b01842f00..e08c5bb13 100644 --- a/src/appl/telnet/telnetd/state.c +++ b/src/appl/telnet/telnetd/state.c @@ -53,7 +53,7 @@ static int envvarok (char *); * Buffer for sub-options, and macros * for suboptions buffer manipulations */ -unsigned char subbuffer[4096], *subpointer= subbuffer, *subend= subbuffer; +unsigned char subbuffer[TELNET_BUFSIZE], *subpointer= subbuffer, *subend= subbuffer; #define SB_CLEAR() subpointer = subbuffer #define SB_TERM() { subend = subpointer; SB_CLEAR(); } -- 2.26.2