From: Mikhail Subject: Re: gotd regress and doas(1) To: gameoftrees@openbsd.org Date: Thu, 8 Dec 2022 16:27:22 +0300 On Wed, Dec 07, 2022 at 10:26:36AM +0100, Stefan Sperling wrote: > As found by Mikhail, gotd regress test script run as root when the > test suite is invoked via doas(1). This happens because doas sets > the $LOGNAME environment veriable to the target user (root). Unlike > su(1) which leaves $LOGNAME set to the name of the original user. > > This patch adds a sanity check to prevent running test scripts as root, > and switches to $USERNAME which works with both doas(1) and su(1). Sorry for the late reply. I don't have $USERNAME env variable set (I'm using default current+xterm+tmux+ksh) and environ(7) talks only about $USER and $LOGNAME. Because of this tests are failing for me with: idea:~/work/got$ doas make server-regress make -C regress/gotd usage: userinfo [-e] user ==== test_repo_read ==== usage: userinfo [-e] user [...] Which software sets $USERNAME? I can see the var on FreeBSD+zsh though.