diff options
| author | Stéphane Rochoy <stephane.rochoy@stormshield.eu> | 2024-12-11 13:39:36 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2025-02-07 14:46:53 +0000 |
| commit | dff74bbdd060e31fe790767ddd45e4e789495144 (patch) | |
| tree | d8d4eda917c42702409d204531e790cf0291bc8f | |
| parent | bd8c494343ae403cc1b4c4822b7e6f204cf61165 (diff) | |
savecore: add missing call to cap_openlog when in capabilities mode
Signed-off-by: Stéphane Rochoy <stephane.rochoy@stormshield.eu>
Reviewed by: markj, oshogbo
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1546
(cherry picked from commit c901e89d8e467b56f844ab5dba18dc20d503c2be)
| -rw-r--r-- | sbin/savecore/savecore.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index a571144589bb..2dcf279cb1c8 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -102,6 +102,9 @@ #define STATUS_GOOD 1 #define STATUS_UNKNOWN 2 +#define LOG_OPTIONS LOG_PERROR +#define LOG_FACILITY LOG_DAEMON + static cap_channel_t *capsyslog; static fileargs_t *capfa; static bool checkfor, compress, uncompress, clear, force, keep; /* flags */ @@ -1408,6 +1411,7 @@ init_caps(int argc, char **argv) exit(1); } cap_close(capcas); + cap_openlog(capsyslog, "savecore", LOG_OPTIONS, LOG_FACILITY); } static void @@ -1435,7 +1439,7 @@ main(int argc, char **argv) savedir = "."; comp_desired = KERNELDUMP_COMP_NONE; - openlog("savecore", LOG_PERROR, LOG_DAEMON); + openlog("savecore", LOG_OPTIONS, LOG_FACILITY); signal(SIGINFO, infohandler); argc = xo_parse_args(argc, argv); |
