From: "Theo de Raadt" Subject: Re: su, doas inconsistent handling of duplicate environment variables To: "Todd C. Miller" Cc: Theo de Raadt , jmates@thrig.me, tech@openbsd.org Date: Wed, 07 Feb 2024 11:12:03 -0700 Todd C. Miller wrote: > On Tue, 06 Feb 2024 19:24:32 -0700, Theo de Raadt wrote: > > > I'm not sure a consistancy for this is achievable in practice. There > > will always be outliers, right? > > Since our getenv(3) also returns the first match I would not be > inclined to change doas here. Good point. If anything should change, it is the last-matchers. From what I saw in ksh, it isn't that hard to fix it. Not sure about others. But I don't think we'll ever get universal acceptance of one rule, unless a truly nasty bit if behaviour turns up due to the confusion.