From 67f89bb3300a4cedd2bb01f81a6ede21b05377e0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 20 Jun 2019 12:20:39 +0200 Subject: smbd: Return "blocker_pid" from do_lock() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/modules/vfs_fruit.c | 60 +++++++++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 16 deletions(-) (limited to 'source3/modules/vfs_fruit.c') diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index f2964769a74..d8e0dbe63e6 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2746,10 +2746,17 @@ static NTSTATUS fruit_check_access(vfs_handle_struct *handle, off = access_to_netatalk_brl(fork_type, FILE_READ_DATA); br_lck = do_lock( - handle->conn->sconn->msg_ctx, fsp, - fsp->op->global->open_persistent_id, 1, off, - READ_LOCK, POSIX_LOCK, false, - &status, NULL); + handle->conn->sconn->msg_ctx, + fsp, + fsp->op->global->open_persistent_id, + 1, + off, + READ_LOCK, + POSIX_LOCK, + false, /* blocking_lock */ + &status, + NULL, + NULL); TALLOC_FREE(br_lck); @@ -2763,10 +2770,17 @@ static NTSTATUS fruit_check_access(vfs_handle_struct *handle, off = denymode_to_netatalk_brl(fork_type, DENY_READ); br_lck = do_lock( - handle->conn->sconn->msg_ctx, fsp, - fsp->op->global->open_persistent_id, 1, off, - READ_LOCK, POSIX_LOCK, false, - &status, NULL); + handle->conn->sconn->msg_ctx, + fsp, + fsp->op->global->open_persistent_id, + 1, + off, + READ_LOCK, + POSIX_LOCK, + false, /* blocking_lock */ + &status, + NULL, + NULL); TALLOC_FREE(br_lck); @@ -2780,10 +2794,17 @@ static NTSTATUS fruit_check_access(vfs_handle_struct *handle, off = access_to_netatalk_brl(fork_type, FILE_WRITE_DATA); br_lck = do_lock( - handle->conn->sconn->msg_ctx, fsp, - fsp->op->global->open_persistent_id, 1, off, - READ_LOCK, POSIX_LOCK, false, - &status, NULL); + handle->conn->sconn->msg_ctx, + fsp, + fsp->op->global->open_persistent_id, + 1, + off, + READ_LOCK, + POSIX_LOCK, + false, + &status, + NULL, + NULL); TALLOC_FREE(br_lck); @@ -2797,10 +2818,17 @@ static NTSTATUS fruit_check_access(vfs_handle_struct *handle, off = denymode_to_netatalk_brl(fork_type, DENY_WRITE); br_lck = do_lock( - handle->conn->sconn->msg_ctx, fsp, - fsp->op->global->open_persistent_id, 1, off, - READ_LOCK, POSIX_LOCK, false, - &status, NULL); + handle->conn->sconn->msg_ctx, + fsp, + fsp->op->global->open_persistent_id, + 1, + off, + READ_LOCK, + POSIX_LOCK, + false, + &status, + NULL, + NULL); TALLOC_FREE(br_lck); -- cgit v1.2.1