mirror of
https://github.com/systemd/systemd.git
synced 2025-03-14 04:58:28 +03:00
pager: lets check SYSTEMD_PAGERSECURE with secure_getenv()
I can't think of any real vulnerability about this, but it still feels better to check a variable with "secure" in its name with secure_getenv() rather than plain getenv(). Paranoia FTW!
This commit is contained in:
parent
dc6a31628e
commit
b8f736b30e
@ -171,7 +171,7 @@ int pager_open(PagerFlags flags) {
|
||||
* pager. If they didn't, use secure mode when under euid is changed. If $SYSTEMD_PAGERSECURE
|
||||
* wasn't explicitly set, and we autodetect the need for secure mode, only use the pager we
|
||||
* know to be good. */
|
||||
int use_secure_mode = getenv_bool("SYSTEMD_PAGERSECURE");
|
||||
int use_secure_mode = getenv_bool_secure("SYSTEMD_PAGERSECURE");
|
||||
bool trust_pager = use_secure_mode >= 0;
|
||||
if (use_secure_mode == -ENXIO) {
|
||||
uid_t uid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user