Compare commits
135 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3edd89e06c | ||
|
|
deb7659149 | ||
|
|
8770ba82df | ||
|
|
06ff53b9e1 | ||
|
|
848f0a1142 | ||
|
|
752b97d2f5 | ||
|
|
6e2902bbf5 | ||
|
|
8a0d7614d6 | ||
|
|
b80cab473a | ||
|
|
b019afff9a | ||
|
|
cb8e5c624a | ||
|
|
ae8648a288 | ||
|
|
9279438445 | ||
|
|
1064c4ef0e | ||
|
|
546fde3d35 | ||
|
|
21c818925f | ||
|
|
9e24c81c59 | ||
|
|
10928b1307 | ||
|
|
5d881b524c | ||
|
|
4a1805d718 | ||
|
|
ba510f5b7c | ||
|
|
738d1ddec5 | ||
|
|
2189965d83 | ||
|
|
1e6869a681 | ||
|
|
eb3dcaa1b2 | ||
|
|
3f11b7ff78 | ||
|
|
de23c1e0c8 | ||
|
|
a2d2f9d9e8 | ||
|
|
e050f5c5b5 | ||
|
|
4cca27d51d | ||
|
|
c5f5013b30 | ||
|
|
0dd4435c2e | ||
|
|
0927f2c9f8 | ||
|
|
88e628e1aa | ||
|
|
c929974881 | ||
|
|
2e07e95fe6 | ||
|
|
00eb7785d3 | ||
|
|
cee335df7d | ||
|
|
8b6dfc7653 | ||
|
|
c61f1049a4 | ||
|
|
5f15cb8d9b | ||
|
|
e45f631e5f | ||
|
|
e74591073c | ||
|
|
061666c54f | ||
|
|
81c2ffa0f1 | ||
|
|
43871ce157 | ||
|
|
44085845eb | ||
|
|
a01e46b838 | ||
|
|
ffb46075f3 | ||
|
|
20fd06e404 | ||
|
|
ae606bed23 | ||
|
|
ad5200aa8c | ||
|
|
6ad07b6b5a | ||
|
|
a5c99cffb1 | ||
|
|
d8cfafacf9 | ||
|
|
70ab8c4473 | ||
|
|
95788bcbec | ||
|
|
595d2133f9 | ||
|
|
480dbb3683 | ||
|
|
b183776247 |
||
|
|
bbfc785ba0 |
||
|
|
21122641c3 |
||
|
|
db636a778d | ||
|
|
cec45294af |
||
|
|
4c239ab2d7 | ||
|
|
8018b8f96b | ||
|
|
3182f1fac5 | ||
|
|
de231b0757 | ||
|
|
503cb6d5f4 | ||
|
|
7c1121d2ca | ||
|
|
f4d39b1b7f | ||
|
|
3df0efa102 | ||
|
|
171f93954f | ||
|
|
1e0113c19c | ||
|
|
93891a13b6 | ||
|
|
80cfa3c0d1 | ||
|
|
1b8033b79b | ||
|
|
e181ced3f7 | ||
|
|
899c7759e6 | ||
|
|
f2ed0514cf | ||
|
|
11b816ac4b | ||
|
|
1da1042ba2 | ||
|
|
1f79054ddc | ||
|
|
afac6d778b | ||
|
|
af881d48de | ||
|
|
c0f7639d4e | ||
|
|
a84ea235e6 | ||
|
|
1819224242 | ||
|
|
fc767e39a3 | ||
|
|
a650d796f5 | ||
|
|
be25acbf0d | ||
|
|
db2e016bcc | ||
|
|
12d390f706 | ||
|
|
eeabf38246 | ||
|
|
d9aa2e8050 | ||
|
|
04e176ec44 | ||
|
|
5e2d823225 | ||
|
|
b05cdc6e76 | ||
|
|
c485a3e6f3 | ||
|
|
00e4ddfd89 | ||
|
|
718819151e | ||
|
|
29b6af9d22 |
||
|
|
784ec25f24 |
||
|
|
54e9ebc96a | ||
|
|
4ce9c63ebe | ||
|
|
e9c5ea3f8f | ||
|
|
ab864148b9 | ||
|
|
9d032c836d | ||
|
|
2df2107a5d | ||
|
|
3a42386188 | ||
|
|
2a1eee132a | ||
|
|
3f0e3ca5ea | ||
|
|
f280af7c57 | ||
|
|
5d66e2d7f6 | ||
|
|
1942fd44bc | ||
|
|
1b31db0997 | ||
|
|
e980b9e2b3 | ||
|
|
c27c7a3386 | ||
|
|
2a544ec346 | ||
|
|
1149f8649e | ||
|
|
d938e78fb4 | ||
|
|
5a42de2712 | ||
|
|
a9dfa82cd8 | ||
|
|
ce8f215178 | ||
|
|
4774af85ea | ||
|
|
9a9f6af09f | ||
|
|
4674d1ce99 | ||
|
|
1b704f0a0d | ||
|
|
58aa581416 | ||
|
|
2d00b65931 | ||
|
|
10bcce5e47 | ||
|
|
73ab8fcbf2 | ||
|
|
3827bda634 | ||
|
|
bfc9412fb7 | ||
|
|
b2cdf67707 |
16 changed files with 964 additions and 553 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
58
.gitignore
vendored
58
.gitignore
vendored
|
|
@ -45,3 +45,61 @@ rsyslog-4.6.3.tar.gz
|
|||
/rsyslog-doc-8.29.0.tar.gz
|
||||
/rsyslog-8.30.0.tar.gz
|
||||
/rsyslog-doc-8.30.0.tar.gz
|
||||
/rsyslog-8.31.0.tar.gz
|
||||
/rsyslog-doc-8.31.0.tar.gz
|
||||
/rsyslog-doc-8.32.0.tar.gz
|
||||
/rsyslog-8.32.0.tar.gz
|
||||
/rsyslog-doc-8.34.0.tar.gz
|
||||
/rsyslog-8.34.0.tar.gz
|
||||
/rsyslog-8.35.0.tar.gz
|
||||
/rsyslog-doc-8.35.0.tar.gz
|
||||
/rsyslog-8.36.0.tar.gz
|
||||
/rsyslog-doc-8.36.0.tar.gz
|
||||
/rsyslog-8.37.0.tar.gz
|
||||
/rsyslog-doc-8.37.0.tar.gz
|
||||
/rsyslog-8.38.0.tar.gz
|
||||
/rsyslog-doc-8.38.0.tar.gz
|
||||
/rsyslog-8.39.0.tar.gz
|
||||
/rsyslog-doc-8.39.0.tar.gz
|
||||
/rsyslog-8.1904.0.tar.gz
|
||||
/rsyslog-doc-8.1904.0.tar.gz
|
||||
/rsyslog-8.1907.0.tar.gz
|
||||
/rsyslog-doc-8.1907.0.tar.gz
|
||||
/rsyslog-8.1910.0.tar.gz
|
||||
/rsyslog-doc-8.1910.0.tar.gz
|
||||
/rsyslog-8.1911.0.tar.gz
|
||||
/rsyslog-doc-8.1911.0.tar.gz
|
||||
/rsyslog-8.2001.0.tar.gz
|
||||
/rsyslog-doc-8.2001.0.tar.gz
|
||||
/rsyslog-8.2002.0.tar.gz
|
||||
/rsyslog-doc-8.2002.0.tar.gz
|
||||
/rsyslog-8.2008.0.tar.gz
|
||||
/rsyslog-doc-8.2008.0.tar.gz
|
||||
/rsyslog-8.2010.0.tar.gz
|
||||
/rsyslog-doc-8.2010.0.tar.gz
|
||||
/qpid-proton-0.31.0.tar.gz
|
||||
/rsyslog-8.2102.0.tar.gz
|
||||
/rsyslog-doc-8.2102.0.tar.gz
|
||||
/qpid-proton-0.34.0.tar.gz
|
||||
/rsyslog-8.2204.0.tar.gz
|
||||
/rsyslog-doc-8.2204.0.tar.gz
|
||||
/rsyslog-8.2210.0.tar.gz
|
||||
/rsyslog-doc-8.2210.0.tar.gz
|
||||
/rsyslog-8.2306.0.tar.gz
|
||||
/rsyslog-doc-8.2306.0.tar.gz
|
||||
/rsyslog-8.2308.0.tar.gz
|
||||
/rsyslog-doc-8.2308.0.tar.gz
|
||||
/qpid-proton-0.39.0.tar.gz
|
||||
/rsyslog-8.2310.0.tar.gz
|
||||
/rsyslog-doc-8.2310.0.tar.gz
|
||||
/rsyslog-8.2312.0.tar.gz
|
||||
/rsyslog-doc-8.2312.0.tar.gz
|
||||
/rsyslog-8.2408.0.tar.gz
|
||||
/rsyslog-doc-8.2408.0.tar.gz
|
||||
/rsyslog-8.2412.0.tar.gz
|
||||
/rsyslog-doc-8.2412.0.tar.gz
|
||||
/rsyslog-8.2506.0.tar.gz
|
||||
/rsyslog-doc-8.2506.0.tar.gz
|
||||
/rsyslog-8.2508.0.tar.gz
|
||||
/qpid-proton-0.40.0.tar.gz
|
||||
/rsyslog-8.2510.0.tar.gz
|
||||
|
|
|
|||
6
plans/main.fmf
Normal file
6
plans/main.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
summary: Run all tests
|
||||
execute:
|
||||
how: tmt
|
||||
discover:
|
||||
how: fmf
|
||||
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
From fa7d98b0cb0512d84355e3aafdc5a3e366842f2a Mon Sep 17 00:00:00 2001
|
||||
From: Radovan Sroka <rsroka@redhat.com>
|
||||
Date: Mon, 21 Nov 2016 13:38:18 +0100
|
||||
Subject: [PATCH 2/4] Rebased from: Patch2:
|
||||
rsyslog-7.2.1-msg_c_nonoverwrite_merge.patch
|
||||
|
||||
Resolves:
|
||||
no adressed bugzila
|
||||
---
|
||||
runtime/msg.c | 25 +++++++++++++++++++++++--
|
||||
1 file changed, 23 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/runtime/msg.c b/runtime/msg.c
|
||||
index f6e017b..5430331 100644
|
||||
--- a/runtime/msg.c
|
||||
+++ b/runtime/msg.c
|
||||
@@ -4632,6 +4632,27 @@ finalize_it:
|
||||
RETiRet;
|
||||
}
|
||||
|
||||
+static rsRetVal jsonMerge(struct json_object *existing, struct json_object *json);
|
||||
+
|
||||
+static rsRetVal
|
||||
+jsonMergeNonOverwrite(struct json_object *existing, struct json_object *json)
|
||||
+{
|
||||
+ DEFiRet;
|
||||
+
|
||||
+ struct json_object_iterator it = json_object_iter_begin(existing);
|
||||
+ struct json_object_iterator itEnd = json_object_iter_end(existing);
|
||||
+ while (!json_object_iter_equal(&it, &itEnd)) {
|
||||
+ json_object_object_add(json, json_object_iter_peek_name(&it),
|
||||
+ json_object_get(json_object_iter_peek_value(&it)));
|
||||
+ json_object_iter_next(&it);
|
||||
+ }
|
||||
+
|
||||
+ CHKiRet(jsonMerge(existing, json));
|
||||
+finalize_it:
|
||||
+ RETiRet;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static rsRetVal
|
||||
jsonMerge(struct json_object *existing, struct json_object *json)
|
||||
{
|
||||
@@ -4714,7 +4735,7 @@ msgAddJSON(msg_t * const pM, uchar *name, struct json_object *json, int force_re
|
||||
if(*pjroot == NULL)
|
||||
*pjroot = json;
|
||||
else
|
||||
- CHKiRet(jsonMerge(*pjroot, json));
|
||||
+ CHKiRet(jsonMergeNonOverwrite(*pjroot, json));
|
||||
} else {
|
||||
if(*pjroot == NULL) {
|
||||
/* now we need a root obj */
|
||||
@@ -4742,7 +4763,7 @@ msgAddJSON(msg_t * const pM, uchar *name, struct json_object *json, int force_re
|
||||
json_object_object_add(parent, (char*)leaf, json);
|
||||
} else {
|
||||
if(json_object_get_type(json) == json_type_object) {
|
||||
- CHKiRet(jsonMerge(*pjroot, json));
|
||||
+ CHKiRet(jsonMergeNonOverwrite(*pjroot, json));
|
||||
} else {
|
||||
/* TODO: improve the code below, however, the current
|
||||
* state is not really bad */
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -1,128 +0,0 @@
|
|||
From 8d793eafdde0b74d0b4424f0d194b5dc6801a5d1 Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Gerhards <rgerhards@adiscon.com>
|
||||
Date: Tue, 17 Oct 2017 17:34:49 +0200
|
||||
Subject: [PATCH] imgssapi: fix compiler warnings
|
||||
|
||||
---
|
||||
plugins/imgssapi/imgssapi.c | 25 ++++++++++++-------------
|
||||
1 file changed, 12 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c
|
||||
index aafce7d2..836931c7 100644
|
||||
--- a/plugins/imgssapi/imgssapi.c
|
||||
+++ b/plugins/imgssapi/imgssapi.c
|
||||
@@ -9,7 +9,7 @@
|
||||
* NOTE: read comments in module-template.h to understand how this file
|
||||
* works!
|
||||
*
|
||||
- * Copyright 2007, 2014 Rainer Gerhards and Adiscon GmbH.
|
||||
+ * Copyright 2007, 2017 Rainer Gerhards and Adiscon GmbH.
|
||||
*
|
||||
* This file is part of rsyslog.
|
||||
*
|
||||
@@ -63,7 +63,6 @@
|
||||
|
||||
MODULE_TYPE_INPUT
|
||||
MODULE_TYPE_NOKEEP
|
||||
-MODULE_CNFNAME("imgssapi")
|
||||
|
||||
/* defines */
|
||||
#define ALLOWEDMETHOD_GSS 2
|
||||
@@ -162,7 +161,7 @@ OnSessDestruct(void *ppUsr)
|
||||
OM_uint32 maj_stat, min_stat;
|
||||
maj_stat = gss_delete_sec_context(&min_stat, &(*ppGSess)->gss_context, GSS_C_NO_BUFFER);
|
||||
if (maj_stat != GSS_S_COMPLETE)
|
||||
- gssutil.display_status("deleting context", maj_stat, min_stat);
|
||||
+ gssutil.display_status((char*)"deleting context", maj_stat, min_stat);
|
||||
}
|
||||
|
||||
free(*ppGSess);
|
||||
@@ -291,7 +290,7 @@ finalize_it:
|
||||
|
||||
|
||||
static rsRetVal
|
||||
-doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd)
|
||||
+doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd, int *const oserr)
|
||||
{
|
||||
DEFiRet;
|
||||
int allowedMethods;
|
||||
@@ -307,7 +306,7 @@ doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd)
|
||||
CHKiRet(TCPSessGSSRecv(pSess, buf, lenBuf, piLenRcvd));
|
||||
} else {
|
||||
*piLenRcvd = lenBuf;
|
||||
- CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd) != RS_RET_OK);
|
||||
+ CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd, oserr));
|
||||
}
|
||||
|
||||
finalize_it:
|
||||
@@ -380,11 +379,11 @@ static int TCPSessGSSInit(void)
|
||||
if (gss_server_creds != GSS_C_NO_CREDENTIAL)
|
||||
return 0;
|
||||
|
||||
- name_buf.value = (gss_listen_service_name == NULL) ? "host" : gss_listen_service_name;
|
||||
+ name_buf.value = (gss_listen_service_name == NULL) ? (char*)"host" : gss_listen_service_name;
|
||||
name_buf.length = strlen(name_buf.value) + 1;
|
||||
maj_stat = gss_import_name(&min_stat, &name_buf, GSS_C_NT_HOSTBASED_SERVICE, &server_name);
|
||||
if (maj_stat != GSS_S_COMPLETE) {
|
||||
- gssutil.display_status("importing name", maj_stat, min_stat);
|
||||
+ gssutil.display_status((char*)"importing name", maj_stat, min_stat);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -392,7 +391,7 @@ static int TCPSessGSSInit(void)
|
||||
GSS_C_NULL_OID_SET, GSS_C_ACCEPT,
|
||||
&gss_server_creds, NULL, NULL);
|
||||
if (maj_stat != GSS_S_COMPLETE) {
|
||||
- gssutil.display_status("acquiring credentials", maj_stat, min_stat);
|
||||
+ gssutil.display_status((char*)"acquiring credentials", maj_stat, min_stat);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -549,7 +548,7 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess)
|
||||
pGSess->allowedMethods = ALLOWEDMETHOD_TCP;
|
||||
ABORT_FINALIZE(RS_RET_OK); // TODO: define good error codes
|
||||
}
|
||||
- gssutil.display_status("accepting context", maj_stat, acc_sec_min_stat);
|
||||
+ gssutil.display_status((char*)"accepting context", maj_stat, acc_sec_min_stat);
|
||||
ABORT_FINALIZE(RS_RET_ERR); // TODO: define good error codes
|
||||
}
|
||||
if (send_tok.length != 0) {
|
||||
@@ -566,7 +565,7 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess)
|
||||
|
||||
maj_stat = gss_display_name(&min_stat, client, &recv_tok, NULL);
|
||||
if (maj_stat != GSS_S_COMPLETE) {
|
||||
- gssutil.display_status("displaying name", maj_stat, min_stat);
|
||||
+ gssutil.display_status((char*)"displaying name", maj_stat, min_stat);
|
||||
} else {
|
||||
dbgprintf("GSS-API Accepted connection from peer %s: %s\n", (char *)pszPeer, (char*) recv_tok.value);
|
||||
}
|
||||
@@ -608,7 +607,7 @@ int TCPSessGSSRecv(tcps_sess_t *pSess, void *buf, size_t buf_len, ssize_t *piLen
|
||||
maj_stat = gss_unwrap(&min_stat, *context, &xmit_buf, &msg_buf,
|
||||
&conf_state, (gss_qop_t *) NULL);
|
||||
if(maj_stat != GSS_S_COMPLETE) {
|
||||
- gssutil.display_status("unsealing message", maj_stat, min_stat);
|
||||
+ gssutil.display_status((char*)"unsealing message", maj_stat, min_stat);
|
||||
if(xmit_buf.value) {
|
||||
free(xmit_buf.value);
|
||||
xmit_buf.value = 0;
|
||||
@@ -644,7 +643,7 @@ void TCPSessGSSClose(tcps_sess_t* pSess)
|
||||
context = &pGSess->gss_context;
|
||||
maj_stat = gss_delete_sec_context(&min_stat, context, GSS_C_NO_BUFFER);
|
||||
if (maj_stat != GSS_S_COMPLETE)
|
||||
- gssutil.display_status("deleting context", maj_stat, min_stat);
|
||||
+ gssutil.display_status((char*)"deleting context", maj_stat, min_stat);
|
||||
*context = GSS_C_NO_CONTEXT;
|
||||
pGSess->gss_flags = 0;
|
||||
pGSess->allowedMethods = 0;
|
||||
@@ -665,7 +664,7 @@ TCPSessGSSDeinit(void)
|
||||
if (gss_server_creds != GSS_C_NO_CREDENTIAL) {
|
||||
maj_stat = gss_release_cred(&min_stat, &gss_server_creds);
|
||||
if (maj_stat != GSS_S_COMPLETE)
|
||||
- gssutil.display_status("releasing credentials", maj_stat, min_stat);
|
||||
+ gssutil.display_status((char*)"releasing credentials", maj_stat, min_stat);
|
||||
}
|
||||
RETiRet;
|
||||
}
|
||||
--
|
||||
2.13.6
|
||||
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
From 4736e53d471ac45024333588fcdf5bce5f8c61b8 Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Gerhards <rgerhards@adiscon.com>
|
||||
Date: Wed, 25 Oct 2017 11:09:40 +0200
|
||||
Subject: [PATCH] imjournal bugfix: module did not work at all
|
||||
|
||||
The open function was broken by commit 92ac801 (v8.30.0),
|
||||
resulting in no data being ever read from the journal.
|
||||
|
||||
patch bases on the idea of Radovan Sroka given here:
|
||||
https://github.com/rsyslog/rsyslog/issues/1895#issuecomment-339017357
|
||||
but follows the current imjournal-paradigm of having the journal
|
||||
handle inside a global variable.
|
||||
|
||||
see also https://github.com/rsyslog/rsyslog/issues/1895
|
||||
closes https://github.com/rsyslog/rsyslog/issues/1897
|
||||
---
|
||||
plugins/imjournal/imjournal.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c
|
||||
index 8f043d5e1..2f1569837 100644
|
||||
--- a/plugins/imjournal/imjournal.c
|
||||
+++ b/plugins/imjournal/imjournal.c
|
||||
@@ -118,20 +118,20 @@ static sd_journal *j;
|
||||
static rsRetVal persistJournalState(void);
|
||||
static rsRetVal loadJournalState(void);
|
||||
|
||||
-static rsRetVal openJournal(sd_journal* jj) {
|
||||
+static rsRetVal openJournal(void) {
|
||||
DEFiRet;
|
||||
|
||||
- if (sd_journal_open(&jj, SD_JOURNAL_LOCAL_ONLY) < 0)
|
||||
+ if (sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY) < 0)
|
||||
iRet = RS_RET_IO_ERROR;
|
||||
RETiRet;
|
||||
}
|
||||
|
||||
-static void closeJournal(sd_journal* jj) {
|
||||
+static void closeJournal(void) {
|
||||
|
||||
if (cs.stateFile) { /* can't persist without a state file */
|
||||
persistJournalState();
|
||||
}
|
||||
- sd_journal_close(jj);
|
||||
+ sd_journal_close(j);
|
||||
}
|
||||
|
||||
|
||||
@@ -513,10 +513,10 @@ pollJournal(void)
|
||||
/* do not persist stateFile sd_journal_get_cursor will fail! */
|
||||
char* tmp = cs.stateFile;
|
||||
cs.stateFile = NULL;
|
||||
- closeJournal(j);
|
||||
+ closeJournal();
|
||||
cs.stateFile = tmp;
|
||||
|
||||
- iRet = openJournal(j);
|
||||
+ iRet = openJournal();
|
||||
if (iRet != RS_RET_OK) {
|
||||
char errStr[256];
|
||||
rs_strerror_r(errno, errStr, sizeof(errStr));
|
||||
@@ -773,13 +773,13 @@ ENDfreeCnf
|
||||
/* open journal */
|
||||
BEGINwillRun
|
||||
CODESTARTwillRun
|
||||
- iRet = openJournal(j);
|
||||
+ iRet = openJournal();
|
||||
ENDwillRun
|
||||
|
||||
/* close journal */
|
||||
BEGINafterRun
|
||||
CODESTARTafterRun
|
||||
- closeJournal(j);
|
||||
+ closeJournal();
|
||||
ratelimitDestruct(ratelimiter);
|
||||
ENDafterRun
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
diff -up rsyslog-7.4.1/rsyslog.service.in.orig rsyslog-7.4.1/rsyslog.service.in
|
||||
--- rsyslog-7.4.1/rsyslog.service.in.orig 2013-06-17 15:28:54.430023493 +0200
|
||||
+++ rsyslog-7.4.1/rsyslog.service.in 2013-06-17 15:30:05.874378084 +0200
|
||||
@@ -6,7 +6,9 @@ Requires=syslog.socket
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
-ExecStart=@sbindir@/rsyslogd -n
|
||||
+EnvironmentFile=-/etc/sysconfig/rsyslog
|
||||
+ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS
|
||||
+UMask=0066
|
||||
StandardOutput=null
|
||||
Restart=on-failure
|
||||
|
||||
41
rsyslog.conf
41
rsyslog.conf
|
|
@ -4,15 +4,29 @@
|
|||
# or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html
|
||||
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
|
||||
|
||||
#### GLOBAL DIRECTIVES ####
|
||||
|
||||
# Where to place auxiliary files
|
||||
global(workDirectory="/var/lib/rsyslog")
|
||||
|
||||
#### MODULES ####
|
||||
|
||||
module(load="imuxsock" # provides support for local system logging (e.g. via logger command)
|
||||
# Use default timestamp format
|
||||
module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat")
|
||||
|
||||
module(load="imuxsock" # provides support for local system logging (e.g. via logger command)
|
||||
SysSock.Use="off") # Turn off message reception via local log socket;
|
||||
# local messages are retrieved through imjournal now.
|
||||
module(load="imjournal" # provides access to the systemd journal
|
||||
# local messages are retrieved through imjournal now.
|
||||
module(load="imjournal" # provides access to the systemd journal
|
||||
FileCreateMode="0600" # Quiet warning and ensure privacy
|
||||
UsePid="system" # PID nummber is retrieved as the ID of the process the journal entry originates from
|
||||
StateFile="imjournal.state") # File to store the position in the journal
|
||||
|
||||
# Include all config files in /etc/rsyslog.d/
|
||||
include(file="/etc/rsyslog.d/*.conf" mode="optional")
|
||||
|
||||
#module(load="imklog") # reads kernel messages (the same are read from journald)
|
||||
#module(load"immark") # provides --MARK-- message capability
|
||||
#module(load="immark") # provides --MARK-- message capability
|
||||
|
||||
# Provides UDP syslog reception
|
||||
# for parameters see http://www.rsyslog.com/doc/imudp.html
|
||||
|
|
@ -24,17 +38,6 @@ module(load="imjournal" # provides access to the systemd journal
|
|||
#module(load="imtcp") # needs to be done just once
|
||||
#input(type="imtcp" port="514")
|
||||
|
||||
#### GLOBAL DIRECTIVES ####
|
||||
|
||||
# Where to place auxiliary files
|
||||
global(workDirectory="/var/lib/rsyslog")
|
||||
|
||||
# Use default timestamp format
|
||||
module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat")
|
||||
|
||||
# Include all config files in /etc/rsyslog.d/
|
||||
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||
|
||||
#### RULES ####
|
||||
|
||||
# Log all kernel messages to the console.
|
||||
|
|
@ -67,13 +70,13 @@ local7.* /var/log/boot.log
|
|||
|
||||
# ### sample forwarding rule ###
|
||||
#action(type="omfwd"
|
||||
# An on-disk queue is created for this action. If the remote host is
|
||||
# down, messages are spooled to disk and sent when it is up again.
|
||||
# # An on-disk queue is created for this action. If the remote host is
|
||||
# # down, messages are spooled to disk and sent when it is up again.
|
||||
#queue.filename="fwdRule1" # unique name prefix for spool files
|
||||
#queue.maxdiskspace="1g" # 1gb space limit (use as much as possible)
|
||||
#queue.saveonshutdown="on" # save messages to disk on shutdown
|
||||
#queue.type="LinkedList" # run asynchronously
|
||||
#action.resumeRetryCount="-1" # infinite retries if host is down
|
||||
# Remote Logging (we use TCP for reliable delivery)
|
||||
# remote_host is: name/ip, e.g. 192.168.0.1, port optional e.g. 10514
|
||||
# # Remote Logging (we use TCP for reliable delivery)
|
||||
# # remote_host is: name/ip, e.g. 192.168.0.1, port optional e.g. 10514
|
||||
#Target="remote_host" Port="XXX" Protocol="tcp")
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@
|
|||
missingok
|
||||
sharedscripts
|
||||
postrotate
|
||||
/usr/bin/systemctl kill -s HUP rsyslog.service >/dev/null 2>&1 || true
|
||||
/usr/bin/systemctl reload rsyslog.service >/dev/null 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
|
|
|
|||
37
rsyslog.service
Normal file
37
rsyslog.service
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[Unit]
|
||||
Description=System Logging Service
|
||||
;Requires=syslog.socket
|
||||
Documentation=man:rsyslogd(8)
|
||||
Documentation=https://www.rsyslog.com/doc/
|
||||
Wants=network.target network-online.target
|
||||
After=network.target network-online.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
EnvironmentFile=-/etc/sysconfig/rsyslog
|
||||
ExecStart=/usr/sbin/rsyslogd -n $SYSLOGD_OPTIONS
|
||||
ExecReload=/usr/bin/kill -HUP $MAINPID
|
||||
UMask=0066
|
||||
StandardOutput=null
|
||||
Restart=on-failure
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||
RestrictNamespaces=net
|
||||
NoNewPrivileges=yes
|
||||
ProtectControlGroups=yes
|
||||
ProtectHome=read-only
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelTunables=yes
|
||||
RestrictSUIDSGID=yes
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=~@clock @debug @module @raw-io @reboot @swap @cpu-emulation @obsolete
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=yes
|
||||
|
||||
|
||||
# Increase the default a bit in order to allow many simultaneous
|
||||
# files to be monitored, we might need a lot of fds.
|
||||
LimitNOFILE=16384
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
;Alias=syslog.service
|
||||
1029
rsyslog.spec
1029
rsyslog.spec
File diff suppressed because it is too large
Load diff
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (rsyslog-8.30.0.tar.gz) = 90e172d08ba7548252fc9744f71259dadf5a40afef405516e7b1601620913ca4b2ffc4859b16f369b9c1974ea10f4e41bc2d987e3d6bf9aabeb979f7de6aefe0
|
||||
SHA512 (rsyslog-doc-8.30.0.tar.gz) = 8068bb9bb8408447bff49730e9aac105eab1bd610592dd524e7639b668b2d05a4836d3a9862622445a0bb8d8b140db67c861dad6ec207d11049ac368e363684d
|
||||
SHA512 (rsyslog-8.2510.0.tar.gz) = d2e693fd8c7112e4ccc36ea6fbb19909df885e7cb2778e95c04b7c5e9db8240224decfee52308a46865b7deffcf1e31ade0104c90d84b768a4dece15e5ea190e
|
||||
SHA512 (qpid-proton-0.40.0.tar.gz) = 3e7fe56ca1423f45f71d81f5e1d6ec5f21c073cc580628e12a8dbd545a86805b7312834e0d1234dde43797633d575ed639f21a96239b217500cc0a824482aae3
|
||||
|
|
|
|||
2
tests/got-audit/got-audit.gdb
Normal file
2
tests/got-audit/got-audit.gdb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
gef config gef.disable_color True
|
||||
got-audit --all
|
||||
10
tests/got-audit/main.fmf
Normal file
10
tests/got-audit/main.fmf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
summary: Audit the GOT for signs of tampering
|
||||
description: |
|
||||
Pointers in the server process GOT will be checked to ensure that
|
||||
each function pointer's value is within a shared object file
|
||||
that exports a symbol of that name, and that no shared object
|
||||
files export conflicting symbols.
|
||||
contact: Gordon Messmer <gordon.messmer@gmail.com>
|
||||
require+:
|
||||
- gdb-gef # needed to test got-audit
|
||||
|
||||
41
tests/got-audit/runtest.sh
Executable file
41
tests/got-audit/runtest.sh
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/rsyslog/Sanity/got-audit
|
||||
# Description: Check pointers in the server process GOT for signs of tampering
|
||||
# Author: Gordon Messmer <gordon.messmer@gmail.com>
|
||||
#
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlServiceStart rsyslog
|
||||
rlRun "TestDir=\$(pwd)"
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "auditfile=\$(mktemp --tmpdir=${TmpDir})"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Run GEF got-audit"
|
||||
rlRun "SERVICE_PID=\$( systemctl show --property=MainPID rsyslog.service | cut -f2 -d= )"
|
||||
rlRun "echo SERVICE_PID is '$SERVICE_PID'"
|
||||
[ -n "$SERVICE_PID" ] || rlFail "No service pid was found"
|
||||
rlRun "gdb-gef --pid '$SERVICE_PID' --command='$TestDir'/got-audit.gdb --batch > '$auditfile'"
|
||||
# Basic test: ensure that at least one symbol is found in libc.so,
|
||||
# to verify that the report looks plausible.
|
||||
rlAssertGrep " : /.*/libc.so" "$auditfile"
|
||||
# Ensure the got-audit did not report any errors
|
||||
rlAssertNotGrep " :: ERROR" "$auditfile"
|
||||
rlRun "cp '$auditfile' '$TMT_TEST_DATA'/got-audit.txt"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlServiceRestore rsyslog
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
2
tests/main.fmf
Normal file
2
tests/main.fmf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
Loading…
Add table
Add a link
Reference in a new issue