On Tue, 21 Sep 2010, Bdale Garbee wrote: > On Sat, 11 Sep 2010 20:18:31 -0700, Don Armstrong <[email protected]> wrote: > > sudo as of 1.7.4p4-1 now resets HOME when env_reset is set (the > > default). [This means that HOME is set to the value of the target > > user, instead of the value of the calling user.] > > > > This means that anything which called sudo and expected HOME to stay > > unless -H was passed now will be broken until HOME is added to > > env_keep. > > > > I suggest that HOME be added to env_keep by default; the attached > > trivial patch does one implementation of this. > > This approach breaks the definition of -i as pointed out in one of the > followups to #596847 .. so I'm not sure it's really the right thing to do.
Hrm; right. It would be pretty easy to change this so that home was keep by default, but was reset when called with -i. I think the right behavior should really be something like this: 1) -i or -H or always_set_home -> HOME is the home of the target user, no matter what env_keep says 2) HOME in env_keep (default) -> HOME is the home of the calling user 3) HOME not in env_keep (env_keep -= "HOME") -> HOME is the home of the target user I can write a patch for this behavior if that makes sense to you. Don Armstrong -- Our days are precious, but we gladly see them going If in their place we find a thing more precious growing A rare, exotic plant, our gardener's heart delighting A child whom we are teaching, a booklet we are writing -- Frederick Rükert _Wisdom of the Brahmans_ [Hermann Hesse _Glass Bead Game_] http://www.donarmstrong.com http://rzlab.ucr.edu -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

