summaryrefslogtreecommitdiffstats
path: root/plugins/imgssapi
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-14 17:03:14 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-14 17:03:14 +0000
commitb0e8ce6c3d48e664135a0f74d5b4df2b3a42827f (patch)
treeb564ab5c477c194de8985d9c97a048b7fb95629c /plugins/imgssapi
parent38362e127f7b7b836332bf17097dbbae71bbe810 (diff)
downloadrsyslog-b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f.tar.gz
rsyslog-b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f.tar.xz
rsyslog-b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f.zip
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.
Diffstat (limited to 'plugins/imgssapi')
-rw-r--r--plugins/imgssapi/imgssapi.c2
1 files changed, 1 insertions, 1 deletions
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