mirror of
https://github.com/opnsense/src.git
synced 2026-02-19 02:30:08 -05:00
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)
This commit is contained in:
parent
bd8c494343
commit
dff74bbdd0
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue