[krbdev.mit.edu #2692] A oob bug in krlogin.c

Voradesh Yenbut via RT rt-comment at krbdev.mit.edu
Fri Sep 3 14:25:11 EDT 2004



We occasionally had problem with login banner message not showing up
using rlogin.  It appears that the banner message is right after an
oob data to flush write, but the code, as in an comment in krlogin.c
to do "flush before", actually flushes everything in the buffer by
incorrectly setting the rcvcnt variable to 0.

A patch to krlogin.c of krb5-1.3.4 is included below.

----
Voradesh Yenbut
CS Lab Infrastructure, 206 685-0912
Computer Science & Engineering
University of Washington


--- appl/bsd/krlogin.c	2004/09/01 23:30:53	1.1
+++ appl/bsd/krlogin.c	2004/09/02 00:47:02
@@ -1603,7 +1603,7 @@
 			    /* |n| <= left */
 			    if (n < 0) {
 				left -= (-n);
-				rcvcnt = 0;
+				rcvcnt = left;
 				/* flush before, and (-n) bytes */
 				if (left > 0)
 				    memmove(rcvbuf, cp+(-n), left);








More information about the krb5-bugs mailing list