Date: Thu, 15 Apr 2021 21:58:36 +0300 From: Gleb Popov <arrowd@freebsd.org> To: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? Message-ID: <CALH631kLCApctk4iQJj6br0Pzeb6qsh9g3jz_SA8hH91ftQGDQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello hackers. I'm using getsockopt(SOL_LOCAL, LOCAL_PEERCRED) on a unix socket and for some reason it fails for me. I came up with a minimal reproduction testcase: https://arrowd.name/un.cpp Steps to reproduce: 1. c++ un.cpp 2. ./a.out 3. nc -U foobar This results in getsockopt failed with Socket is not connected Am I missing something?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631kLCApctk4iQJj6br0Pzeb6qsh9g3jz_SA8hH91ftQGDQ>