1 |
On 10/01/2009 11:34 AM, Arthur D. wrote: |
2 |
> Thanks for your replies, guys. |
3 |
> |
4 |
>> 2. Change the default editor on your system by putting something in |
5 |
>> /etc/env.d: |
6 |
>> |
7 |
>> apollo ~ # cat /etc/env.d/99editor |
8 |
>> EDITOR="vim" |
9 |
>> |
10 |
>> --Mike |
11 |
> =================================================== |
12 |
> spinal@supervisor ~ $ cat /etc/env.d/99editor |
13 |
> # Configuration file for eselect |
14 |
> # This file has been automatically generated. |
15 |
> EDITOR="/usr/bin/vim" |
16 |
> spinal@supervisor ~ $ sudo visudo |
17 |
> visudo: no editor found (editor path = /bin/nano) |
18 |
> =================================================== |
19 |
> |
20 |
> The first option works fine, but ... how much time should the user |
21 |
> spend to get things just work as expected? |
22 |
> Yes, there are such geeks like me and you, who will spend his time |
23 |
> doing what should already be done by maintainers. |
24 |
> |
25 |
> Look in the man page, it's far from obvious why isn't EDITOR variable |
26 |
> respected. |
27 |
|
28 |
From the sudoers man page: |
29 |
|
30 |
env_reset If set, sudo will reset the environment to only contain |
31 |
the LOGNAME, SHELL, USER, USERNAME and the SUDO_* variables. Any |
32 |
variables in the caller's environment that match the env_keep and |
33 |
env_check lists are then added. The default contents of the env_keep |
34 |
and env_check lists are displayed when sudo is run by root with the -V |
35 |
option. If the secure_path option is set, its value will be used for |
36 |
the PATH environment variable. This flag is on by default. |
37 |
|
38 |
Looks pretty clear to me. The default to to ditch EDITOR along with |
39 |
other potentially dangerous environment variables. |
40 |
|
41 |
Doug |