From b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 14 Mar 2008 17:03:14 +0000 Subject: bugfix: TCP (and GSSAPI) octet-counted frame did not work correctly in all situations. If the header was split across two packet reads, it was invalidly processed, causing loss or modification of messages. --- plugins/imgssapi/imgssapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/imgssapi') diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c index 8d406a7e..74d5d5c5 100644 --- a/plugins/imgssapi/imgssapi.c +++ b/plugins/imgssapi/imgssapi.c @@ -480,7 +480,7 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess) (GSS_ROUTINE_ERROR(maj_stat) == GSS_S_DEFECTIVE_TOKEN)) { dbgprintf("GSS-API Reverting to plain TCP\n"); dbgprintf("tcp session socket with new data: #%d\n", fdSess); - if(tcps_sess.DataRcvd(pSess, buf, ret) == 0) { + if(tcps_sess.DataRcvd(pSess, buf, ret) != RS_RET_OK) { errmsg.LogError(NO_ERRCODE, "Tearing down TCP Session %p - see " "previous messages for reason(s)\n", pSess); ABORT_FINALIZE(RS_RET_ERR); // TODO: define good error codes -- cgit