Skip to content

Commit

Permalink
log: journal: fix forgotten syslog reload when flipped from journal
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
  • Loading branch information
jnpkrn authored and chrissie-c committed May 4, 2020
1 parent 2baa279 commit 803d924
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/ipc_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ qb_ipc_dgram_sock_setup(const char *base_name,
sizeof(local_address));

if (use_filesystem_sockets()) {
chmod(local_address.sun_path, 0660);
chown(local_address.sun_path, -1, gid);
(void)chmod(local_address.sun_path, 0660);
(void)chown(local_address.sun_path, -1, gid);
}
if (res < 0) {
goto error_connect;
Expand Down
1 change: 1 addition & 0 deletions lib/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@ qb_log_ctl2(int32_t t, enum qb_log_conf c, qb_log_ctl2_arg_t arg_not4directuse)
#ifdef USE_JOURNAL
if (t == QB_LOG_SYSLOG) {
conf[t].use_journal = arg_i32;
need_reload = QB_TRUE;
} else {
rc = -EINVAL;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/log_syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ _syslog_reload(int32_t target)
{
struct qb_log_target *t = qb_log_target_get(target);

closelog();
if (!t->use_journal) {
closelog();
openlog(t->name, LOG_PID, t->facility);
}
}
Expand Down

0 comments on commit 803d924

Please sign in to comment.