How to transfer file descriptors with UNIX domain sockets?
Conor P. Cahill
cpcahil at virtech.uucp
Mon Jul 2 22:57:13 AEST 1990
In article <10981 at hydra.gatech.EDU> gt0178a at prism.gatech.EDU (BURNS,JIM) writes:
>in article <1990Jul01.130157.3627 at virtech.uucp>, cpcahil at virtech.uucp (Conor P. Cahill) says:
>>>in article <1421 at tub.UUCP>, net at tub.UUCP (Oliver Laumann) says:
> [code deleted]
>> The system knows because the person, or persons, that added that capability
>> to the sockets code ensured that the file descriptor that was passed became
>> a valid file descriptor in the process that received it.
>
>I'm sure that it *can* be done - my question is what was it in Oliver
>Laumann's code that informed the kernel that what was in the message was a
>file descriptor?
Essentially it is the portion of the that supports the passing of "access
rights". The access rights to the file descriptor are passed using a
send/recvmsg(). For more info, you could look at section 6.10 "Passing
file descriptors" in UNIX Network Programming (by W. Richard Stevens).
--
Conor P. Cahill (703)430-9247 Virtual Technologies, Inc.,
uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160
Sterling, VA 22170
More information about the Comp.unix.questions
mailing list