From: Ralph Boehme Date: Tue, 13 Mar 2018 15:58:49 +0000 (+0100) Subject: configure: check for Linux specific unshare() with CLONE_FS X-Git-Tag: ldb-1.5.0~225 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7cb27238fe4e6dfc45cf3128ccd4a392aaf4e877;p=thirdparty%2Fsamba.git 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 Signed-off-by: Stefan Metzmacher Signed-off-by: Ralph Boehme --- 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) #