Home GnuPG

Support LOCAL_PEEREID (NetBSD) and getpeereid() (FreeBSD)
76ea68c2a77cUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Support LOCAL_PEEREID (NetBSD) and getpeereid() (FreeBSD)

* configure.ac: check for LOCAL_PEEREID and getpeereid().
* src/assuan-socket-server.c (accept_connection_bottom): make use of
LOCAL_PEEREID and getpeereid().

For use with assuan_get_peercred(). Note that getpeereid() does not
set the PID member. LOCAL_PEEREID is checked before getpeereid()
since NetBSD has both of these. SO_PEERCRED is still checked first.

[Second revision]
This revision adds support for LOCAL_PEEREID which NetBSD uses. Its
tested against NetBSD 6.0 and may work without problems with earlier
versions. FreeBSD uses getpeereid() which does not have PID support.
Recent OpenBSD versions do support SO_PEERCRED and old versions have
getpeereid() but also may have LOCAL_PEEREID (not sure).

Details

Provenance
bjkAuthored on Nov 21 2012, 3:53 AM
wernerCommitted on Nov 21 2012, 1:10 PM
Parents
rA76ceeb3582bb: Improve parsing of the GIT revision number.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rA76ea68c2a77c: Support LOCAL_PEEREID (NetBSD) and getpeereid() (FreeBSD) (authored by Ben Kibbey <bjk@luxsci.net>).Nov 21 2012, 1:10 PM