summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-12-10 23:02:19 +0100
committerVolker Lendecke <vlendec@samba.org>2010-12-19 23:25:06 +0100
commitd39fedaa69b20e8f29fff9cd9a09c1bb1ecec7be (patch)
treec5b8a55f35f1e2edaf3d81662a7856ce84220c22 /source3/configure.in
parentd082701ea5131b02a49321ef29d1aa58a80ee92a (diff)
downloadsamba-d39fedaa69b20e8f29fff9cd9a09c1bb1ecec7be.tar.gz
samba-d39fedaa69b20e8f29fff9cd9a09c1bb1ecec7be.tar.bz2
samba-d39fedaa69b20e8f29fff9cd9a09c1bb1ecec7be.zip
s3: FreeBSD has getpeereid(), use it
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 5f81a193ca..b43d0b34de 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6353,6 +6353,18 @@ if test x"$samba_cv_HAVE_PEERCRED" = x"yes"; then
AC_DEFINE(HAVE_PEERCRED,1,[Whether we can use SO_PEERCRED to get socket credentials])
fi
+AC_CACHE_CHECK([for getpeereid],samba_cv_HAVE_GETPEEREID,[
+AC_TRY_LINK([#include <sys/types.h>
+#include <unistd.h>],
+[uid_t uid; gid_t gid; int ret;
+ ret = getpeereid(0, &uid, &gid);
+],
+samba_cv_HAVE_GETPEEREID=yes,samba_cv_HAVE_GETPEEREID=no)])
+if test x"$samba_cv_HAVE_GETPEEREID" = xyes; then
+ AC_DEFINE(HAVE_GETPEEREID,1,
+ [Whether we have getpeereid to get socket credentials])
+fi
+
#################################################
# Check to see if we should use the included popt