From: "James F. Hranicky" Date: 2006-06-17T02:27:43+09:00 Subject: Re: Patch for Unix socket peer credentials On Friday 16 June 2006 11:51, Tanaka Akira wrote: > In article <200606091528.30171.jfh@cise.ufl.edu>, > > "James F. Hranicky" writes: > > This patch adds support for getting the uid and gid of the peer > > socket connected to a Unix domain socket. > > I think it's good feature. Ok -- I think I'm going to take Sam's advice and turn it into one method that returns [uid, gid] . I'm not sure how to get the creds of a DGRAM sock, though. > > + * Document-method: peer_uid > > + * call-seq: socket.peer_uid => int > > + * > > + * Returns the uid of the peer socket for Unix domain stream sockets > > real uid or effective uid? It depends on the platform -- on FreeBSD it's euid, on Linux (I think) it's ruid and on Solaris it can be anything, though I stuck with ruid. Jim