[Bug 176419] [kernel] [patch] socketpair support for LOCAL_PEERCRED

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed May 4 17:08:48 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176419

Martin eto Misuth <eto.freebsd at ethome.sk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eto.freebsd at ethome.sk

--- Comment #2 from Martin eto Misuth <eto.freebsd at ethome.sk> ---
I think I hit this recently as well.

Man page contains wording:

     [ENOTCONN]         The argument s does not refer to a socket on which
                        connect(2) or listen(2) have been called.

Which actually describes situation exactly, but it is bit non-obvious that it
also means implicit exclusion of socktepair().

More over, as mentioned by nicholas, other system I tried (Linux) supports
getting this information about socketpair() created  sockets. I have not yet
tried OS X.

I wanted to use this to verify socket owner credentials (usually parent
process), before consuming data from it, in scripted environment.
Unfortunately, this feature can be used only when I go through fs namespace. I
don't know how these "anonymous" sockets (created by socketpair()) are
implemented internally but, I think creating socket files in my situation is
kinda wasteful.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-net mailing list