[master] 51344da VMOD unix: hold back the SunOS/getpeerucred() case for now.
Geoff Simmons
geoff at uplex.de
Mon Mar 12 12:44:09 UTC 2018
commit 51344da7baf647bc23eb2e0b00e57da774a11f48
Author: Geoff Simmons <geoff at uplex.de>
Date: Mon Mar 12 13:42:40 2018 +0100
VMOD unix: hold back the SunOS/getpeerucred() case for now.
To be taken up again after 6.0.
diff --git a/configure.ac b/configure.ac
index c0dc0f7..4323d1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -217,7 +217,6 @@ AC_CHECK_FUNCS([fallocate])
AC_CHECK_FUNCS([closefrom])
AC_CHECK_FUNCS([sigaltstack])
AC_CHECK_FUNCS([getpeereid])
-AC_CHECK_FUNCS([getpeerucred])
save_LIBS="${LIBS}"
LIBS="${PTHREAD_LIBS}"
diff --git a/lib/libvmod_unix/cred_compat.h b/lib/libvmod_unix/cred_compat.h
index 5c2340b..6a79636 100644
--- a/lib/libvmod_unix/cred_compat.h
+++ b/lib/libvmod_unix/cred_compat.h
@@ -65,18 +65,6 @@ get_ids(int fd, uid_t *uid, gid_t *gid)
return (CREDS_FAIL);
return (0);
-#elif defined(HAVE_GETPEERUCRED)
-
- ucred_t *ucred;
-
- errno = 0;
- if (getpeerucred(fd, &ucred) != 0)
- return (CREDS_FAIL);
- *uid = ucred_geteuid(ucred);
- *gid = ucred_getegid(ucred);
- ucred_free(ucred);
- return (0);
-
#else
(void) fd;
(void) uid;
diff --git a/lib/libvmod_unix/vmod.vcc b/lib/libvmod_unix/vmod.vcc
index 1035df3..4e90bad 100644
--- a/lib/libvmod_unix/vmod.vcc
+++ b/lib/libvmod_unix/vmod.vcc
@@ -48,12 +48,6 @@ one of the following:
* ``getpeereid(3)`` (such as FreeBSD and other BSD-derived systems)
-* ``getpeerucred(3)`` (SunOS and descendants)
-
- * Reading peer credentials on such a system may require that the
- Varnish child process runs with certain privileges (such as
- ``PRIV_PROC_INFO``)
-
* the socket option ``SO_PEERCRED`` for ``getsockopt(2)`` (Linux)
On most platforms, the value returned is the effective user or group
@@ -106,5 +100,4 @@ SEE ALSO
* :ref:`varnishd(1)`
* :ref:`vcl(7)`
* ``getpeereid(3)``
-* ``getpeerucred(3)``
* ``getsockopt(2)``
More information about the varnish-commit
mailing list