I do not believe what you are looking for is available. I faintly
recall that user information is available in SYSV streams, but not
over TCP/IP sockets.
In any event, something like this coming over the network cannot be
trusted as it can be forged. That is why authentication exists.
Dan
On Sep 28, 2005, at 10:10, Rich Morin wrote:
> I'd like to tweak WEBrick so that it will only respond to the user
> that started it (i.e., the user whose uid matches WEBrick's). We
> can assume, for simplicity's sake, that the user is running a web
> browser on the same (Unixish) machine as WEBrick.
>
> I _suspect_ that WEBrick can get the needed information by looking
> at the incoming socket (e.g., for a pid), than researching which
> uid that pid has. Unfortunately, I know little about the innards
> of sockets and even less about the innards of WEBrick.
>
> Comments, clues, and suggestions are all welcome.
>
> -r
> --
> email: rdm@cfcl.com; phone: +1 650-873-7841
> http://www.cfcl.com - Canta Forda Computer Laboratory
> http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.
>
>