Jan Engelhardt wrote: >>>>>> I feel dumb as never so please enlight me. Is ther a way to find out which >>>>>> process is on the other end of a unix socket pointed by a specified fd in a process. >>>>> getpeer*() >>>> getpeername(2) (that is the only man page I've got) [...] > Just look at all processes and logically connect them: > > 15:32 shanghai:/D/home/jengelh # l /proc/7315/fd [...] > 15:33 shanghai:/D/home/jengelh # l /proc/7316/fd/ [...] > No need for ptrace. No need for getpeername() either, but it's useful to > get the real addresses of sockets. Please understand my situation. I've got GNOME running, gconfd-2 is a "registry" management process that accepts connections through a unix domain socket (named one) from many *unrelated* (child/parent) processes. In fact from most gnome applications. I *do* strace it to see what it does. It does some write(2)s to some sockets. I would like to know which socket leads where. Try to strace gconfd-2 and you'will see what I mean. For now James Cloos gave the best option, to look for a socket with an i-node number adjectant (+-1) to the socket I know. -- Było mi bardzo miło. Czwarta pospolita klęska, [...] >Łukasz< Już nie katolicka lecz złodziejska. (c)PP
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: unix socket connection tracking
- From: Jan Engelhardt <[email protected]>
- Re: unix socket connection tracking
- References:
- unix socket connection tracking
- From: Lukasz Stelmach <[email protected]>
- Re: unix socket connection tracking
- From: Jan Engelhardt <[email protected]>
- Re: unix socket connection tracking
- From: Lukasz Stelmach <[email protected]>
- Re: unix socket connection tracking
- From: Jan Engelhardt <[email protected]>
- Re: unix socket connection tracking
- From: Jan Engelhardt <[email protected]>
- unix socket connection tracking
- Prev by Date: Re: Time to remove LSM (was Re: [RESEND][RFC][PATCH 2/7] implementation of LSM hooks)
- Next by Date: Re: quantum capabilities
- Previous by thread: Re: unix socket connection tracking
- Next by thread: Re: unix socket connection tracking
- Index(es):