Hoist privilege checks further
authorkn <kn@openbsd.org>
Mon, 24 Apr 2023 12:11:56 +0000 (12:11 +0000)
committerkn <kn@openbsd.org>
Mon, 24 Apr 2023 12:11:56 +0000 (12:11 +0000)
commit36d351c1f346e65c5f84504299ade209abdeb1cf
tree48b4bb727503688171e973ae14a7120a511c9838
parentb2eb583e72aa4aed2090a9fd481a7872d9d5203e
Hoist privilege checks further

in6.c already has the privilege check as early as possible, make in.c match.

For unprivileged IPv4 ioctl calls with invalid args, this changes errno from
E* to EPERM.

OK bluhm
sys/netinet/in.c