diff options
author | Marius Tomaschewski <mt@suse.com> | 2012-03-02 12:04:25 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-02 12:04:25 +0100 |
commit | 536c9370f0773d25ee7a85aa44a10d07bc5e1420 (patch) | |
tree | f11c38417c0ae537881d793a1bd4d01a7d0199e9 /plugins/imuxsock | |
parent | 2aecaa85363f92f42ad7f7a4cc4c9e8d729c3452 (diff) | |
download | rsyslog-536c9370f0773d25ee7a85aa44a10d07bc5e1420.tar.gz rsyslog-536c9370f0773d25ee7a85aa44a10d07bc5e1420.tar.xz rsyslog-536c9370f0773d25ee7a85aa44a10d07bc5e1420.zip |
Fix for "/run/systemd/journal/syslog" detection
Changed to check "/run/systemd/journal" directory and not the
socket, as the socket may not exists [e.g. is not activated].
Diffstat (limited to 'plugins/imuxsock')
-rw-r--r-- | plugins/imuxsock/imuxsock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index 767f9a90..4523798f 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -67,8 +67,11 @@ 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 "/run/systemd/journal/syslog" +#define SYSTEMD_PATH_LOG SYSTEMD_JOURNAL "/syslog" #endif /* emulate struct ucred for platforms that do not have it */ @@ -780,7 +783,7 @@ CODESTARTwillRun listeners[0].sockName = pLogSockName; else if(sd_booted()) { struct stat st; - if(stat(SYSTEMD_PATH_LOG, &st) != -1 && S_ISSOCK(st.st_mode)) { + if(stat(SYSTEMD_JOURNAL, &st) != -1 && S_ISDIR(st.st_mode)) { listeners[0].sockName = SYSTEMD_PATH_LOG; } } |