static pid and uid for a socket?

Andreas Bachmann bachi at te-clan.ch
Sun Mar 6 04:05:15 PST 2005


> 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



More information about the freebsd-net mailing list