Re: Passing sockets....

Olaf Kirch (okir@monad.swb.de)
Sat, 1 Mar 1997 22:29:11 +0100 (MET)


From: okir@monad.swb.de (Olaf Kirch)
To: linux-kernel@vger.rutgers.edu
Subject: Re: Passing sockets....
Newsgroups: swb.lists.linux.kernel

> I need a kernel function that could pass sockets to other
> processes. I whant to have mutiple servers for the same
> protocol. For example a logon process that validate the
> user, and then pass the socket to a server that handle the
> requests.

Look at my modemmgr server available from ftp.mathematik.th-darmstadt.de
if /pub/okir. It uses UNIX domain sockets to pass open file descriptors
to a other processes. I wrote it to avoid having to make serial clients
like minicom setuid/setgid.

Note that it contains something that claims to provide authentication of
the client process--that's baloney. It doesn't work the way I did it. In
newer Linux kernels you can, however, use SCM_CREDENTIALS to make the
kernel provide your uid/gid/pid to the receiving process. It's not
documented yet, so you'll have to look at the kernel source to find out
how it works.

Cheers
Olaf

-- 
Olaf Kirch         |  --- o --- Nous sommes du soleil we love when we play
okir@monad.swb.de  |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax