Unix domain sockets / IPC - how to get remote process/user id?
gogr at fossie.net
Wed Feb 11 13:02:16 CET 2004
Thanks to all for your answers!
I had a look at the sendmsg wrapper from twistedmatrix, but without
any documentation (not even some short comments) it is a bit hard to
use. It seems to support file descriptor passing (SCM_RIGHTS) but
would need some extra coding to support the SCM_CREDENTIAL structure,
which seems to be system dependent anyway, as stated by Jeff (see unix
man page, I had another impression from a short glimpse into Richard
Stevens' networking books..)
All in all, since I am neither a linux nor a network/ipc nor a c
expert [thats why I am using Python ;) ], I was looking more for a
Therefore, I had a closer look at the system V shared memory (and
semaphore) module (shm), which I found at:
Its another kind of interprocess communication than I originally
wanted, but does what I need (giving uid/pid) without any
modification. It should be portable (ok, maybe not to windows) and is
good documented (at least sufficiently for me). This looks like a
candidate (useful, portable, documented) for the standard python
library to me..
Thanks again, Fossie
More information about the Python-list