What are the security implications of setting SYSTEMD_PAGERSECURE?

According to man systemctl, "if $SYSTEMD_PAGERSECURE is not set, $SYSTEMD_PAGER and $PAGER can only be used to disable the pager, and are otherwise ignored." Therefore, $SYSTEMD_PAGERSECURE must be set in order to override the pager used by systemctl or journalctl. The manual provides this rather confusing explanation of the purpose of $SYSTEMD_PAGERSECURE:

When true, the "secure" mode of the pager is enabled; if false, disabled. If $SYSTEMD_PAGERSECURE is not set at all, secure mode is enabled if the effective UID is not the same as the owner of the login session, see geteuid(2) and sd_pid_get_owner_uid(3). In secure mode, LESSSECURE=1 will be set when invoking the pager, and the pager shall disable commands that open or create new files or start new subprocesses. When $SYSTEMD_PAGERSECURE is not set at all, pagers which are not known to implement secure mode will not be used. (Currently only less(1) implements secure mode.)

What are the implications of setting $SYSTEMD_PAGERSECURE in order to use a pager other than less, as suggested in Systemd journalctl - Unable to change default $PAGER?

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论