diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2013-07-23 12:33:33 +0200 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2013-07-23 14:43:00 +0200 |
commit | c1fbb1801229f9afd13abfa96ebf5f20acb3a033 (patch) | |
tree | e45e71956e959828c668a49c646969815aadb8c9 | |
parent | 743680f78f3e98d9c693d2394d13b6b8ac80a637 (diff) | |
download | rsyslog-c1fbb1801229f9afd13abfa96ebf5f20acb3a033.tar.gz rsyslog-c1fbb1801229f9afd13abfa96ebf5f20acb3a033.tar.bz2 rsyslog-c1fbb1801229f9afd13abfa96ebf5f20acb3a033.zip |
Fixed bugid #464 in elasticsearch output module
Added some libcurl options in checkConn to disable the bodyport of the
request within this functions. Otherwise libcurl could have created a
sigsegv when curl_easy_perform() was called.
-rw-r--r-- | plugins/omelasticsearch/omelasticsearch.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c index cb96fb6b..5c53ba19 100644 --- a/plugins/omelasticsearch/omelasticsearch.c +++ b/plugins/omelasticsearch/omelasticsearch.c @@ -224,6 +224,12 @@ checkConn(instanceData *pData) DBGPRINTF("omelasticsearch: checkConn() curl_easy_init() failed\n"); ABORT_FINALIZE(RS_RET_SUSPENDED); } + /* Bodypart of request not needed, so set curl opt to nobody and httpget, otherwise lib-curl could sigsegv */ + curl_easy_setopt(curl, CURLOPT_HTTPGET, TRUE); + curl_easy_setopt(curl, CURLOPT_NOBODY, TRUE); + /* Only enable for debugging + curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); */ + cstr = es_str2cstr(url, NULL); curl_easy_setopt(curl, CURLOPT_URL, cstr); free(cstr); |