Index: ipsec_osdep.h =================================================================== RCS file: /usr/repo/src/sys/netipsec/ipsec_osdep.h,v retrieving revision 1.2 diff -u -p -r1.2 ipsec_osdep.h --- ipsec_osdep.h 7 Jan 2005 01:45:46 -0000 1.2 +++ ipsec_osdep.h 27 Jun 2006 09:59:49 -0000 @@ -211,14 +211,15 @@ if_handoff(struct ifqueue *ifq, struct m /* * 8. Test for "privileged" socket opened by superuser. - * FreeBSD tests ((so)->so_cred && (so)->so_cred.cr_uid == 0), + * FreeBSD tests ((so)->so_cred != NULL && suser_cred((so)->so_cred, SUSER_ALLOWJAIL == 0)) * NetBSD (1.6N) tests (so)->so_uid == 0). * This difference is wrapped inside the IPSEC_PRIVILEGED_SO() macro. * */ #ifdef __FreeBSD__ #define IPSEC_IS_PRIVILEGED_SO(_so) \ - ((_so)->so_cred && (_so)->so_cred->cr_uid == 0) + ((_so)->so_cred != NULL && \ + suser_cred((_so)->so_cred, SUSER_ALLOWJAIL) == 0) #endif /* __FreeBSD__ */ #ifdef __NetBSD__