Skip to content
Snippets Groups Projects
Commit 807909a6 authored by Val Packett's avatar Val Packett
Browse files

zb: support ServerHandshake on *BSD

SO_PEERCRED is a Linux-specific option (also available on OpenBSD,
but the nix crate only exposes it on Linux).

FreeBSD has LOCAL_PEERCRED, but it's also not exposed by nix.

However, we only need the uid here (not the pid), so getpeereid(), which
is exposed for all BSD-like systems in the nix crate, is the way to go.

In addition, allow receiving SCM_CREDS on FreeBSD/DragonFly,
as clients do send it to allow the server to get the pid.
parent 7ad3553a
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment