Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Apr 2021 23:00:50 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Gleb Popov <arrowd@freebsd.org>
Cc:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ?
Message-ID:  <YHibchlYRhP0xyP8@kib.kiev.ua>
In-Reply-To: <CALH631=3hqvfraume467OM%2BqGqp854sGJFfhO8b61mF%2BkbsJ2Q@mail.gmail.com>
References:  <CALH631kLCApctk4iQJj6br0Pzeb6qsh9g3jz_SA8hH91ftQGDQ@mail.gmail.com> <YHiQ6qEjS2w8uYpS@kib.kiev.ua> <CALH631=3hqvfraume467OM%2BqGqp854sGJFfhO8b61mF%2BkbsJ2Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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?



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