# RAW4ALL diff for Mac OS X 10.0.x / Darwin 1.3.x # by peter bartoli, version 1.0 of 8/8/2001 # # to install # 1. unpack and cd to your xnu source tree # 2. patch -p0 -b [--verbose --suffix=.orig] < RAW4ALL.patch # 3. build xnu and install your kernel # --- bsd/kern/uipc_socket.c.orig Fri Jan 26 14:40:08 2001 +++ bsd/kern/uipc_socket.c Mon Jul 30 16:38:28 2001 @@ -375,11 +375,15 @@ TAILQ_INIT(&so->so_incomp); TAILQ_INIT(&so->so_comp); so->so_type = type; if (p != 0) { +#ifdef RAW4ALL + if (p->p_ucred->cr_uid == 0 || prp->pr_type == SOCK_RAW) +#else if (p->p_ucred->cr_uid == 0) +#endif RAW4ALL so->so_state = SS_PRIV; so->so_uid = p->p_ucred->cr_uid; }