Index: [Article Count Order] [Thread]

Date: Wed, 28 Sep 2005 10:43:03 -0400
From: Dan Janowski <danj@3skel.com>
Subject: [webricken:151] Re: getting the uid of the incoming browser?
To: webricken@notwork.org
Message-Id: <D3F40990-7B0E-48A0-83F6-97A97594525D@3skel.com>
In-Reply-To: <p06230914bf6051a9c781@[192.168.254.205]>
References: <p06230914bf6051a9c781@[192.168.254.205]>
X-Mail-Count: 00151

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.
>
>