Re: new env defaults for doas

2019-06-17 Thread Todd C . Miller
On Mon, 17 Jun 2019 13:17:15 -0400, "Ted Unangst" wrote: > Not sure what you mean. This diff does put it before the options. > > same place as su, although su has other problems. fortunately, we don't have > the same combination of possibilities as su. Sorry, I misread the diff. The placement in

Re: new env defaults for doas

2019-06-17 Thread Ted Unangst
Todd C. Miller wrote: > On Mon, 17 Jun 2019 12:58:00 -0400, "Ted Unangst" wrote: > > > Committed this. I'm not entirely happy with the wording. I think hiding them > > under an option in the config man page is the wrong place. The default > > behavior should be documented in a more default place.

Re: new env defaults for doas

2019-06-17 Thread Todd C . Miller
On Mon, 17 Jun 2019 12:58:00 -0400, "Ted Unangst" wrote: > Committed this. I'm not entirely happy with the wording. I think hiding them > under an option in the config man page is the wrong place. The default > behavior should be documented in a more default place. I would just place that bit eit

Re: new env defaults for doas

2019-06-17 Thread Ted Unangst
Ted Unangst wrote: > Yes, I think it's better to always reset these things. Here's a diff. > > 1. Always set HOME, PATH, SHELL etc to the target. Committed this. I'm not entirely happy with the wording. I think hiding them under an option in the config man page is the wrong place. The default beh

Re: new env defaults for doas

2019-06-17 Thread Todd C . Miller
On Sun, 16 Jun 2019 14:23:24 -0400, "Ted Unangst" wrote: > Yes, I think it's better to always reset these things. Here's a diff. > > 1. Always set HOME, PATH, SHELL etc to the target. > > 2. Without keepenv, other environment variables are discarded. > > 3. With keepenv, other variables are retain

Re: new env defaults for doas

2019-06-16 Thread Ted Unangst
Martijn van Duren wrote: > > 2. When doing keepenv, nothing changes, except addition of above. > > It feels inconsistent to make keepenv behave different here. > - It may allow certain applications to behave unexpected compared to > without keepenv (e.g. scripts that use $HOME/.cache). > - The v

Re: new env defaults for doas

2019-06-15 Thread Ted Unangst
Martijn van Duren wrote: > I'm not convinced that LOGIN_SETPATH is a good idea here. From what I > gathered that sets PATH from login.conf(5), while most environments I > know will use .profile to set it and could cause unexpected behaviour > if the my and targ PATH are reset to unexpected values.

Re: new env defaults for doas

2019-06-15 Thread Theo de Raadt
Martijn van Duren wrote: > Sorry for the delay. > > I like the general direction, but I'm not 100% convinced the semantics > are fine-tuned enough. > > On 6/13/19 4:16 AM, Ted Unangst wrote: > > This has come up a few times before. For background, the default rule for > > doas > > is to copy a

Re: new env defaults for doas

2019-06-15 Thread Martijn van Duren
Sorry for the delay. I like the general direction, but I'm not 100% convinced the semantics are fine-tuned enough. On 6/13/19 4:16 AM, Ted Unangst wrote: > This has come up a few times before. For background, the default rule for doas > is to copy a few environment settings from the user and omit

new env defaults for doas

2019-06-12 Thread Ted Unangst
This has come up a few times before. For background, the default rule for doas is to copy a few environment settings from the user and omit the rest. This is to prevent confusion, and also supposedly for security. However, some of the alleged safe variables like PATH probably aren't that safe. And