Bugzilla – Bug 385
PAGER & LESS variables won't be forwarded
Last modified: 2010-05-07 13:30:33 MDT
when user enters #sudo su, the variables LESS and PAGER from the current environment won't be forwarded. This behavior differs from the previous versions (any reasons?). The absence of PAGER and LESS affects man pages formatting, ( ESC[1m ) Temporary workaround: adding Defaults env_reset,env_keep+="PAGER, LESS" will fix the problem
Starting with version 1.6.9, sudo starts commands with a fresh environment that only contains a few variables. I don't think it is appropriate to include PAGER or LESS in this list as those variables can be used to cause programs like man to run arbitrary commands. You can get the pre-1.6.9 behavior by negating the "env_reset" Defaults setting in sudoers or by adding the variables you wish to preserver to the env_keep list.