From: Lukasz Stelmach <stlman@poczta.fm>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: unix socket connection tracking
Date: Sun, 23 Apr 2006 11:37:42 +0200 [thread overview]
Message-ID: <444B4AE6.4090601@poczta.fm> (raw)
In-Reply-To: <Pine.LNX.4.61.0604221531190.18093@yvahk01.tjqt.qr>
[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2006-04-23 9:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-20 22:31 unix socket connection tracking Lukasz Stelmach
2006-04-21 12:53 ` Jan Engelhardt
2006-04-21 13:35 ` Lukasz Stelmach
2006-04-21 14:12 ` Jan Engelhardt
[not found] ` <444A1B86.1060701@poczta.fm>
2006-04-22 13:34 ` Jan Engelhardt
2006-04-23 9:37 ` Lukasz Stelmach [this message]
2006-04-23 17:38 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=444B4AE6.4090601@poczta.fm \
--to=stlman@poczta.fm \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox