summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-03-13 16:58:49 +0100
committerRalph Boehme <slow@samba.org>2018-07-24 17:38:27 +0200
commit7cb27238fe4e6dfc45cf3128ccd4a392aaf4e877 (patch)
tree835532e8cc38bf480c5ada98aba014e7d6000921 /source3/wscript
parent40d15260d24d0071732f47873f395fce29b8a6f4 (diff)
downloadsamba-7cb27238fe4e6dfc45cf3128ccd4a392aaf4e877.tar.gz
configure: check for Linux specific unshare() with CLONE_FS
Note we still need some kind of runtime detection as it can fail in some constraint container setups, which reject the whole unshare() syscall instead of just the once used for container features. In case unshare(CLONE_FS) works, we can have a per thread current working directory and use [f]chdir() safely in worker threads. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index aed784ef017..a14d76d7469 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1505,6 +1505,11 @@ main() {
legacy_quota_libs = ''
conf.env['legacy_quota_libs'] = legacy_quota_libs
+ conf.CHECK_CODE('(void)unshare(CLONE_FS);',
+ headers='sched.h',
+ define='HAVE_UNSHARE_CLONE_FS',
+ msg='for Linux unshare(CLONE_FS)')
+
#
# cluster support (CTDB)
#