Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 347443 - app-admin/sudo: request to env_keep LESS by default
Summary: app-admin/sudo: request to env_keep LESS by default
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo's Team for Core System packages
URL: http://forums.gentoo.org/viewtopic-p-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 16:44 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2010-12-01 16:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-01 16:44:56 UTC
(opened by request of Diego, per discussion)

Gentoo ship's /etc/env.d/70less which has the -R option for less. sudo, by default, doesn't export LESS. This causes conflict with the etc updating tools (etc-update, dispatch-conf) because they have "pager=less" by default. less(1) reads $LESS so if you use something like colordiff in diff_command, all you see are escape codes.

I consider this a regression in functionality and user-friendlyness and request that LESS is exported by default in sudo.

A potention downside would be if LESS could be set to some exploit, but I think that less(1) would ignore that and treat the "exploit" as options to less itself.

jolexa @ notos :: ~ %% export LESS=file # 'file' exists
jolexa @ notos :: ~ %% less interview.txt  # random text file
Line number is required after -l # error output
jolexa @ notos :: ~ %%
Comment 1 SpanKY gentoo-dev 2010-12-01 16:50:21 UTC
looks like a bad idea to me

sudo env LESS=-o/foo less -f /dev/null
ls -l /foo