Date: Thu, 15 Apr 2021 22:21:39 +0300 From: Gleb Popov <arrowd@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? Message-ID: <CALH631=3hqvfraume467OM%2BqGqp854sGJFfhO8b61mF%2BkbsJ2Q@mail.gmail.com> In-Reply-To: <YHiQ6qEjS2w8uYpS@kib.kiev.ua> References: <CALH631kLCApctk4iQJj6br0Pzeb6qsh9g3jz_SA8hH91ftQGDQ@mail.gmail.com> <YHiQ6qEjS2w8uYpS@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631=3hqvfraume467OM%2BqGqp854sGJFfhO8b61mF%2BkbsJ2Q>