04:01
@EliahKagan sorry, yesterday I meant to make a small comment on this, but I got distracted by making cookies and pie
@Zanna I plan to mention something about it and link to the mailing list discussion and bug report that led to that change which has now been undone for 19.10 and on. Beyond that, not really. Not beyond "Sometimes...it is appealing to have that program use your settings." That's pretty much the entirety of the reason Ubuntu patched
sudo
to keep the very old sudo
behavior of preserving $HOME
, as far as I can tell. For years, Ubuntu has [shipped a patched version of `sudo` that preserves `$HOME` by default][1]. Besides Ubuntu and its derivatives, [very few other operating systems (perhaps no others) do this][2]. It has been [**decided that this causes more problems than it solves**][3], and [starting in Ubuntu 19.10][4], `$HOME` is no longer one of the few environment variables `sudo` preserves.
In terms of *what* the change is and how it affects users, the key points are:
- **As of Ubuntu 19.10, <code>sudo *command*</code> does what <code>sudo -H *command*</code> does in previous releases.** It can…
I mean, I do use some other Unix-like operating systems that have
sudo
. I did not know until recently that sudo
has been resetting $HOME
on all those systems for years.
Anyway, that discussion led to--or in any case preceded and was referenced in--the April 2011 bug report HOME environmental variable no long preserved with sudo by default.
The new bug report, Ubuntu patch to add HOME to env_keep makes custom commands vulnerable by default, focuses (and originally was just about) on why the behavior of not resetting
HOME
is a security bug.
The specific changes it recommends are not exactly the same as those that were adopted. It recommends:
> The patch should be removed and the default /etc/sudoers should explicitly add HOME to "env_keep" for the "allow admins to run any command as root" entries, to get the desired behaviour without creating security issues for other sudoers commands.
> the default /etc/sudoers should explicitly add HOME to "env_keep" for the "allow admins to run any command as root" entries
That is, if the specific (combination of) changes recommended in the bug report were made, it would be much harder to notice the difference, because the behavior in the common case of a member of the
sudo
group running commands (as root or another user) with sudo
would still preserve HOME
.
I think it is good that the change with the bigger effect--making it so that doesn't happen either--was made. Also, that change involved fewer modifications than the bug report's recommendation would involve. Also, the bug report's recommendation wouldn't take effect for everyone upon upgrade; a user who had modified
/etc/sudoers
and then upgraded would, depending on how they upgraded, either be asked what version of the file they wanted to keep or would simply be left with their version.
It can be called anything in place of
tell-it-like-it-is
, so long as the name does not contain ~
or .
. Also, I don't recommend calling it README
. There is already such a file, and I'm pretty sure you can actually put configuration in there and it is used, but I don't recommend it (except to try it out).
12 hours later…
18:02
« first day (790 days earlier) ← previous day next day → last day (1777 days later) »