From 47ace4acfd8b51f4bf52d7bba5a1777b0291b173 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Thu, 15 Dec 2022 11:45:59 +0000 Subject: [PATCH] Fix g_sck_get_peer_cred() on FreeBSD Socket level should be SOL_LOCAL rather than SOL_SOCKET - See 'man unix'. --- common/os_calls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/os_calls.c b/common/os_calls.c index a30b60f7..f631b1d1 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -671,7 +671,7 @@ g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid) unsigned int xucred_length; xucred_length = sizeof(xucred); - if (getsockopt(sck, SOL_SOCKET, LOCAL_PEERCRED, &xucred, &xucred_length)) + if (getsockopt(sck, SOL_LOCAL, LOCAL_PEERCRED, &xucred, &xucred_length)) { return 1; }