Hi,
I'm trying to find out if it is possible to find out the EUID (Effective
User ID) of a webappl client, from the other side of a socket connection.
On the same system, a 'C' program is running as a socket server, waiting for
client connections.
On the same system, is a webcontainer (
tomcat, SUN application server, etc).
A client (either on the same system or a remote system) uses a browser to
access a login page for a webappl served by the webcontainer.
The loginModule uses PAM to authenticate the user, and the user starts
interacting with the webappl. The backend code for the webappl creates a
socket and connects to the 'C' socket server.
Now, the socket server wants to obtain the user credentials (EUID) of the
connecting client. It does so using a couple library functions and gets
back an EUID for the client on the other end of the socket.
However, the EUID coming back is for the user that the webcontainer is
running as. For instance, 0 for 'root' or 60002 for 'noaccess'. What the
socket server really wants is the EUID for the client user who was
authenticated, Joe Bar (EUID 12345).
It there anything that can be done on the webappl side so that when the
socket connection is made, it appears to the 'C' socket server that it
is Joe Bar instead of 'root' or 'noaccess'.
I have tested this with tomcat and Sun
Java webserver and do not get
the client user EUID, but instead root or noaccess.
Thanks
-Bruce