1 |
2009/10/2 Arthur D. <spinal.by@××××.ru>: |
2 |
>>> You appear to be demonstrating that you don't fully understand the |
3 |
>>> problem: |
4 |
>>> |
5 |
>>> 828 ~ $ grep nano /usr/portage/app-admin/sudo/sudo-1.7.2_p1.ebuild |
6 |
>>> # XXX: /bin/vi may not be available, make nano visudo's default. |
7 |
>>> --with-editor=/bin/nano \ |
8 |
>> |
9 |
>> How so? That config option for sudo sets the DEFAULT editor, what to use |
10 |
>> if nothing is defined in the config file or environment variable. That's |
11 |
>> what both my text and the portion of the ebuild that you have quoted |
12 |
>> state. It in no way forces the use of nano in order to use visudo. If |
13 |
>> that were the case, DEPENDS would specify nano instead of accepting |
14 |
>> virtual/editor. |
15 |
> |
16 |
> Agree. There's no need in making vim as depends. But in other hand in |
17 |
> vanilla sudo |
18 |
> package there's VI hardcoded by default. And MOST if not ALL users who have |
19 |
> VIM |
20 |
> installed on their shiny Gentoo systems expect that VIsudo will behave as it |
21 |
> did |
22 |
> for long tim ago. There are historical (or some other) reasons for making VI |
23 |
> default |
24 |
> editor for this utility. It's like they don't respect not only endusers |
25 |
> favours but |
26 |
> the developers' too, no? |
27 |
> |
28 |
> WHY NOT CHECK if vim binary is in place and ONLY THEN (when it's obviously |
29 |
> absent) |
30 |
> hardcode the Gentoo Best Award of Choice Editor? |
31 |
> |
32 |
> I repeat once more. |
33 |
> Every user who has VIM installed on theirs systems is forced to do extra |
34 |
> configuration, to make sudo work as expected, just because someone prefer |
35 |
> other editor and thinks that vanilla choice is bad. Isn't that just stupid? |
36 |
> |
37 |
> -- |
38 |
> Best regards, Spinal |
39 |
|
40 |
And everyone who has emacs has to do extra work too, in order to get |
41 |
sudo to respect their chosen editor. Changing the default fallback for |
42 |
visudo when the environment variable isn't defined will add in further |
43 |
dependencies and/or put a dependency on a package that can't be |
44 |
reasonably assumed to be on the system in the near future. You're not |
45 |
being forced to do more work because you use vim, you're doing more |
46 |
work because you remove the sane default editor from the system. As |
47 |
does everyone removing nano and using pico.... and... how many others? |
48 |
Go to LFS, build it all, build emacs, set EDITOR to emacs, and run |
49 |
sudo visudo. Please. I have a rather good guess that you'll be, |
50 |
amazingly, using the default that was set at build time for the sane |
51 |
default editor, in LFS's case vim (whether called by that or the vi |
52 |
symlink to it), that the distro creators chose. Or if you vary from |
53 |
the instructions, choosing some other editor at sudo's build time, |
54 |
you'll be running that. The ebuild does the logical thing in choosing |
55 |
an editor that a) is in place by default and b) is less likely to be |
56 |
on the system or off the system by the admin's whim. Most leave the |
57 |
default in place. I suppose, really, the only more guaranteed editor |
58 |
would be "busybox vi" ... because VERY few go about breaking the |
59 |
default tools built into busybox... but what would that leave the many |
60 |
who use nano by default, as... it IS the distro default, to do? |
61 |
Compared to nano, vi (let alone a bare minimal vi like is in busybox) |
62 |
is a pain to use for a person who's never seen it before. |
63 |
|
64 |
Also, randomly, I could be wrong here, not being a sudo user myself |
65 |
outside of my ubuntu laptop... but if you look into sudo ... it drops |
66 |
the environment, aside from those chosen specifically to be preserved |
67 |
by root, through its configuration, as a security measure. It's not an |
68 |
ebuild problem, it's not a 'defaults' problem. From what you seem to |
69 |
see as 'proper' behavior for sudo, it's an upstream security decision |
70 |
problem. |
71 |
|
72 |
-- |
73 |
Poison [BLX] |
74 |
Joshua M. Murphy |
75 |
Yet another vim user. |