diff options
Diffstat (limited to 'seatd/client.c')
-rw-r--r-- | seatd/client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/seatd/client.c b/seatd/client.c index edea23c..162f4ba 100644 --- a/seatd/client.c +++ b/seatd/client.c @@ -40,7 +40,11 @@ static int get_peer(int fd, pid_t *pid, uid_t *uid, gid_t *gid) { if (getsockopt(fd, 0, LOCAL_PEERCRED, &cred, &len) == -1) { return -1; } +#if __FreeBSD_version >= 1300030 + pid = cred.cr_pid; +#else *pid = -1; +#endif *uid = cred.cr_uid; *gid = cred.cr_ngroups > 0 ? cred.cr_groups[0] : (gid_t)-1; return 0; |