On 2016-12-15, Ax0n <a...@h-i-r.net> wrote: > I don't know how doas is keeping track of a session.
It's using a kernel "verified auth" feature. See tty(4) : TIOCCHKVERAUTH void Check the verified auth status of this session. The calling process must have the same real user ID and parent process as the process which called TIOCSETVERAUTH. A zero return indicates success.