Taken from: https://groups.google.com/g/linux.debian.bugs.dist/c/mX4GpUJih4k. --- a/configure.ac +++ b/configure.ac @@ -132,6 +132,16 @@ if test "$os_unix" = "yes"; then AC_CHECK_FUNCS([getpeereid]) AC_CHECK_FUNCS([getpeerucred]) AC_CHECK_FUNCS([issetugid]) + case "$host_os" in + kfreebsd*-gnu | gnu*) + have_getpeereid=no + AC_CHECK_LIB(bsd, getpeereid, have_getpeereid=yes) + if test "x$have_getpeereid" = "xyes"; then + AC_DEFINE([HAVE_GETPEEREID], [1], [have getpeereid]) + AC_SEARCH_LIBS([getpeereid], [bsd]) + fi + ;; + esac AC_CACHE_CHECK([for thread-local storage class], [ac_cv_tls_keyword], --- a/common/unix-peer.c +++ b/common/unix-peer.c @@ -47,6 +47,11 @@ # include #endif +#ifdef HAVE_GETPEEREID +/* Declare getpeereid from /usr/include/bsd/unistd.h */ +extern int getpeereid(int s, uid_t *euid, gid_t *egid); +#endif + /* Returns the unix domain socket peer information. * Returns zero on success. */ @@ -73,7 +78,8 @@ p11_get_upeer_id (int cfd, uid_t *uid, u *pid = cr.pid; #elif defined(HAVE_GETPEEREID) - /* *BSD/MacOSX */ + /* *BSD/MacOSX/kFreeBSD/Hurd */ + uid_t euid; gid_t egid; logtreecommitdiff
path: root/gnu/machine
AgeCommit message (Expand)Author
2023-08-08system: Do not check initrd modules for pseudo file systems....Ludovic Courtès
2022-11-17machine: ssh: Validate 'system' field....Ludovic Courtès
2022-11-09machine/digital-ocean: Pull operating system definition out of string....Ricardo Wurmus
2022-11-09machine/digital-ocean: Set load path to Guile 3.0 directories....Ricardo Wurmus
2022-11-09machine/digital-ocean: Use static-networking-service-type....Ricardo Wurmus
2022-11-09machine/digital-ocean: Use nightly Guix....Ricardo Wurmus
2022-10-17guix: Fix typos....Julien Lepiller
2022-09-26machine: ssh: Parameterize '%current-system' early on....Ludovic Courtès
2022-09-04Fix misspelling of GUIX_DIGITAL_OCEAN_TOKEN....Matthew James Kraai
2022-03-01initrd: Use non-hyphenated kernel command-line parameter names....Maxim Cournoyer
2022-01-16machine: ssh: Add 'safety-checks?' field....Ludovic Courtès
2022-01-09machine: ssh: Open a single SSH session per machine....Ludovic Courtès