nmcli: set LESSSECURE=1 (unless already set)

Lubomir Rintel requested to merge lr/make-less-less-insecure into main

Apparently, the pager being able to execute commands takes some people by surprpise, making their poor configuration choices have consequences.

Let's pray for some mercy on their souls with the LESSECURE variable, which makes less less likely to conduct evil deeds.

Systemd also deals with this, but being systemd they make it as complicated as possible. We just set it unconditionally, hoping nobody wanted the extra functionality and they're in only for the scrolling. If anyone minds they can just set LESSSECURE=0 and we'll leave it alone.

See also: SYSTEMD_PAGERSECURE in systemctl(1) manual.

Merge request reports