summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-06-28 13:41:19 -0700
committerJeremy Allison <jra@samba.org>2012-06-29 03:57:45 +0200
commit485787f0dfa64bbada7c971ec44f04a1095b4229 (patch)
tree143ec6a9ac9e7d26e90e41f5110791419a9d29ee /source3/configure.in
parent821bd95156e8cc6d843aecb0a27d4a08761b7dac (diff)
downloadsamba-485787f0dfa64bbada7c971ec44f04a1095b4229.tar.gz
samba-485787f0dfa64bbada7c971ec44f04a1095b4229.tar.bz2
samba-485787f0dfa64bbada7c971ec44f04a1095b4229.zip
Move back to using per-thread credentials on Linux. Fixes the glibc native AIO lost wakeup problem.
See this post: https://lists.samba.org/archive/samba-technical/2012-June/085101.html for details. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jun 29 03:57:45 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in19
1 files changed, 18 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 5df54cfff9..ba376f08a9 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -953,7 +953,7 @@ AC_CHECK_FUNCS(setsid glob strpbrk crypt16 getauthuid)
AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf)
AC_CHECK_FUNCS(getgrset)
-AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf)
+AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups syscall sysconf)
AC_CHECK_FUNCS(atexit grantpt posix_fallocate)
AC_CHECK_FUNCS(fallocate)
AC_CHECK_FUNCS(fseeko setluid getpwanam)
@@ -2766,6 +2766,23 @@ AC_CHECK_FUNCS(getpagesize)
# look for a method of setting the effective uid
seteuid=no;
+case "$host_os" in
+*linux*)
+if test $seteuid = no; then
+AC_CACHE_CHECK([for Linux thread-specific credentials],samba_cv_USE_LINUX_THREAD_CREDENTIALS,[
+AC_TRY_RUN([
+#define AUTOCONF_TEST 1
+#define USE_LINUX_THREAD_CREDENTIALS 1
+#include "confdefs.h"
+#include "${srcdir-.}/lib/util_sec.c"],
+ samba_cv_USE_LINUX_THREAD_CREDENTIALS=yes,samba_cv_USE_LINUX_THREAD_CREDENTIALS=no,samba_cv_USE_LINUX_THREAD_CREDENTIALS=cross)])
+if test x"$samba_cv_USE_LINUX_THREAD_CREDENTIALS" = x"yes"; then
+ seteuid=yes;AC_DEFINE(USE_SETREUID,1,[Whether we can use Linux thread-specific credentials])
+fi
+fi
+;;
+esac
+
if test $seteuid = no; then
AC_CACHE_CHECK([for setreuid],samba_cv_USE_SETREUID,[
AC_TRY_RUN([