diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-01-11 13:13:04 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2019-01-11 23:11:11 +0100 |
commit | 16166542753264ae21115790744af535e6f2c859 (patch) | |
tree | 817877a8c300aa372f2ddd8a9d09ce6e4800a8b3 /source3 | |
parent | 92c2ed4db29c8fa4e5989b5f6d611752bdaa523d (diff) | |
download | samba-16166542753264ae21115790744af535e6f2c859.tar.gz |
s3:smbd: prepare the usage of per_thread_cwd_*() functions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util.c | 7 | ||||
-rw-r--r-- | source3/smbd/server.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 8ff330bcd26..5dbd67349fa 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -453,6 +453,13 @@ NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx, NTSTATUS status = NT_STATUS_OK; int ret; + /* + * The main process thread should never + * allow per_thread_cwd_enable() to be + * called. + */ + per_thread_cwd_disable(); + if (reinit_after_fork_pipe[1] != -1) { close(reinit_after_fork_pipe[1]); reinit_after_fork_pipe[1] = -1; diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 871bb923449..c59759fed98 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1798,6 +1798,13 @@ extern void build_options(bool screen); exit(1); } + /* + * This calls unshare(CLONE_FS); on linux + * in order to check if the running kernel/container + * environment supports it. + */ + per_thread_cwd_check(); + if (!cluster_probe_ok()) { exit(1); } |