diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-05 17:27:02 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-05 17:27:02 +0100 |
commit | e5f728face744ee6cfe2924da251a428a16c63d8 (patch) | |
tree | 5fba65f16677d5ac8d9d2691c477b0398a56c6b2 /plugins | |
parent | 5c09faee34befd6c2fa117055928c810ccf86f91 (diff) | |
parent | 2b03e46acfc52b2933f45ba6ba38a36522163fdf (diff) | |
download | rsyslog-e5f728face744ee6cfe2924da251a428a16c63d8.tar.gz rsyslog-e5f728face744ee6cfe2924da251a428a16c63d8.tar.xz rsyslog-e5f728face744ee6cfe2924da251a428a16c63d8.zip |
Merge branch 'v5-stable' into v5-stable-newstats
Conflicts:
configure.ac
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/imklog/imklog.c | 4 | ||||
-rw-r--r-- | plugins/imuxsock/imuxsock.c | 12 | ||||
-rw-r--r-- | plugins/ommysql/ommysql.c | 30 |
3 files changed, 28 insertions, 18 deletions
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c index 4112687a..16adbc21 100644 --- a/plugins/imklog/imklog.c +++ b/plugins/imklog/imklog.c @@ -109,8 +109,8 @@ enqMsg(uchar *msg, uchar* pszTag, int iFacility, int iSeverity) MsgSetRcvFromIP(pMsg, pLocalHostIP); MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName())); MsgSetTAG(pMsg, pszTag, ustrlen(pszTag)); - pMsg->iFacility = LOG_FAC(iFacility); - pMsg->iSeverity = LOG_PRI(iSeverity); + pMsg->iFacility = iFacility; + pMsg->iSeverity = iSeverity; CHKiRet(submitMsg(pMsg)); finalize_it: diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index feddb20c..4523798f 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -67,6 +67,12 @@ MODULE_TYPE_NOKEEP #define _PATH_LOG "/dev/log" #endif #endif +#ifndef SYSTEMD_JOURNAL +#define SYSTEMD_JOURNAL "/run/systemd/journal" +#endif +#ifndef SYSTEMD_PATH_LOG +#define SYSTEMD_PATH_LOG SYSTEMD_JOURNAL "/syslog" +#endif /* emulate struct ucred for platforms that do not have it */ #ifndef HAVE_SCM_CREDENTIALS @@ -775,6 +781,12 @@ CODESTARTwillRun # endif if(pLogSockName != NULL) listeners[0].sockName = pLogSockName; + else if(sd_booted()) { + struct stat st; + if(stat(SYSTEMD_JOURNAL, &st) != -1 && S_ISDIR(st.st_mode)) { + listeners[0].sockName = SYSTEMD_PATH_LOG; + } + } if(ratelimitIntervalSysSock > 0) { if((listeners[0].ht = create_hashtable(100, hash_from_key_fn, key_equals_fn, NULL)) == NULL) { /* in this case, we simply turn of rate-limiting */ diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c index f8bb4aa6..58e347bf 100644 --- a/plugins/ommysql/ommysql.c +++ b/plugins/ommysql/ommysql.c @@ -6,24 +6,22 @@ * * File begun on 2007-07-20 by RGerhards (extracted from syslogd.c) * - * Copyright 2007 Rainer Gerhards and Adiscon GmbH. + * Copyright 2007-2012 Adiscon GmbH. * * This file is part of rsyslog. - * - * Rsyslog is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rsyslog is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Rsyslog. If not, see <http://www.gnu.org/licenses/>. - * - * A copy of the GPL can be found in the file "COPYING" in this distribution. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * -or- + * see COPYING.ASL20 in the source distribution + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "config.h" #include "rsyslog.h" |