move SS_DNS socket check from kern_plegde.c to sys_generic.c
authorsemarie <semarie@openbsd.org>
Sun, 18 Oct 2015 05:26:55 +0000 (05:26 +0000)
committersemarie <semarie@openbsd.org>
Sun, 18 Oct 2015 05:26:55 +0000 (05:26 +0000)
commit66b07ceddaa45f42a07fb355c68ff4387431f514
tree1b0845dbc30d128d2212fbbea0704f74d82f2c29
parent54bca4b0378b00c6067607463343851f6c2a16a4
move SS_DNS socket check from kern_plegde.c to sys_generic.c

this check has nothing to do with pledge(2). make it lives in sys_ioctl() call.

while here, move the (fp == NULL) check early and remove duplicate check from
pledge_ioctl_check().

ok guenther@ deraadt@
sys/kern/kern_pledge.c
sys/kern/sys_generic.c