Bug 385 - PAGER & LESS variables won't be forwarded
PAGER & LESS variables won't be forwarded
Status: RESOLVED INVALID
Product: Sudo
Classification: Unclassified
Component: Sudo
1.7.2
PC Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-21 13:54 MST by C3PO
Modified: 2010-05-07 13:30 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description C3PO 2009-12-21 13:54:59 MST
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
Comment 1 Todd C. Miller 2010-05-07 13:30:33 MDT
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.