Unix domain sockets / IPC - how to get remote process/user id?

Jp Calderone exarkun at intarweb.us
Tue Feb 10 03:02:15 CET 2004


On Mon, Feb 09, 2004 at 07:22:30PM -0600, Jeff Epler wrote:
> On Mon, Feb 09, 2004 at 03:39:34PM -0800, Fossie wrote:
> > So, for my question: What are my options? I cannot believe I am the
> > first with this problem. Preferable, only standard python packages
> > should be used.
> 
> My Linux manpage for unix(7) indicates that SCM_RIGHTS is not portable.
> (I am not 100% sure this is what you're talking about, because it's
> nothing I've ever done before) In any case, I looked but didn't find an
> implementation of the needed sendmsg(2) .. I found only this:
> 	https://sourceforge.net/tracker/?func=detail&atid=355470&aid=814689&group_id=5470
> Wrapping sendmsg with pyrex, ctypes, or even with a new C module might
> be a good first project in extending Python.  If you do your work in
> the form of a patch to Python, I suspect it would easily gain approval.
> Once you'd tested your patch and added tests for it, you'd submit the
> patch to the bug I mentioned above or as a new item in the Patch area.

  There's a wrapper for sendmsg(2) in Twisted's sandbox:

    http://cvs.twistedmatrix.com/cvs/sandbox/pahan/sendmsg/

  This may be a good start.  It'd be great to have this in the stdlib.

  Jp




More information about the Python-list mailing list