A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ?
Konstantin Belousov
kostikbel at gmail.com
Thu Apr 15 20:01:00 UTC 2021
On Thu, Apr 15, 2021 at 10:21:39PM +0300, Gleb Popov wrote:
> On Thu, Apr 15, 2021 at 10:16 PM Konstantin Belousov <kostikbel at gmail.com>
> wrote:
>
> > You are calling getsockopt(2) in the listen socket, not on the connected
> > one.
> > Replace s with s2 in the call.
> >
>
> The `man unix ` says:
>
> The credentials presented to the server (the
> listen(2) caller) are those of the client
> when it called connect(2); the credentials
> presented to the client (the connect(2)
> caller) are those of the server when it
> called listen(2).
>
> This is what I actually want - to find out credentials of the connected
> user.
Yes, so what? How you citation changes anything?
More information about the freebsd-hackers
mailing list