There's no need to call pledge(2) so many times, or on many places, with the
authormestre <mestre@openbsd.org>
Thu, 11 Nov 2021 08:42:31 +0000 (08:42 +0000)
committermestre <mestre@openbsd.org>
Thu, 11 Nov 2021 08:42:31 +0000 (08:42 +0000)
commit7c00040f35b70a977ec796a4df536495f1c94e9d
tree0569684b454ad137cf496eb6d80fb49db0ff6edf
parent919cc5e9fbeff15448957a9addab6bf168ad2719
There's no need to call pledge(2) so many times, or on many places, with the
same promises, just call it once before the switch case while at the same time
hoisting one unveil(2) so they are all grouped.

The call to pledge(2) on file() can also be simplified since "stdio rpath getpw"
will already be activated when we reach it.

OK deraadt@
usr.bin/who/who.c