unix domain socket security and PID retrieval

Zane C.B. v.velox at vvelox.net
Mon Feb 4 13:07:34 UTC 2008


On Mon, 4 Feb 2008 05:33:22 -0600 (CST)
Scott Bennett <bennett at cs.niu.edu> wrote:

> >     On Mon, 4 Feb 2008 04:30:21 -0600 "Zane C.B."
> > <v.velox at vvelox.net>
> >wrote:
> >Been starting to look into writing some stuff that uses unix domain
> >sockets, but I've been running into the problem of figuring out
> >what the calling PID is on the other end.
> >
> >Any suggestions on where I should begin to look?
> 
>      Sure.  Take a look at the man pages for fork(2), vfork(2), and
> fork(3f).
> >
> >As it currently stands, I am looking at doing this with perl.
> 
>      In that case, take a look at perlfork(1), too.

I am a bit lost on what fork has to do with the question.

Currently have found there is no method for figuring what PID it is.
I've found there is support for figuring out what user it is,
according to unix(4), but there appears to way to get to using any of
the existing perl modules for unix domain sockets.


More information about the freebsd-questions mailing list