chiark / gitweb /
basic/log: use getenv instead of secure_getenv
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 5 Jul 2017 03:54:00 +0000 (23:54 -0400)
committerSven Eden <yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:46:53 +0000 (09:46 +0200)
commit0f8be3e08711c1f70e8d86ba1397a0f2eb578ae8
tree4ed91938248f97e98b8e2b9ef3469e190eb44b36
parent9c9c41e866f0e209cb0cf0f88d6a43de8036bc0d
basic/log: use getenv instead of secure_getenv

secure_getenv does not work when the process has a nonempty permitted
capability set, which means that it's unduly hard to configure logging in
elogind-logind, elogind-resolved, and others.

secure_getenv is useful for code in libraries which might get called from a
setuid application. log_parse_environment() is never called from our library
code, but directly form various top-level executables. None of them are
installed suid, and none are prepared to be used this way, since many
additional changes would be required to make that safe. We may just as well
drop the check and allow SYSTEMD_LOG_* to properly parsed.

Fixes #4900.
src/basic/log.c