Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Mar 2005 13:05:10 +0100
From:      Andreas Bachmann <bachi@te-clan.ch>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        freebsd-net@freebsd.org
Subject:   Re: static pid and uid for a socket?
Message-ID:  <1110110710.2060.48.camel@notebook.bachi.net>
In-Reply-To: <20050306113602.GA72592@gothmog.gr>
References:  <1110107067.2060.26.camel@notebook.bachi.net> <20050306113602.GA72592@gothmog.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
> AFAIK, this can only be done if the original process calls execve() on a
> setuid binary and has not marked the socket descriptor as close-on-exec.
i'm developing a gtk+ based equivalent to 'sockstat'.
when a user is proposed to run a process, which creates a socket, the
sockstat printout is for example:

USER   COMMAND LOCAL ADDRESS   FOREIGN ADDRESS
myuser myprog  10.0.0.10:52265 66.102.11.99:123

but, can the displayed kernel socket structure abrupty (by fork() or
setuid()) change user or process (because xfile.xf_uid or xfile.xf_pid
changed)?

greets

Andreas Bachmann



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1110110710.2060.48.camel>