Date: Fri, 23 Apr 2021 11:46:33 +0300 From: Gleb Popov <arrowd@freebsd.org> To: Mark Millard <marklmi@yahoo.com> Cc: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? Message-ID: <CALH631mc8gstiSVucir%2B_J62LX9LQTU2CGC-eGoD6kU5DDXKQA@mail.gmail.com> In-Reply-To: <AA2EDB34-4977-4449-BE48-B898DBC16188@yahoo.com> References: <CALH631kLCApctk4iQJj6br0Pzeb6qsh9g3jz_SA8hH91ftQGDQ@mail.gmail.com> <YHiQ6qEjS2w8uYpS@kib.kiev.ua> <CALH631=3hqvfraume467OM%2BqGqp854sGJFfhO8b61mF%2BkbsJ2Q@mail.gmail.com> <E6626DFC-2014-412C-AEA2-ECE57835B058@yahoo.com> <CALH631mi0xOQGjd6F3Beu_BQdqAx8RYCrbkUi524F8S4rwo1aA@mail.gmail.com> <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> <CALH631nrhyY%2BK3tPSwt1wuYHoZkz371UtjK%2BdG844RybtA2yKw@mail.gmail.com> <YIFQ/U34i1Jbxjv7@kib.kiev.ua> <CALH631maNoe_x%2BippbRTE3s8XarZ32Nrb%2BfXWUz-NMFeCre_-w@mail.gmail.com> <YIHPzqgjRwDtrMrM@kib.kiev.ua> <445774BD-D68B-48A1-856D-F8DC9A480C68@yahoo.com> <0C66B2A2-C9C6-4783-8A26-F736F3B9CCD8@yahoo.com> <AA2EDB34-4977-4449-BE48-B898DBC16188@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 22, 2021 at 11:59 PM Mark Millard <marklmi@yahoo.com> wrote: > So s2 gets the pid of the ncat and s gets the pid of a.out. > > Is that what you expected? > <...> > So s2 gets the pid of the nc and s gets the pid of a.out. > > Same question applies. > <...> > Were you expecting s2 to get the pid of nc and > s to get the pid of a.out under FreeBSD as well? > Would that be getting what you want? > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > Most probably, yes. I'm not 100% as I'm still trying to reach authors of https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L811 and ask them what this code does. On one hand, [1] hints that creds for the listening socket should indeed match the user that started the program. On the other hand, log message at [2] looks like they think that creds contain credentials of the connected user. Like, the authors also mistaken the listening socket with an accepted one. I'm confused by this and keep asking on Collabora IRC and forums, but didn't get an answer yet. [1]: https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L833 [2]: https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L844
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631mc8gstiSVucir%2B_J62LX9LQTU2CGC-eGoD6kU5DDXKQA>