Re: How to check UID of process on the other side of local TCP/UDP connection
"Greg Metcalfe" <[email protected]> Tue, 28 Nov 2006 22:29:34 -0800
| Newsgroups | gmane.comp.security.linux |
|---|---|
| Message-ID | <[email protected]> |
On Monday 27 November 2006 12:06, Vladimir Mitiouchev wrote: > On 11/24/06, [email protected] <[email protected]> wrote: > > Do you have any ideas how this local > > authentication can be achieved in some > > different way? > > identd > fstat (BSD) > lsof(Linux) > > > Unix sockets (unless of course Unix sockets are > > the only good way to > > resolve my problems). > > SCM_CREDS (BSD) > SO_PEERCRED (Linux) SO_PEERCRED isn't supported on HP-UX 11i for PA-RISC, at least. I think there are some hoops to jump through in using SCM_CREDS. This may have all been resolved for HP-UX versions for Itanic, though. I have no idea what might be involved on AIX. I think the most portable solution (O.P. wants portability across all modern Unices) would be via the OpenSSL libs. There are vendor supported packages available for Solaris, HP-UX, and AIX--probably pretty much the last of the commercial Unices he has to worry about. As the O.P. needs hundreds of connections per second, this might be too expensive. But it would probably keep his porting work to a minimum. -- Greg Metcalfe