summaryrefslogtreecommitdiff
path: root/source3/smbd/vfs.c
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-12-27 16:32:46 +0100
committerStefan Metzmacher <metze@samba.org>2019-01-11 23:11:11 +0100
commit7f7ce0ec2f3e3cfb46314e5ad3ea6b5c49085f1d (patch)
treeb1b8085d4995cb4b345db39c20f46953d46f89b1 /source3/smbd/vfs.c
parenta62bc3f221bd7d9db6cdbeb89f2c03c6e81eb98d (diff)
downloadsamba-7f7ce0ec2f3e3cfb46314e5ad3ea6b5c49085f1d.tar.gz
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 <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/smbd/vfs.c')
-rw-r--r--source3/smbd/vfs.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 351cd0a5567..7d46ec9273b 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -3539,7 +3539,7 @@ static void smb_vfs_call_getxattrat_done(struct tevent_req *subreq);
struct tevent_req *smb_vfs_call_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,
@@ -3549,7 +3549,6 @@ struct tevent_req *smb_vfs_call_getxattrat_send(
struct tevent_req *req = NULL;
struct smb_vfs_call_getxattrat_state *state = NULL;
struct tevent_req *subreq = NULL;
- bool ok;
req = tevent_req_create(mem_ctx, &state,
struct smb_vfs_call_getxattrat_state);
@@ -3560,24 +3559,18 @@ struct tevent_req *smb_vfs_call_getxattrat_send(
VFS_FIND(getxattrat_send);
state->recv_fn = handle->fns->getxattrat_recv_fn;
- ok = smb_vfs_ev_glue_push_use(evg, req);
- if (!ok) {
- tevent_req_error(req, EIO);
- return tevent_req_post(req, evg->return_ev);
- }
-
subreq = handle->fns->getxattrat_send_fn(mem_ctx,
- evg->next_glue,
+ ev,
handle,
dir_fsp,
smb_fname,
xattr_name,
alloc_hint);
- smb_vfs_ev_glue_pop_use(evg);
-
if (tevent_req_nomem(subreq, req)) {
- return tevent_req_post(req, evg->return_ev);
+ return tevent_req_post(req, ev);
}
+ tevent_req_defer_callback(req, ev);
+
tevent_req_set_callback(subreq, smb_vfs_call_getxattrat_done, req);
return req;
}