log: remove LOG_TARGET_SAFE pseudo log target

This removes LOG_TARGET_SAFE. It's made redundant by the new
"prohibit-ipc" logging flag, as it used to have a similar effect: avoid
logging to the journal/syslog, i.e. any local services in order to avoid
deadlocks when we lock from PID 1 or its utility processes (such as
generators).

All previous users of LOG_TARGET_SAFE are switched over to the new
setting. This makes things a bit safer for all, as not even the
SYSTEMD_LOG_TARGET env var can be used to accidentally log to the
journal anymore in these programs.
This commit is contained in:
Lennart Poettering
2018-01-24 18:22:56 +01:00
parent 7a3be263d2
commit 6c347d5024
13 changed files with 24 additions and 17 deletions
+2 -1
View File
@@ -165,7 +165,8 @@ int main(int argc, char *argv[]) {
if (argc > 1)
arg_dest = argv[2];
log_set_target(LOG_TARGET_SAFE);
log_set_prohibit_ipc(true);
log_set_target(LOG_TARGET_AUTO);
log_parse_environment();
log_open();