The branch, master has been updated via 168079b2c36 tevent: deprecate tevent_wrapper api again via dcd0edfdc90 Revert "smbd: add smbd_server_connection->raw_ev_ctx pointer" via 47c443b4795 vfs_aio_pthread: add sync fallback via a307e798ddf vfs_aio_pthread: store conn instead of sconn in aio_open_private_data via e2f46c9333e vfs_aio_pthread: use struct initializer for aio_open_private_data via 2f406fee523 vfs_default: add sync fallback to fsync_send/recv via 4673a8b9e36 vfs_default: add sync fallback to pwrite_send/recv via bc539d8104f vfs_default: add sync fallback to pread_send/recv via 57e2fb018f2 s3:smbd: don't use async dosmode if per-thread cwd is not available via 5d8f495b01c s3:smbd: use passed in ev in smbd_smb2_query_directory_send() via 6ec96ac7098 Revert "vfs_glusterfs: explain that/why we use the raw tevent_context in init_gluster_aio()" via 46d3a1541a6 Revert "smbd: explain that/why we use the raw tevent_context for update_write_time_handler()" via bcb4723aacd Revert "smbd: explain that/why we use the raw tevent_context for lease_timeout_handler()" via 4036fc894f7 Revert "smbd: explain that/why we use the raw tevent_context for oplock_timeout_handler()" via 5afd19198b8 Revert "smbd: explain that/why we use the raw tevent_context for do_break_to_none()" via ac597b07069 Revert "smbd: explain that/why we use the raw tevent_context for linux_oplock_signal_handler()" via 523a64e25d8 Revert "smbd: use raw_ev_ctx to clear the MSG_SMB_CONF_UPDATED registration" via 296a15a00e4 Revert "smbd: add smbd_server_connection->{root,guest}_ev_ctx pointer" via 50995917905 Revert "smbd: use sconn->root_ev_ctx for brl_timeout_fn()" via 9d47128f7c9 Revert "smbd: use sconn->root_ev_ctx for smbd_sig_{term,hup}_handler()" via de10c611053 Revert "smbd: add an effective connection_struct->user_ev_ctx that holds the event context used for the current user" via 88016bac86a Revert "smbd: add an effective {smb,smbd_smb2}_request->ev_ctx that holds the event context used for the request processing" via 122e141b465 Revert "smbd: remove unused smbd_server_connection->ev_ctx" via 2a62a98f5c7 Revert "s3:messages: protect against usage of wrapper tevent_context objects for messaging" via 1c3676f3aa9 Revert "s3:messages: allow messaging_{dgm,ctdb}_register_tevent_context() to use wrapper tevent_context" via 26107832cd9 Revert "s3:messages: allow messaging_dgm_ref() to use wrapper tevent_context" via e2a5272ac68 Revert "s3:messages: allow messaging_filtered_read_send() to use wrapper tevent_context" via 0bd10a48e4c Revert "s4:messaging: make sure only imessaging_client_init() can be used with a wrapper tevent_context wrapper" via 78fa4408321 Revert "smbd: add [un]become_guest() helper functions" via 3aaf7c14706 Revert "smbd: add smbd_impersonate_debug_create() helper" via e717c9035ef Revert "smbd: add simple noop smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create() wrappers" via 97a7f8864f3 Revert "smbd: make use of smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create() wrappers" via 864e985168d Revert "smbd: implement smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create() wrappers" via ac17919ae30 Revert "smbd: avoid explicit change_to_user() in defer_rename_done() already done by impersonation" via 3747dcb41f1 Revert "smbd: remove unused change_to_root_user() from smbd_sig_hup_handler()" via 718cc7a0d70 Revert "smbd: remove unused change_to_root_user() from brl_timeout_fn()" via 8e03cbe868d Revert "pthreadpool: split out pthreadpool_tevent_job from pthreadpool_tevent_job_state" via 44900b04338 Revert "pthreadpool: add pthreadpool_tevent_job_cancel()" via 9e4bc1f4a9b Revert "pthreadpool: maintain a global list of orphaned pthreadpool_tevent_jobs" via 991ca9b5646 Revert "pthreadpool: add some lockless coordination between the main and job threads" via d818e51174e Revert "pthreadpool: add helgrind magic to PTHREAD_TEVENT_JOB_THREAD_FENCE_*()" via 7882941b733 Revert "pthreadpool: maintain a list of job_states on each pthreadpool_tevent_glue" via 42e2ab7e997 Revert "pthreadpool: add a comment about a further optimization in pthreadpool_tevent_job_destructor()" via 7fd9bc3b6e5 Revert "pthreadpool: test cancelling and freeing pending pthreadpool_tevent jobs/pools" via 622ba5191d9 Revert "pthreadpool: add pthreadpool_tevent_[current_job_]per_thread_cwd()" via f4d6c48c65b Revert "pthreadpool: add tests for pthreadpool_tevent_[current_job_]per_thread_cwd()" via e94cd84bbf8 Revert "pthreadpool: call unshare(CLONE_FS) if available" via 67015e13ca2 Revert "pthreadpool: add pthreadpool_restart_check[_monitor_{fd,drain}]()" via 9b7d2257996 Revert "pthreadpool: implement pthreadpool_tevent_wrapper_create() infrastructure" via d032210d972 Revert "pthreadpool: test cancelling and freeing jobs of a wrapped pthreadpool_tevent" via 29fc7c7db78 smbd: rename sconn->raw_thread_pool to sconn->pool via 8074922c267 Revert "smbd: introduce sconn->sync_thread_pool" via cedbfbd9b86 Revert "s3: vfs: add smb_vfs_ev_glue" via 29dd6f3e590 Revert "s3: vfs: add user_vfs_evg to connection_struct" via 56f76944817 Revert "vfs_aio_pthread: use event context and threadpool from user_vfs_evg" via 96332ed1000 Revert "pthreadpool: we need to use pthreadpool_tevent_per_thread_cwd() on the callers pool" via a75f5de15db Revert "pthreadpool: ignore the return value of poll(NULL, 0UL, 1)" via 57c7aaa36d2 Revert "pthreadpool: reset monitor_fd after calling tevent_fd_set_auto_close()" via edb75eeb56d s3:smbd: pass (raw) ev to fetch_dos_mode_send instead of smb_vfs_ev_glue via 9f3d9ba49b0 s3:smbd: pass (raw) ev to dos_mode_at_send() instead of smb_vfs_ev_glue via 56dee840e48 s3:smbd: pass (raw) ev to SMB_VFS_GET_DOS_ATTRIBUTES_SEND() instead of smb_vfs_ev_glue via 7f7ce0ec2f3 s3:smbd: let SMB_VFS_GETXATTRAT_SEND() do explicit impersonation via a62bc3f221b s3:torture: call per_thread_cwd_check() in vfstest.c main() via 16166542753 s3:smbd: prepare the usage of per_thread_cwd_*() functions via 92c2ed4db29 s3:lib: add per_thread_cwd_{check,supported,disable,activate}() helper functions via ad04a6ce49f s3:lib: add root_unix_token() from 8af4ec752a5 selftest: Improve an error message
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 168079b2c3693c08ac994e4ee61be101986a4bae Author: Stefan Metzmacher <me...@samba.org> Date: Tue Jan 8 15:25:22 2019 +0100 tevent: deprecate tevent_wrapper api again Samba doesn't use it anymore and we don't want to invite new users of that api without further discussion. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Autobuild-User(master): Stefan Metzmacher <me...@samba.org> Autobuild-Date(master): Sat Jan 12 03:12:09 CET 2019 on sn-devel-144 commit dcd0edfdc90a009a87fc8b0bafbd09e2711ebccb Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:26:15 2018 +0100 Revert "smbd: add smbd_server_connection->raw_ev_ctx pointer" This reverts commit 6114f9545fa856717220658e87f2a60f6767b7f4. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 47c443b479566bafc01ec6e3f94f2481d9659806 Author: Ralph Boehme <s...@samba.org> Date: Tue Jan 8 10:39:56 2019 +0100 vfs_aio_pthread: add sync fallback Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit a307e798ddfc4f8fa32e22827c39f5e1f0e87d47 Author: Ralph Boehme <s...@samba.org> Date: Tue Jan 8 10:34:11 2019 +0100 vfs_aio_pthread: store conn instead of sconn in aio_open_private_data Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit e2f46c9333e2919fbdfddc1f6049478fe07765aa Author: Ralph Boehme <s...@samba.org> Date: Tue Jan 8 10:32:16 2019 +0100 vfs_aio_pthread: use struct initializer for aio_open_private_data Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 2f406fee523692e4dc4b11b13637dcbabaabe8c7 Author: Ralph Boehme <s...@samba.org> Date: Tue Jan 8 07:38:53 2019 +0100 vfs_default: add sync fallback to fsync_send/recv Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 4673a8b9e36647500428a0283edb5ed645ff0da4 Author: Ralph Boehme <s...@samba.org> Date: Tue Jan 8 07:38:42 2019 +0100 vfs_default: add sync fallback to pwrite_send/recv Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit bc539d8104fcf7954331df1d4385ad84343c919a Author: Ralph Boehme <s...@samba.org> Date: Tue Jan 8 07:38:04 2019 +0100 vfs_default: add sync fallback to pread_send/recv Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 57e2fb018f2040d1e2d487a4590f103022496b44 Author: Ralph Boehme <s...@samba.org> Date: Mon Jan 7 21:10:19 2019 +0100 s3:smbd: don't use async dosmode if per-thread cwd is not available The additional overhead for the async processing should be avoided when we know the lower level has to fallback to sync processing anyway. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 5d8f495b01cb4d6797f9165b1e45dcaa31da7e44 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 28 13:25:57 2018 +0100 s3:smbd: use passed in ev in smbd_smb2_query_directory_send() The ev argument is also a raw ev. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 6ec96ac70989fcd65abbde04b233d2282f6bf398 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:26:08 2018 +0100 Revert "vfs_glusterfs: explain that/why we use the raw tevent_context in init_gluster_aio()" This reverts commit b0af5715b0a7592a9728e0b76f653b9ab6228708. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 46d3a1541a62bf0b2ae4d4ebc5f615b679dd7335 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:26:03 2018 +0100 Revert "smbd: explain that/why we use the raw tevent_context for update_write_time_handler()" This reverts commit 7cfafaf190643eb28fc95d21a02a4e5e529e16d1. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit bcb4723aacd165a3eb5d5bf3e9b68f444813f7f7 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:24:37 2018 +0100 Revert "smbd: explain that/why we use the raw tevent_context for lease_timeout_handler()" This reverts commit 52f098d38da72d6eff3c4cac61487da897a8651c. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 4036fc894f7ebbad37607b8661aa064009f8e0d3 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:23:52 2018 +0100 Revert "smbd: explain that/why we use the raw tevent_context for oplock_timeout_handler()" This reverts commit e73eaa3c8004d3d8aff316cdb26b0bef85eceaca. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 5afd19198b8605ad921777aed0c2f9c89a1305db Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:23:43 2018 +0100 Revert "smbd: explain that/why we use the raw tevent_context for do_break_to_none()" This reverts commit 1d5210b615035e46b90758ac7aa4ceec9174bee5. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit ac597b0706926850f8d599c54077946b3a726a9a Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:21:06 2018 +0100 Revert "smbd: explain that/why we use the raw tevent_context for linux_oplock_signal_handler()" This reverts commit dc517b20f60a156d73fdd551557eb1d4366dfdeb. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 523a64e25d88b9924f34ecb24925b400bac6d8d7 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:21:04 2018 +0100 Revert "smbd: use raw_ev_ctx to clear the MSG_SMB_CONF_UPDATED registration" This reverts commit f5f9b719741465c7be3de20a6a69ec106ecc4568. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 296a15a00e4dc7a530cc8b895d767867ab8d4c12 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:21:01 2018 +0100 Revert "smbd: add smbd_server_connection->{root,guest}_ev_ctx pointer" This reverts commit 146938217ed1ab9a7a9f38c055fec5513cbd5c4d. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 50995917905988843074b44d82e59a1f927ccb58 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:20:58 2018 +0100 Revert "smbd: use sconn->root_ev_ctx for brl_timeout_fn()" This reverts commit 182991c26c8149c79b13a277b9822efc49fd1df0. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 9d47128f7c9346cc673e341967a1cd7a53ecabbc Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:20:54 2018 +0100 Revert "smbd: use sconn->root_ev_ctx for smbd_sig_{term,hup}_handler()" This reverts commit c835ffa72ddfd2431d22909148913b50f0d829d1. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit de10c61105391940baecb9b4c6980e5e630550c1 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:19:20 2018 +0100 Revert "smbd: add an effective connection_struct->user_ev_ctx that holds the event context used for the current user" This reverts commit f2df8be16be9dccd3d10ec060f1efbe5007a28c6. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 88016bac86a727de16af72766e859c5821a0b20c Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:18:55 2018 +0100 Revert "smbd: add an effective {smb,smbd_smb2}_request->ev_ctx that holds the event context used for the request processing" This reverts commit 894e5001c747ce765dad5517778dda55d7d1f4d9. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 122e141b465d90b76334eaf75331949e34fd91d3 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 15:17:22 2018 +0100 Revert "smbd: remove unused smbd_server_connection->ev_ctx" This reverts commit 721fbbfa7001b2788602106101f0407483894322. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 2a62a98f5c7107f2f83c0bfc2892243d83e2c88a Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 12:48:30 2018 +0100 Revert "s3:messages: protect against usage of wrapper tevent_context objects for messaging" This reverts commit 7f2afc20e1b6397c364a98d1be006377c95e4665. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 1c3676f3aa9c1564eb140a24ced5ee72b859b87f Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 12:45:42 2018 +0100 Revert "s3:messages: allow messaging_{dgm,ctdb}_register_tevent_context() to use wrapper tevent_context" This reverts commit 660cf86639753edaa7a7a21a5b5ae207ae7d4260. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 26107832cd9d200fb171ef1f991d7ef5478cac18 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 12:45:28 2018 +0100 Revert "s3:messages: allow messaging_dgm_ref() to use wrapper tevent_context" This reverts commit 9dc332060cf5f249ea887dbc60ec7a39b6f91120. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit e2a5272ac6831b407a0c51bb8615252ec68be6a8 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 12:45:15 2018 +0100 Revert "s3:messages: allow messaging_filtered_read_send() to use wrapper tevent_context" This reverts commit 2b05f1098187e00166649c8ea7c63e6901b9d242. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 0bd10a48e4c08d1eb3a20e79d952b3c0f12be46a Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 12:41:25 2018 +0100 Revert "s4:messaging: make sure only imessaging_client_init() can be used with a wrapper tevent_context wrapper" This reverts commit e186d6a06b1b300256a2cb4138f0532d518d0597. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 78fa44083218adef59a27c35794be51b8bfd1caa Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 11:42:45 2018 +0100 Revert "smbd: add [un]become_guest() helper functions" This reverts commit 7b5a47b84696e8e5c26207bd398742b883e598c2. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 3aaf7c1470644ad91b456125ee046333f1f051f1 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 11:41:57 2018 +0100 Revert "smbd: add smbd_impersonate_debug_create() helper" This reverts commit 23319ef5a2eff4811b685d4ab54179efc49bac99. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit e717c9035ef643b8de97c0ee473670d693690900 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 11:38:36 2018 +0100 Revert "smbd: add simple noop smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create() wrappers" This reverts commit 5285966e67cbee8519015df12a15e938e85e6ee7. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 97a7f8864f34d3dcf3c31fb16b7f39f047580bd8 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 11:38:34 2018 +0100 Revert "smbd: make use of smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create() wrappers" This reverts commit 0dcaa0707bad67f7bfaa10ccaf167bfefbe87a0c. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 864e985168d0622c51b351974180c5b1dfd5dc60 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 11:38:27 2018 +0100 Revert "smbd: implement smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create() wrappers" This reverts commit 1b804f7ae23f54a6c1004e5ff17b9df1376b5adb. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit ac17919ae306514aeb668cf422ce46daa3897ae3 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 11:37:16 2018 +0100 Revert "smbd: avoid explicit change_to_user() in defer_rename_done() already done by impersonation" This reverts commit e37e41b3cac52e3623f0c79f83733a51edb35c10. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 3747dcb41f1973f291b812343b3130619331210c Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 11:37:03 2018 +0100 Revert "smbd: remove unused change_to_root_user() from smbd_sig_hup_handler()" This reverts commit d0b1f96f086bdd613644f64b3f75ee8c4388f674. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 718cc7a0d70e57b32db986e2cb3ae3007c4294c5 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 11:36:43 2018 +0100 Revert "smbd: remove unused change_to_root_user() from brl_timeout_fn()" This reverts commit c310647e560abc2343ef2ff0ab15daab0fba2650. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 8e03cbe868de35055fa228af906330a3e0ac0c5e Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 28 09:03:45 2018 +0100 Revert "pthreadpool: split out pthreadpool_tevent_job from pthreadpool_tevent_job_state" This reverts commit 245d684d28dab630f3d47ff61006a1fe3e5eeefa. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 44900b043388461cc1777a57452848fd67d2892f Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 28 09:03:34 2018 +0100 Revert "pthreadpool: add pthreadpool_tevent_job_cancel()" This reverts commit 791c05144ee9296024cc0fdebe4afeaaf67e26bc. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 9e4bc1f4a9b0f9400e198680dfddfa8cd112ce2b Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 28 09:02:54 2018 +0100 Revert "pthreadpool: maintain a global list of orphaned pthreadpool_tevent_jobs" This reverts commit 25756425aaf5465e56ea809cd415b6a387848919. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 991ca9b56460912ff1024f9ff443200195e507fa Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:46:13 2018 +0100 Revert "pthreadpool: add some lockless coordination between the main and job threads" This reverts commit 9656b8d8ee11ee351870286f16ea8fbe49112292. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit d818e51174e8d5684719b7e09dcd2d83c315944d Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:44:49 2018 +0100 Revert "pthreadpool: add helgrind magic to PTHREAD_TEVENT_JOB_THREAD_FENCE_*()" This reverts commit 9b73fda926eb8493e80012794483039be66d4e6c. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 7882941b7336c97cc68c915e07c535d2b69f181c Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:44:32 2018 +0100 Revert "pthreadpool: maintain a list of job_states on each pthreadpool_tevent_glue" This reverts commit aa9b64eccfd037941512bad108c4e3946714a502. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 42e2ab7e9973e271cd7df4a1a22feaac1b8c0fd7 Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:44:22 2018 +0100 Revert "pthreadpool: add a comment about a further optimization in pthreadpool_tevent_job_destructor()" This reverts commit f23cac39b36b026650e0922c78fe0fd3fe567e35. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 7fd9bc3b6e51b818a0c2e39631f6667a993081ff Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:44:07 2018 +0100 Revert "pthreadpool: test cancelling and freeing pending pthreadpool_tevent jobs/pools" This reverts commit 40d15260d24d0071732f47873f395fce29b8a6f4. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 622ba5191d97409bd50f53169ebdadb2a4c2a84f Author: Ralph Boehme <s...@samba.org> Date: Mon Jan 7 21:27:19 2019 +0100 Revert "pthreadpool: add pthreadpool_tevent_[current_job_]per_thread_cwd()" This reverts commit 12a45ee1a66379ba7562729b835ce0e2e4bfb3b3. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit f4d6c48c65bee34a6b4a433914008fe0a08e414d Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:43:25 2018 +0100 Revert "pthreadpool: add tests for pthreadpool_tevent_[current_job_]per_thread_cwd()" This reverts commit fbafdc99ef2cef11a1a28e795ffe965cb53ef7fa. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit e94cd84bbf87ee42495286d6ab9712ba35eaf23d Author: Ralph Boehme <s...@samba.org> Date: Mon Jan 7 18:35:27 2019 +0100 Revert "pthreadpool: call unshare(CLONE_FS) if available" This reverts commit 65e4742d168454df6507d9e74993749063435dd6. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 67015e13ca24a23d66ef4e465672288ba59fb889 Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:43:07 2018 +0100 Revert "pthreadpool: add pthreadpool_restart_check[_monitor_{fd,drain}]()" This reverts commit 3c4cdb290723432b00ff9ff88b892cb4e66e76cd. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 9b7d2257996c805e63b3d612141c1799f8eb2faa Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:42:53 2018 +0100 Revert "pthreadpool: implement pthreadpool_tevent_wrapper_create() infrastructure" This reverts commit f9745d8b5234091c38e93ed57a255120b61f3ad7. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit d032210d9725a9fa267c34093f95def074dc22f3 Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:42:37 2018 +0100 Revert "pthreadpool: test cancelling and freeing jobs of a wrapped pthreadpool_tevent" This reverts commit fb6b6cf3e43165ced4b1039f2683d19f277c0792. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 29fc7c7db788b1bb200e3a4019d42c045ad0d582 Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:34:20 2018 +0100 smbd: rename sconn->raw_thread_pool to sconn->pool This is basically a revert of commit 2be7518ae5a3c046f5fca04ecc83f9f7044eac74. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 8074922c267677434e6174a2e74b2b7959762014 Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:34:00 2018 +0100 Revert "smbd: introduce sconn->sync_thread_pool" This reverts commit 0c97226356f2ba5f01a58d361371055caf11e2a7. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit cedbfbd9b86c9c4f915b19b341cada4c93db7cff Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 28 13:08:14 2018 +0100 Revert "s3: vfs: add smb_vfs_ev_glue" This reverts commit 1251a536df4b1df58d9ddacab03d3ebe6f4e5b60. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 29dd6f3e59055a17fa3d6a63619773f940e63374 Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:25:32 2018 +0100 Revert "s3: vfs: add user_vfs_evg to connection_struct" This reverts commit 2dd95c1c38b9e1ce32d3d1081b6ec177910087a4. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 56f7694481765d9f99311c381efe5261d7158d2d Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:24:51 2018 +0100 Revert "vfs_aio_pthread: use event context and threadpool from user_vfs_evg" This reverts commit cd37badc02b3e56f974168b28447444cd54ee541. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 96332ed100013cb89e92ae3f01a2f46136af3bd2 Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:23:48 2018 +0100 Revert "pthreadpool: we need to use pthreadpool_tevent_per_thread_cwd() on the callers pool" This reverts commit ff863f2d98ac5e12073af824b794404c3d7198c5. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit a75f5de15dba1c9f41a2d86c4fa6573764d4cb8d Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:12:34 2018 +0100 Revert "pthreadpool: ignore the return value of poll(NULL, 0UL, 1)" This reverts commit 6da0d68f49bbd82f5a08427779c9f5ebd6f755aa. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 57c7aaa36d2d146065cee78306cd38c0df34cd93 Author: Ralph Boehme <s...@samba.org> Date: Sun Dec 23 09:12:10 2018 +0100 Revert "pthreadpool: reset monitor_fd after calling tevent_fd_set_auto_close()" This reverts commit f68b5ee75f002ed542a8423070fb01e3b0e83f65. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit edb75eeb56d97c9b8b47df731626984ae7553411 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 28 12:19:08 2018 +0100 s3:smbd: pass (raw) ev to fetch_dos_mode_send instead of smb_vfs_ev_glue Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 9f3d9ba49b015e9958c5995e18300b396cadaf81 Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 28 12:16:27 2018 +0100 s3:smbd: pass (raw) ev to dos_mode_at_send() instead of smb_vfs_ev_glue Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 56dee840e48c327b0d2136f1d7dd36c63f439f7e Author: Ralph Boehme <s...@samba.org> Date: Fri Dec 28 12:12:20 2018 +0100 s3:smbd: pass (raw) ev to SMB_VFS_GET_DOS_ATTRIBUTES_SEND() instead of smb_vfs_ev_glue This also removes smb_vfs_ev_glue_[push|pop]_use() as the only caller got removed. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 7f7ce0ec2f3e3cfb46314e5ad3ea6b5c49085f1d Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 27 16:32:46 2018 +0100 s3:smbd: let SMB_VFS_GETXATTRAT_SEND() do explicit impersonation SMB_VFS_GETXATTRAT_SEND() gets passed a raw event context and the default implementation uses that as well a raw threadpool. Impersonation is done explicitly instead of by the tevent and pthreadpool wrappers. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit a62bc3f221bd7d9db6cdbeb89f2c03c6e81eb98d Author: Stefan Metzmacher <me...@samba.org> Date: Fri Jan 11 13:15:58 2019 +0100 s3:torture: call per_thread_cwd_check() in vfstest.c main() Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit 16166542753264ae21115790744af535e6f2c859 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Jan 11 13:13:04 2019 +0100 s3:smbd: prepare the usage of per_thread_cwd_*() functions Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit 92c2ed4db29c8fa4e5989b5f6d611752bdaa523d Author: Stefan Metzmacher <me...@samba.org> Date: Fri Jan 11 12:47:40 2019 +0100 s3:lib: add per_thread_cwd_{check,supported,disable,activate}() helper functions Only Linux it's possible to have a per thread current working directory using unshare(CLONE_FS). Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit ad04a6ce49fc3811a62a3c736305cc06fb2611b9 Author: Ralph Boehme <s...@samba.org> Date: Fri Mar 16 19:01:20 2018 +0100 s3:lib: add root_unix_token() Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> ----------------------------------------------------------------------- Summary of changes: examples/VFS/skel_opaque.c | 6 +- examples/VFS/skel_transparent.c | 10 +- lib/pthreadpool/pthreadpool.c | 315 ------ lib/pthreadpool/pthreadpool.h | 81 -- lib/pthreadpool/pthreadpool_sync.c | 25 - lib/pthreadpool/pthreadpool_tevent.c | 1082 ++---------------- lib/pthreadpool/pthreadpool_tevent.h | 55 - lib/pthreadpool/tests_cmocka.c | 1151 ------------------- lib/tevent/testsuite.c | 1 + lib/tevent/tevent.h | 17 +- lib/tevent/tevent_fd.c | 1 + lib/tevent/tevent_immediate.c | 1 + lib/tevent/tevent_signal.c | 1 + lib/tevent/tevent_timed.c | 1 + lib/tevent/tevent_wrapper.c | 1 + source3/include/proto.h | 8 + source3/include/vfs.h | 47 +- source3/include/vfs_macros.h | 8 +- source3/lib/messages.c | 37 +- source3/lib/messages_ctdb.c | 30 +- source3/lib/messages_ctdb_ref.c | 12 - source3/lib/messages_dgm.c | 36 +- source3/lib/messages_dgm_ref.c | 12 - source3/lib/per_thread_cwd.c | 156 +++ source3/lib/util.c | 33 + source3/modules/vfs_aio_pthread.c | 96 +- source3/modules/vfs_default.c | 247 ++++- source3/modules/vfs_full_audit.c | 10 +- source3/modules/vfs_glusterfs.c | 11 +- source3/modules/vfs_not_implemented.c | 6 +- source3/modules/vfs_readonly.c | 1 - source3/modules/vfs_time_audit.c | 10 +- source3/modules/vfs_xattr_tdb.c | 3 +- source3/smbd/aio.c | 8 +- source3/smbd/blocking.c | 9 +- source3/smbd/conn.c | 9 - source3/smbd/dosmode.c | 6 +- source3/smbd/fileio.c | 12 +- source3/smbd/globals.h | 10 +- source3/smbd/ipc.c | 4 +- source3/smbd/msdfs.c | 108 +- source3/smbd/open.c | 8 +- source3/smbd/oplock.c | 41 +- source3/smbd/oplock_linux.c | 14 +- source3/smbd/pipes.c | 8 +- source3/smbd/process.c | 51 +- source3/smbd/proto.h | 34 +- source3/smbd/reply.c | 2 +- source3/smbd/server.c | 7 + source3/smbd/smb2_break.c | 4 +- source3/smbd/smb2_close.c | 2 +- source3/smbd/smb2_create.c | 6 +- source3/smbd/smb2_flush.c | 2 +- source3/smbd/smb2_getinfo.c | 2 +- source3/smbd/smb2_glue.c | 1 - source3/smbd/smb2_ioctl.c | 2 +- source3/smbd/smb2_ioctl_named_pipe.c | 2 +- source3/smbd/smb2_lock.c | 10 +- source3/smbd/smb2_notify.c | 4 +- source3/smbd/smb2_query_directory.c | 22 +- source3/smbd/smb2_read.c | 2 +- source3/smbd/smb2_server.c | 2 - source3/smbd/smb2_sesssetup.c | 4 +- source3/smbd/smb2_setinfo.c | 13 +- source3/smbd/smb2_tcon.c | 4 +- source3/smbd/smb2_write.c | 2 +- source3/smbd/uid.c | 1952 --------------------------------- source3/smbd/vfs.c | 906 +-------------- source3/torture/vfstest.c | 2 + source3/wscript_build | 1 + source4/lib/messaging/messaging.c | 28 +- wscript | 12 +- 72 files changed, 696 insertions(+), 6131 deletions(-) create mode 100644 source3/lib/per_thread_cwd.c Changeset truncated at 500 lines: diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 054de50197e..6510ef30d6f 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -714,12 +714,11 @@ struct skel_get_dos_attributes_state { static struct tevent_req *skel_get_dos_attributes_send( TALLOC_CTX *mem_ctx, - const struct smb_vfs_ev_glue *evg, + struct tevent_context *ev, struct vfs_handle_struct *handle, files_struct *dir_fsp, struct smb_filename *smb_fname) { - struct tevent_context *ev = smb_vfs_ev_glue_ev_ctx(evg); struct tevent_req *req = NULL; struct skel_get_dos_attributes_state *state = NULL; @@ -873,14 +872,13 @@ struct skel_getxattrat_state { static struct tevent_req *skel_getxattrat_send( TALLOC_CTX *mem_ctx, - const struct smb_vfs_ev_glue *evg, + struct tevent_context *ev, struct vfs_handle_struct *handle, files_struct *dir_fsp, const struct smb_filename *smb_fname, const char *xattr_name, size_t alloc_hint) { - struct tevent_context *ev = smb_vfs_ev_glue_ev_ctx(evg); struct tevent_req *req = NULL; struct skel_getxattrat_state *state = NULL; diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index cff52fa185e..fc892a23208 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -895,12 +895,11 @@ static void skel_get_dos_attributes_done(struct tevent_req *subreq); static struct tevent_req *skel_get_dos_attributes_send( TALLOC_CTX *mem_ctx, - const struct smb_vfs_ev_glue *evg, + struct tevent_context *ev, struct vfs_handle_struct *handle, files_struct *dir_fsp, struct smb_filename *smb_fname) { - struct tevent_context *ev = smb_vfs_ev_glue_ev_ctx(evg); struct tevent_req *req = NULL; struct skel_get_dos_attributes_state *state = NULL; struct tevent_req *subreq = NULL; @@ -912,7 +911,7 @@ static struct tevent_req *skel_get_dos_attributes_send( } subreq = SMB_VFS_NEXT_GET_DOS_ATTRIBUTES_SEND(mem_ctx, - evg, + ev, handle, dir_fsp, smb_fname); @@ -1094,14 +1093,13 @@ static void skel_getxattrat_done(struct tevent_req *subreq); static struct tevent_req *skel_getxattrat_send( TALLOC_CTX *mem_ctx, - const struct smb_vfs_ev_glue *evg, + struct tevent_context *ev, struct vfs_handle_struct *handle, files_struct *dir_fsp, const struct smb_filename *smb_fname, const char *xattr_name, size_t alloc_hint) { - struct tevent_context *ev = smb_vfs_ev_glue_ev_ctx(evg); struct tevent_req *req = NULL; struct skel_getxattrat_state *state = NULL; struct tevent_req *subreq = NULL; @@ -1113,7 +1111,7 @@ static struct tevent_req *skel_getxattrat_send( } subreq = SMB_VFS_NEXT_GETXATTRAT_SEND(state, - evg, + ev, handle, dir_fsp, smb_fname, diff --git a/lib/pthreadpool/pthreadpool.c b/lib/pthreadpool/pthreadpool.c index d482c159941..b6dad310b0d 100644 --- a/lib/pthreadpool/pthreadpool.c +++ b/lib/pthreadpool/pthreadpool.c @@ -24,7 +24,6 @@ #include "system/filesys.h" #include "pthreadpool.h" #include "lib/util/dlinklist.h" -#include "lib/util/blocking.h" #ifdef NDEBUG #undef NDEBUG @@ -54,8 +53,6 @@ struct pthreadpool { */ pthread_cond_t condvar; - int check_pipefd[2]; - /* * Array of jobs */ @@ -116,13 +113,10 @@ struct pthreadpool { * where the forking thread will unlock it again. */ pthread_mutex_t fork_mutex; - - bool per_thread_cwd; }; static pthread_mutex_t pthreadpools_mutex = PTHREAD_MUTEX_INITIALIZER; static struct pthreadpool *pthreadpools = NULL; -static bool pthreadpool_support_thread_cwd = false; static pthread_once_t pthreadpool_atfork_initialized = PTHREAD_ONCE_INIT; static void pthreadpool_prep_atfork(void); @@ -140,7 +134,6 @@ int pthreadpool_init(unsigned max_threads, struct pthreadpool **presult, { struct pthreadpool *pool; int ret; - bool ok; pool = (struct pthreadpool *)malloc(sizeof(struct pthreadpool)); if (pool == NULL) { @@ -158,52 +151,10 @@ int pthreadpool_init(unsigned max_threads, struct pthreadpool **presult, return ENOMEM; } - ret = pipe(pool->check_pipefd); - if (ret != 0) { - free(pool->jobs); - free(pool); - return ENOMEM; - } - - ok = smb_set_close_on_exec(pool->check_pipefd[0]); - if (!ok) { - close(pool->check_pipefd[0]); - close(pool->check_pipefd[1]); - free(pool->jobs); - free(pool); - return EINVAL; - } - ok = smb_set_close_on_exec(pool->check_pipefd[1]); - if (!ok) { - close(pool->check_pipefd[0]); - close(pool->check_pipefd[1]); - free(pool->jobs); - free(pool); - return EINVAL; - } - ret = set_blocking(pool->check_pipefd[0], true); - if (ret == -1) { - close(pool->check_pipefd[0]); - close(pool->check_pipefd[1]); - free(pool->jobs); - free(pool); - return EINVAL; - } - ret = set_blocking(pool->check_pipefd[1], false); - if (ret == -1) { - close(pool->check_pipefd[0]); - close(pool->check_pipefd[1]); - free(pool->jobs); - free(pool); - return EINVAL; - } - pool->head = pool->num_jobs = 0; ret = pthread_mutex_init(&pool->mutex, NULL); if (ret != 0) { - close(pool->check_pipefd[0]); - close(pool->check_pipefd[1]); free(pool->jobs); free(pool); return ret; @@ -212,8 +163,6 @@ int pthreadpool_init(unsigned max_threads, struct pthreadpool **presult, ret = pthread_cond_init(&pool->condvar, NULL); if (ret != 0) { pthread_mutex_destroy(&pool->mutex); - close(pool->check_pipefd[0]); - close(pool->check_pipefd[1]); free(pool->jobs); free(pool); return ret; @@ -223,8 +172,6 @@ int pthreadpool_init(unsigned max_threads, struct pthreadpool **presult, if (ret != 0) { pthread_cond_destroy(&pool->condvar); pthread_mutex_destroy(&pool->mutex); - close(pool->check_pipefd[0]); - close(pool->check_pipefd[1]); free(pool->jobs); free(pool); return ret; @@ -236,19 +183,12 @@ int pthreadpool_init(unsigned max_threads, struct pthreadpool **presult, pool->max_threads = max_threads; pool->num_idle = 0; pool->prefork_cond = NULL; - if (max_threads != 0) { - pool->per_thread_cwd = pthreadpool_support_thread_cwd; - } else { - pool->per_thread_cwd = false; - } ret = pthread_mutex_lock(&pthreadpools_mutex); if (ret != 0) { pthread_mutex_destroy(&pool->fork_mutex); pthread_cond_destroy(&pool->condvar); pthread_mutex_destroy(&pool->mutex); - close(pool->check_pipefd[0]); - close(pool->check_pipefd[1]); free(pool->jobs); free(pool); return ret; @@ -302,15 +242,6 @@ size_t pthreadpool_queued_jobs(struct pthreadpool *pool) return ret; } -bool pthreadpool_per_thread_cwd(struct pthreadpool *pool) -{ - if (pool->stopped) { - return false; - } - - return pool->per_thread_cwd; -} - static void pthreadpool_prepare_pool(struct pthreadpool *pool) { int ret; @@ -412,14 +343,6 @@ static void pthreadpool_child(void) pool->head = 0; pool->num_jobs = 0; pool->stopped = true; - if (pool->check_pipefd[0] != -1) { - close(pool->check_pipefd[0]); - pool->check_pipefd[0] = -1; - } - if (pool->check_pipefd[1] != -1) { - close(pool->check_pipefd[1]); - pool->check_pipefd[1] = -1; - } ret = pthread_cond_init(&pool->condvar, NULL); assert(ret == 0); @@ -437,16 +360,6 @@ static void pthreadpool_child(void) static void pthreadpool_prep_atfork(void) { -#ifdef HAVE_UNSHARE_CLONE_FS - int res; - - /* remember if unshare(CLONE_FS) works. */ - res = unshare(CLONE_FS); - if (res == 0) { - pthreadpool_support_thread_cwd = true; - } -#endif - pthread_atfork(pthreadpool_prepare, pthreadpool_parent, pthreadpool_child); } @@ -482,14 +395,6 @@ static int pthreadpool_free(struct pthreadpool *pool) return ret2; } - if (pool->check_pipefd[0] != -1) { - close(pool->check_pipefd[0]); - pool->check_pipefd[0] = -1; - } - if (pool->check_pipefd[1] != -1) { - close(pool->check_pipefd[1]); - pool->check_pipefd[1] = -1; - } free(pool->jobs); free(pool); @@ -506,15 +411,6 @@ static int pthreadpool_stop_locked(struct pthreadpool *pool) pool->stopped = true; - if (pool->check_pipefd[0] != -1) { - close(pool->check_pipefd[0]); - pool->check_pipefd[0] = -1; - } - if (pool->check_pipefd[1] != -1) { - close(pool->check_pipefd[1]); - pool->check_pipefd[1] = -1; - } - if (pool->num_threads == 0) { return 0; } @@ -599,33 +495,6 @@ static void pthreadpool_server_exit(struct pthreadpool *pool) free_it = (pool->destroyed && (pool->num_threads == 0)); - while (true) { - uint8_t c = 0; - ssize_t nwritten = 0; - - if (pool->check_pipefd[1] == -1) { - break; - } - - nwritten = write(pool->check_pipefd[1], &c, 1); - if (nwritten == -1) { - if (errno == EINTR) { - continue; - } - if (errno == EAGAIN) { - break; - } -#ifdef EWOULDBLOCK - if (errno == EWOULDBLOCK) { - break; - } -#endif - /* ignore ... */ - } - - break; - } - ret = pthread_mutex_unlock(&pool->mutex); assert(ret == 0); @@ -703,13 +572,6 @@ static void *pthreadpool_server(void *arg) struct pthreadpool *pool = (struct pthreadpool *)arg; int res; -#ifdef HAVE_UNSHARE_CLONE_FS - if (pool->per_thread_cwd) { - res = unshare(CLONE_FS); - assert(res == 0); - } -#endif - res = pthread_mutex_lock(&pool->mutex); if (res != 0) { return NULL; @@ -956,183 +818,6 @@ int pthreadpool_add_job(struct pthreadpool *pool, int job_id, return res; } -int pthreadpool_restart_check(struct pthreadpool *pool) -{ - int res; - int unlock_res; - unsigned possible_threads = 0; - unsigned missing_threads = 0; - - assert(!pool->destroyed); - - res = pthread_mutex_lock(&pool->mutex); - if (res != 0) { - return res; - } - - if (pool->stopped) { - /* - * Protect against the pool being shut down while - * trying to add a job - */ - unlock_res = pthread_mutex_unlock(&pool->mutex); - assert(unlock_res == 0); - return EINVAL; - } - - if (pool->num_jobs == 0) { - /* - * This also handles the pool->max_threads == 0 case as it never - * calls pthreadpool_put_job() - */ - unlock_res = pthread_mutex_unlock(&pool->mutex); - assert(unlock_res == 0); - return 0; - } - - if (pool->num_idle > 0) { - /* - * We have idle threads and pending jobs, - * this means we better let all threads - * start and check for pending jobs. - */ - res = pthread_cond_broadcast(&pool->condvar); - assert(res == 0); - } - - if (pool->num_threads < pool->max_threads) { - possible_threads = pool->max_threads - pool->num_threads; - } - - if (pool->num_idle < pool->num_jobs) { - missing_threads = pool->num_jobs - pool->num_idle; - } - - missing_threads = MIN(missing_threads, possible_threads); - - while (missing_threads > 0) { - - res = pthreadpool_create_thread(pool); - if (res != 0) { - break; - } - - missing_threads--; - } - - if (missing_threads == 0) { - /* - * Ok, we recreated all thread we need. - */ - unlock_res = pthread_mutex_unlock(&pool->mutex); - assert(unlock_res == 0); - return 0; - } - - if (pool->num_threads != 0) { - /* - * At least one thread is still available, let - * that one run the queued jobs. - */ - unlock_res = pthread_mutex_unlock(&pool->mutex); - assert(unlock_res == 0); - return 0; - } - - /* - * There's no thread available to run any pending jobs. - * The caller may want to cancel the jobs and destroy the pool. - * But that's up to the caller. - */ - unlock_res = pthread_mutex_unlock(&pool->mutex); - assert(unlock_res == 0); - - return res; -} - -int pthreadpool_restart_check_monitor_fd(struct pthreadpool *pool) -{ - int fd; - int ret; - bool ok; - - if (pool->stopped) { - errno = EINVAL; - return -1; - } - - if (pool->check_pipefd[0] == -1) { - errno = ENOSYS; - return -1; - } - - fd = dup(pool->check_pipefd[0]); - if (fd == -1) { - return -1; - } - - ok = smb_set_close_on_exec(fd); - if (!ok) { - int saved_errno = errno; - close(fd); - errno = saved_errno; - return -1; - } - - ret = set_blocking(fd, false); - if (ret == -1) { - int saved_errno = errno; - close(fd); - errno = saved_errno; - return -1; - } - - return fd; -} - -int pthreadpool_restart_check_monitor_drain(struct pthreadpool *pool) -{ - if (pool->stopped) { - return EINVAL; - } - - if (pool->check_pipefd[0] == -1) { - return ENOSYS; - } - - while (true) { - uint8_t buf[128]; - ssize_t nread; - - nread = read(pool->check_pipefd[0], buf, sizeof(buf)); -- Samba Shared Repository