Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 1996 11:53:03 -0800
From:      Julian Elischer <julian@whistle.com>
To:        Jonathan Lemon <jlemon@americantv.com>
Cc:        Bill Paul <wpaul@skynet.ctr.columbia.edu>, hackers@FreeBSD.org
Subject:   Re: looking for an idea
Message-ID:  <3299F91F.59E2B600@whistle.com>
References:  <199611242122.QAA02399@skynet.ctr.columbia.edu> <199611251840.SAA21376@right.PCS>

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Lemon wrote:
> 
> > semaphore -- Gaaahhh!!). Previously, I also experimented with
> > sending a file descriptor over the AF_UNIX socket from the client
> > to the server using sendmsg()/revcmsg(), but this doesn't provide
> > any useful (i.e. trustworthy) information either. I thought about
> 
> Hm.  I think this is probably the right track.  What you want is some way
> for the process on the other end of the pipe to prove it's identity to the
> server.

I was thinking more along the lines of the ownership of the fifo :)

> 
> How about having the client create a file of mode 000, and then pass that
> open file descriptor back to the server?  Since it's mode 000, only the
> owner of the file could have opened it (or chowned it to 000).  The file can
> either be created randomly by the client, or specified by the server.
> 
> The server can then use the fstat() call on the passed file descriptor to
> verify that the mode is 000, and that the file was indeed opened by the
> remote process.  It also gets the uid from the fstat() call.
> --
> Jonathan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3299F91F.59E2B600>