Actions
Bug #3811
closedSupport SOL_SOCKET SO_PEERCRED socket option on OpenBSD
Bug #3811:
Support SOL_SOCKET SO_PEERCRED socket option on OpenBSD
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-openbsd4.8]
Backport:
Description
=begin
This makes inspect_peercred in ext/socket/option.c work on OpenBSD-current. OpenBSD added support for it on 2010-06-30. OpenBSD uses a struct sockpeercred instead of a struct ucred for storing the information, because it has used struct ucred for something else since before 1995. See http://fxr.watson.org/fxr/source/sys/ucred.h?v=OPENBSD;im=3 and http://marc.info/?l=openbsd-cvs&m=127792847027664&w=2.
I used a macro to do this, but a typedef would work as well. Tested on OpenBSD amd64, OpenBSD i386, and Linux i386.
=end
Files
Actions