Date: Sun, 30 Aug 1998 11:04:53 -0400 (EDT) From: Robert Watson <robert@cyrus.watson.org> To: Alex Belits <abelits@phobos.illtel.denver.co.us> Cc: Craig Anderson <chanders@timing.com>, freebsd-hackers@FreeBSD.ORG, brhall@timing.com Subject: Re: Help with passing fd on FreeBSD Message-ID: <Pine.BSF.3.96.980830104935.4972B-100000@fledge.watson.org> In-Reply-To: <Pine.LNX.4.02A.9808292150540.19313-100000@phobos.illtel.denver.co.us>
next in thread | previous in thread | raw e-mail | index | archive | help
I have a set of patches that try to clean up the fd-passing behavior in 3.0-CURRENT. I originally wrote them to allow the passing of kernel authorization tokens (http://www.watson.org/fbsd-hardening/tokens/). These patches allow lkm's to hook the externalize, internalize, and gc functions. However, in the process of writing this, I have fixed at least a few potential problems. A few were just coding issues (like some underlying assumptions about the size of mbufs and so on). I have not fixed the bug described in the BSD4.4 book (sorry, don't have it with me so don't have a page number) w.r.t. garbage collecting fd's in listening sockets. Passing tokens seems to work quite well for me. Is the mbuf problem you reported fixable by adding a sleep waiting for an mbuf? On Sat, 29 Aug 1998, Alex Belits wrote: > On Fri, 28 Aug 1998, Craig Anderson wrote: > > > Can someone give me pointers on passing open file descriptors on FreeBSD? > > This is covered in W. Richard Stevens Advanced programming book, but > > See R. Stevens "TCP/IP Illustrated", volume 3, chapter 18.3 > or R. Stevens "Unix Network Programming", second edition (1997), volume 1, > chapter 14.7. > > Previous books describe 4.3BSD and SVR4 fd passing that is more than > slightly different. > > > the structs in FreeBSD are slightly different, and I've never done this. > > In FreeBSD CMSG_DATA(cm) macro is the equivalent to cm->cmsg_data that is > commented out in include files in 4.4BSD-derived, but exists in > other compatible systems. > > Beware of the known bug in FreeBSD kernel (PR kern/4345). > > -- > Alex > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > Robert N Watson Carnegie Mellon University http://www.cmu.edu/ TIS Labs at Network Associates, Inc. http://www.tis.com/ SafePort Network Services http://www.safeport.com/ robert@fledge.watson.org http://www.watson.org/~robert/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980830104935.4972B-100000>