summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvarmojfekoj <theinric@redhat.com>2009-03-02 15:24:36 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-03-02 15:24:36 +0100
commit5d4fd0e2ef307d9c37c49272f8f20eaa6d5c4485 (patch)
treee37b10c4d1df261a7e157f0125f2141548ab30a4
parentb36d9c9294b3e786a442ce5e5417a3ad96f5531f (diff)
downloadrsyslog-5d4fd0e2ef307d9c37c49272f8f20eaa6d5c4485.tar.gz
rsyslog-5d4fd0e2ef307d9c37c49272f8f20eaa6d5c4485.tar.xz
rsyslog-5d4fd0e2ef307d9c37c49272f8f20eaa6d5c4485.zip
fixed a potential segfault problem in gssapi code
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
-rw-r--r--ChangeLog2
-rw-r--r--plugins/imgssapi/imgssapi.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 49ccaecd..0ea36be6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
Version 3.20.5 [v3-stable] (rgerhards), 2009-0?-??
- fixed a bug in configure.ac which resulted in problems with
environment detection - thanks to Michael Biebl for the patch
+- fixed a potential segfault problem in gssapi code
+ thanks to varmojfekoj for the patch
---------------------------------------------------------------------------
Version 3.20.4 [v3-stable] (rgerhards), 2009-02-09
- bugfix: inconsistent use of mutex/atomic operations could cause segfault
diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c
index df080020..d2b5fd8e 100644
--- a/plugins/imgssapi/imgssapi.c
+++ b/plugins/imgssapi/imgssapi.c
@@ -266,7 +266,8 @@ doOpenLstnSocks(tcpsrv_t *pSrv)
if(pGSrv->allowedMethods) {
/* fallback to plain TCP */
CHKiRet(tcpsrv.create_tcp_socket(pSrv));
- dbgprintf("Opened %d syslog TCP port(s).\n", *pRet);
+ } else {
+ ABORT_FINALIZE(RS_RET_GSS_ERR);
}
}
@@ -333,6 +334,11 @@ addGSSListener(void __attribute__((unused)) *pVal, uchar *pNewVal)
}
finalize_it:
+ if(iRet != RS_RET_OK) {
+ errmsg.LogError(0, NO_ERRCODE, "error %d trying to add listener", iRet);
+ if(pOurTcpsrv != NULL)
+ tcpsrv.Destruct(&pOurTcpsrv);
+ }
RETiRet;
}