s3/vfs: rename SMB_VFS_STRICT_LOCK to SMB_VFS_STRICT_LOCK_CHECK
authorRalph Boehme <slow@samba.org>
Sun, 9 Jul 2017 12:34:10 +0000 (14:34 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 11 Jul 2017 01:37:44 +0000 (03:37 +0200)
As per MS-SMB2 and MS-FSA and our SMB_VFS_STRICT_LOCK implementation,
we're merely testing for locks, not setting any.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12887

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 11 03:37:44 CEST 2017 on sn-devel-144

18 files changed:
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/include/vfs_macros.h
source3/locking/locking.c
source3/locking/proto.h
source3/modules/vfs_btrfs.c
source3/modules/vfs_catia.c
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_time_audit.c
source3/smbd/aio.c
source3/smbd/reply.c
source3/smbd/smb2_ioctl_filesys.c
source3/smbd/smb2_read.c
source3/smbd/smb2_write.c
source3/smbd/vfs.c

index 072ec8036b1a28952c6da05cec70ab423a8c60eb..614dcffa928c326a5028aea1a48c81d0c0ad1350 100644 (file)
@@ -687,9 +687,9 @@ static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
        return false;
 }
 
-static bool skel_strict_lock(struct vfs_handle_struct *handle,
-                            struct files_struct *fsp,
-                            struct lock_struct *plock)
+static bool skel_strict_lock_check(struct vfs_handle_struct *handle,
+                                  struct files_struct *fsp,
+                                  struct lock_struct *plock)
 {
        errno = ENOSYS;
        return false;
@@ -1015,7 +1015,7 @@ struct vfs_fn_pointers skel_opaque_fns = {
        .brl_lock_windows_fn = skel_brl_lock_windows,
        .brl_unlock_windows_fn = skel_brl_unlock_windows,
        .brl_cancel_windows_fn = skel_brl_cancel_windows,
-       .strict_lock_fn = skel_strict_lock,
+       .strict_lock_check_fn = skel_strict_lock_check,
        .translate_name_fn = skel_translate_name,
        .fsctl_fn = skel_fsctl,
        .readdir_attr_fn = skel_readdir_attr,
index 9592c17414a4a845f2974fd6461792e2cf9f9207..2f59a3db8706883feed15df47750aa5db82f8b40 100644 (file)
@@ -856,11 +856,11 @@ static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
        return SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
 }
 
-static bool skel_strict_lock(struct vfs_handle_struct *handle,
-                            struct files_struct *fsp,
-                            struct lock_struct *plock)
+static bool skel_strict_lock_check(struct vfs_handle_struct *handle,
+                                  struct files_struct *fsp,
+                                  struct lock_struct *plock)
 {
-       return SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock);
+       return SMB_VFS_NEXT_STRICT_LOCK_CHECK(handle, fsp, plock);
 }
 
 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
@@ -1188,7 +1188,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
        .brl_lock_windows_fn = skel_brl_lock_windows,
        .brl_unlock_windows_fn = skel_brl_unlock_windows,
        .brl_cancel_windows_fn = skel_brl_cancel_windows,
-       .strict_lock_fn = skel_strict_lock,
+       .strict_lock_check_fn = skel_strict_lock_check,
        .translate_name_fn = skel_translate_name,
        .fsctl_fn = skel_fsctl,
        .readdir_attr_fn = skel_readdir_attr,
index bd00e8f031860461190c57db2202fb44fcb924c6..d71d7cc448367cba453ad78ec058a46842189a7e 100644 (file)
 /* Version 37 - Rename SMB_VFS_COPY_CHUNK_SEND/RECV to
                 SMB_VFS_OFFLOAD_READ_SEND/RECV */
 /* Version 37 - Remove SMB_VFS_STRICT_UNLOCK */
+/* Version 37 - Rename SMB_VFS_STRICT_LOCK to
+                SMB_VFS_STRICT_LOCK_CHECK */
 
 #define SMB_VFS_INTERFACE_VERSION 37
 
@@ -849,9 +851,9 @@ struct vfs_fn_pointers {
                                      struct byte_range_lock *br_lck,
                                      struct lock_struct *plock);
 
-       bool (*strict_lock_fn)(struct vfs_handle_struct *handle,
-                              struct files_struct *fsp,
-                              struct lock_struct *plock);
+       bool (*strict_lock_check_fn)(struct vfs_handle_struct *handle,
+                                    struct files_struct *fsp,
+                                    struct lock_struct *plock);
 
        NTSTATUS (*translate_name_fn)(struct vfs_handle_struct *handle,
                                      const char *name,
@@ -1312,9 +1314,9 @@ bool smb_vfs_call_brl_unlock_windows(struct vfs_handle_struct *handle,
 bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle,
                                     struct byte_range_lock *br_lck,
                                     struct lock_struct *plock);
-bool smb_vfs_call_strict_lock(struct vfs_handle_struct *handle,
-                             struct files_struct *fsp,
-                             struct lock_struct *plock);
+bool smb_vfs_call_strict_lock_check(struct vfs_handle_struct *handle,
+                                   struct files_struct *fsp,
+                                   struct lock_struct *plock);
 NTSTATUS smb_vfs_call_translate_name(struct vfs_handle_struct *handle,
                                     const char *name,
                                     enum vfs_translate_direction direction,
index 843d62617d3ebb1af0ab3c7e4a66e8be2b289a24..3cce1925ca1e058cd684fc725378b424afbd3c2b 100644 (file)
 #define SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock) \
        smb_vfs_call_brl_cancel_windows((handle)->next, (br_lck), (plock))
 
-#define SMB_VFS_STRICT_LOCK(conn, fsp, plock) \
-       smb_vfs_call_strict_lock((conn)->vfs_handles, (fsp), (plock))
-#define SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock) \
-       smb_vfs_call_strict_lock((handle)->next, (fsp), (plock))
+#define SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, plock) \
+       smb_vfs_call_strict_lock_check((conn)->vfs_handles, (fsp), (plock))
+#define SMB_VFS_NEXT_STRICT_LOCK_CHECK(handle, fsp, plock) \
+       smb_vfs_call_strict_lock_check((handle)->next, (fsp), (plock))
 
 #define SMB_VFS_TRANSLATE_NAME(conn, name, direction, mem_ctx, mapped_name) \
        smb_vfs_call_translate_name((conn)->vfs_handles, (name), (direction), (mem_ctx), (mapped_name))
index d344731a7266f08daa1dd097a36f47d09082c437..4e9f1bbc681e30144a1b4eb04ef458e8524e6a83 100644 (file)
@@ -104,7 +104,7 @@ void init_strict_lock_struct(files_struct *fsp,
         plock->lock_flav = lp_posix_cifsu_locktype(fsp);
 }
 
-bool strict_lock_default(files_struct *fsp, struct lock_struct *plock)
+bool strict_lock_check_default(files_struct *fsp, struct lock_struct *plock)
 {
        struct byte_range_lock *br_lck;
        int strict_locking = lp_strict_locking(fsp->conn->params);
index ebd80f2963162e83d19c6ae5cd11aa3c557ca432..33184e0fa0a925230f4a711cd225a48fd6c545ab 100644 (file)
@@ -105,8 +105,8 @@ void init_strict_lock_struct(files_struct *fsp,
                                br_off size,
                                enum brl_type lock_type,
                                struct lock_struct *plock);
-bool strict_lock_default(files_struct *fsp,
-                               struct lock_struct *plock);
+bool strict_lock_check_default(files_struct *fsp,
+                              struct lock_struct *plock);
 NTSTATUS query_lock(files_struct *fsp,
                        uint64_t *psmblctx,
                        uint64_t *pcount,
index a90f583d06423569026eb0b221f4ce4047eb1f65..13fd5e34c19db1b2c5406bdb2e0e619f52c2e041 100644 (file)
@@ -317,11 +317,11 @@ static struct tevent_req *btrfs_offload_write_send(struct vfs_handle_struct *han
                                        WRITE_LOCK,
                                        &dest_lck);
 
-               if (!SMB_VFS_STRICT_LOCK(src_fsp->conn, src_fsp, &src_lck)) {
+               if (!SMB_VFS_STRICT_LOCK_CHECK(src_fsp->conn, src_fsp, &src_lck)) {
                        tevent_req_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                        return tevent_req_post(req, ev);
                }
-               if (!SMB_VFS_STRICT_LOCK(dest_fsp->conn, dest_fsp, &dest_lck)) {
+               if (!SMB_VFS_STRICT_LOCK_CHECK(dest_fsp->conn, dest_fsp, &dest_lck)) {
                        tevent_req_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                        return tevent_req_post(req, ev);
                }
index 6e623bce8aa49ff2e6ba7d3f5f00e4ab1996fd16..5cf7476b4b2879361990f11621311da85bc55e8d 100644 (file)
@@ -2370,9 +2370,9 @@ static bool catia_getlock(vfs_handle_struct *handle,
        return ok;
 }
 
-static bool catia_strict_lock(struct vfs_handle_struct *handle,
-                             struct files_struct *fsp,
-                             struct lock_struct *plock)
+static bool catia_strict_lock_check(struct vfs_handle_struct *handle,
+                                   struct files_struct *fsp,
+                                   struct lock_struct *plock)
 {
        struct catia_cache *cc = NULL;
        int ret;
@@ -2383,7 +2383,7 @@ static bool catia_strict_lock(struct vfs_handle_struct *handle,
                return -1;
        }
 
-       ok = SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock);
+       ok = SMB_VFS_NEXT_STRICT_LOCK_CHECK(handle, fsp, plock);
 
        CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
 
@@ -2606,7 +2606,7 @@ static struct vfs_fn_pointers vfs_catia_fns = {
        .realpath_fn = catia_realpath,
        .chflags_fn = catia_chflags,
        .streaminfo_fn = catia_streaminfo,
-       .strict_lock_fn = catia_strict_lock,
+       .strict_lock_check_fn = catia_strict_lock_check,
        .translate_name_fn = catia_translate_name,
        .fsctl_fn = catia_fsctl,
        .get_dos_attributes_fn = catia_get_dos_attributes,
index a03fd8da7b6c30a8c3c0f6ec01f719ab1b229abe..bf857b6b1ca3fc1929aa67d83899ca38a4cd9245 100644 (file)
@@ -1837,7 +1837,7 @@ static NTSTATUS vfswrap_offload_write_loop(struct tevent_req *req)
                                READ_LOCK,
                                &read_lck);
 
-       ok = SMB_VFS_STRICT_LOCK(state->src_fsp->conn,
+       ok = SMB_VFS_STRICT_LOCK_CHECK(state->src_fsp->conn,
                                 state->src_fsp,
                                 &read_lck);
        if (!ok) {
@@ -1894,7 +1894,7 @@ static void vfswrap_offload_write_read_done(struct tevent_req *subreq)
                                WRITE_LOCK,
                                &write_lck);
 
-       ok = SMB_VFS_STRICT_LOCK(state->dst_fsp->conn,
+       ok = SMB_VFS_STRICT_LOCK_CHECK(state->dst_fsp->conn,
                                 state->dst_fsp,
                                 &write_lck);
        if (!ok) {
@@ -2740,14 +2740,14 @@ static bool vfswrap_brl_cancel_windows(struct vfs_handle_struct *handle,
        return brl_lock_cancel_default(br_lck, plock);
 }
 
-static bool vfswrap_strict_lock(struct vfs_handle_struct *handle,
-                               files_struct *fsp,
-                               struct lock_struct *plock)
+static bool vfswrap_strict_lock_check(struct vfs_handle_struct *handle,
+                                     files_struct *fsp,
+                                     struct lock_struct *plock)
 {
        SMB_ASSERT(plock->lock_type == READ_LOCK ||
            plock->lock_type == WRITE_LOCK);
 
-       return strict_lock_default(fsp, plock);
+       return strict_lock_check_default(fsp, plock);
 }
 
 /* NT ACL operations. */
@@ -3078,7 +3078,7 @@ static struct vfs_fn_pointers vfs_default_fns = {
        .brl_lock_windows_fn = vfswrap_brl_lock_windows,
        .brl_unlock_windows_fn = vfswrap_brl_unlock_windows,
        .brl_cancel_windows_fn = vfswrap_brl_cancel_windows,
-       .strict_lock_fn = vfswrap_strict_lock,
+       .strict_lock_check_fn = vfswrap_strict_lock_check,
        .translate_name_fn = vfswrap_translate_name,
        .fsctl_fn = vfswrap_fsctl,
        .set_dos_attributes_fn = vfswrap_set_dos_attributes,
index af5c2c6591fbdf1da330c6718e13159da0d2dd2b..a205007f46f84a5028d6ae5ca7ba2ada55795bc2 100644 (file)
@@ -164,7 +164,7 @@ typedef enum _vfs_op_type {
        SMB_VFS_OP_BRL_LOCK_WINDOWS,
        SMB_VFS_OP_BRL_UNLOCK_WINDOWS,
        SMB_VFS_OP_BRL_CANCEL_WINDOWS,
-       SMB_VFS_OP_STRICT_LOCK,
+       SMB_VFS_OP_STRICT_LOCK_CHECK,
        SMB_VFS_OP_TRANSLATE_NAME,
        SMB_VFS_OP_FSCTL,
        SMB_VFS_OP_OFFLOAD_READ_SEND,
@@ -307,7 +307,7 @@ static struct {
        { SMB_VFS_OP_BRL_LOCK_WINDOWS,  "brl_lock_windows" },
        { SMB_VFS_OP_BRL_UNLOCK_WINDOWS, "brl_unlock_windows" },
        { SMB_VFS_OP_BRL_CANCEL_WINDOWS, "brl_cancel_windows" },
-       { SMB_VFS_OP_STRICT_LOCK, "strict_lock" },
+       { SMB_VFS_OP_STRICT_LOCK_CHECK, "strict_lock_check" },
        { SMB_VFS_OP_TRANSLATE_NAME,    "translate_name" },
        { SMB_VFS_OP_FSCTL,             "fsctl" },
        { SMB_VFS_OP_OFFLOAD_READ_SEND, "offload_read_send" },
@@ -1832,15 +1832,15 @@ static bool smb_full_audit_brl_cancel_windows(struct vfs_handle_struct *handle,
        return result;
 }
 
-static bool smb_full_audit_strict_lock(struct vfs_handle_struct *handle,
-                                      struct files_struct *fsp,
-                                      struct lock_struct *plock)
+static bool smb_full_audit_strict_lock_check(struct vfs_handle_struct *handle,
+                                            struct files_struct *fsp,
+                                            struct lock_struct *plock)
 {
        bool result;
 
-       result = SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock);
+       result = SMB_VFS_NEXT_STRICT_LOCK_CHECK(handle, fsp, plock);
 
-       do_log(SMB_VFS_OP_STRICT_LOCK, result, handle,
+       do_log(SMB_VFS_OP_STRICT_LOCK_CHECK, result, handle,
            "%s:%llu-%llu:%d", fsp_str_do_log(fsp), plock->start,
            plock->size, plock->lock_type);
 
@@ -2576,7 +2576,7 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .brl_lock_windows_fn = smb_full_audit_brl_lock_windows,
        .brl_unlock_windows_fn = smb_full_audit_brl_unlock_windows,
        .brl_cancel_windows_fn = smb_full_audit_brl_cancel_windows,
-       .strict_lock_fn = smb_full_audit_strict_lock,
+       .strict_lock_check_fn = smb_full_audit_strict_lock_check,
        .translate_name_fn = smb_full_audit_translate_name,
        .fsctl_fn = smb_full_audit_fsctl,
        .get_dos_attributes_fn = smb_full_audit_get_dos_attributes,
index 662892bce8ef0bafd7fec0efc5c94786ab98f3d4..91cf87faa118cba36add05a751058d752b3ed3fb 100644 (file)
@@ -1480,7 +1480,7 @@ static struct vfs_fn_pointers glusterfs_fns = {
        .brl_lock_windows_fn = NULL,
        .brl_unlock_windows_fn = NULL,
        .brl_cancel_windows_fn = NULL,
-       .strict_lock_fn = NULL,
+       .strict_lock_check_fn = NULL,
        .translate_name_fn = NULL,
        .fsctl_fn = NULL,
 
index 5985394dd2c2427718817b162b9a2cd1cef17760..7116796cc4668275ab196302061f548168b93570 100644 (file)
@@ -1710,21 +1710,21 @@ static bool smb_time_audit_brl_cancel_windows(struct vfs_handle_struct *handle,
        return result;
 }
 
-static bool smb_time_audit_strict_lock(struct vfs_handle_struct *handle,
-                                      struct files_struct *fsp,
-                                      struct lock_struct *plock)
+static bool smb_time_audit_strict_lock_check(struct vfs_handle_struct *handle,
+                                            struct files_struct *fsp,
+                                            struct lock_struct *plock)
 {
        bool result;
        struct timespec ts1,ts2;
        double timediff;
 
        clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock);
+       result = SMB_VFS_NEXT_STRICT_LOCK_CHECK(handle, fsp, plock);
        clock_gettime_mono(&ts2);
        timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
        if (timediff > audit_timeout) {
-               smb_time_audit_log_fsp("strict_lock", timediff, fsp);
+               smb_time_audit_log_fsp("strict_lock_check", timediff, fsp);
        }
 
        return result;
@@ -2768,7 +2768,7 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .brl_lock_windows_fn = smb_time_audit_brl_lock_windows,
        .brl_unlock_windows_fn = smb_time_audit_brl_unlock_windows,
        .brl_cancel_windows_fn = smb_time_audit_brl_cancel_windows,
-       .strict_lock_fn = smb_time_audit_strict_lock,
+       .strict_lock_check_fn = smb_time_audit_strict_lock_check,
        .translate_name_fn = smb_time_audit_translate_name,
        .fsctl_fn = smb_time_audit_fsctl,
        .get_dos_attributes_fn = smb_time_get_dos_attributes,
index a9d6c0a5948bce5c954a2f81496927c0068a57de..f455d04266aa44c9d611fd061f9df1d9a5113852 100644 (file)
@@ -227,7 +227,7 @@ NTSTATUS schedule_aio_read_and_X(connection_struct *conn,
                &aio_ex->lock);
 
        /* Take the lock until the AIO completes. */
-       if (!SMB_VFS_STRICT_LOCK(conn, fsp, &aio_ex->lock)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &aio_ex->lock)) {
                TALLOC_FREE(aio_ex);
                return NT_STATUS_FILE_LOCK_CONFLICT;
        }
@@ -472,7 +472,7 @@ NTSTATUS schedule_aio_write_and_X(connection_struct *conn,
                &aio_ex->lock);
 
        /* Take the lock until the AIO completes. */
-       if (!SMB_VFS_STRICT_LOCK(conn, fsp, &aio_ex->lock)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &aio_ex->lock)) {
                TALLOC_FREE(aio_ex);
                return NT_STATUS_FILE_LOCK_CONFLICT;
        }
@@ -712,7 +712,7 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
                &aio_ex->lock);
 
        /* Take the lock until the AIO completes. */
-       if (!SMB_VFS_STRICT_LOCK(conn, fsp, &aio_ex->lock)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &aio_ex->lock)) {
                TALLOC_FREE(aio_ex);
                return NT_STATUS_FILE_LOCK_CONFLICT;
        }
@@ -857,7 +857,7 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
                &aio_ex->lock);
 
        /* Take the lock until the AIO completes. */
-       if (!SMB_VFS_STRICT_LOCK(conn, fsp, &aio_ex->lock)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &aio_ex->lock)) {
                TALLOC_FREE(aio_ex);
                return NT_STATUS_FILE_LOCK_CONFLICT;
        }
index 30015f6a8a8f1b8642f527bfbbfeab604355c897..317143f912cd0878deef31a9f9147fe1efc6bfd5 100644 (file)
@@ -3679,7 +3679,7 @@ void reply_readbraw(struct smb_request *req)
            (uint64_t)startpos, (uint64_t)maxcount, READ_LOCK,
            &lock);
 
-       if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                reply_readbraw_error(xconn);
                END_PROFILE(SMBreadbraw);
                return;
@@ -3890,7 +3890,7 @@ Returning short read of maximum allowed for compatibility with Windows 2000.\n",
            (uint64_t)startpos, (uint64_t)numtoread, READ_LOCK,
            &lock);
 
-       if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                reply_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                END_PROFILE(SMBread);
                return;
@@ -3966,7 +3966,7 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
            (uint64_t)startpos, (uint64_t)smb_maxcnt, READ_LOCK,
            &lock);
 
-       if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                reply_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                return;
        }
@@ -4486,7 +4486,7 @@ void reply_writebraw(struct smb_request *req)
                    (uint64_t)startpos, (uint64_t)tcount, WRITE_LOCK,
                    &lock);
 
-               if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+               if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                        reply_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                        error_to_writebrawerr(req);
                        END_PROFILE(SMBwritebraw);
@@ -4684,7 +4684,7 @@ void reply_writeunlock(struct smb_request *req)
                    (uint64_t)startpos, (uint64_t)numtowrite, WRITE_LOCK,
                    &lock);
 
-               if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+               if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                        reply_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                        END_PROFILE(SMBwriteunlock);
                        return;
@@ -4801,7 +4801,7 @@ void reply_write(struct smb_request *req)
                        (uint64_t)startpos, (uint64_t)numtowrite, WRITE_LOCK,
                        &lock);
 
-               if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+               if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                        reply_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                        END_PROFILE(SMBwrite);
                        return;
@@ -5090,7 +5090,7 @@ void reply_write_and_X(struct smb_request *req)
                    (uint64_t)startpos, (uint64_t)numtowrite, WRITE_LOCK,
                    &lock);
 
-               if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+               if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                        reply_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                        goto out;
                }
@@ -5482,7 +5482,7 @@ void reply_writeclose(struct smb_request *req)
                    (uint64_t)startpos, (uint64_t)numtowrite, WRITE_LOCK,
                    &lock);
 
-               if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+               if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                        reply_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                        END_PROFILE(SMBwriteclose);
                        return;
index 054fd936fcc89c4149585e0c2741de8ed42b96cf..79c50219643c497cc003a4efc1572ce28cfd1ab6 100644 (file)
@@ -483,7 +483,7 @@ static NTSTATUS fsctl_zero_data(TALLOC_CTX *mem_ctx,
                                WRITE_LOCK,
                                &lck);
 
-       if (!SMB_VFS_STRICT_LOCK(fsp->conn, fsp, &lck)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(fsp->conn, fsp, &lck)) {
                DEBUG(2, ("failed to lock range for zero-data\n"));
                return NT_STATUS_FILE_LOCK_CONFLICT;
        }
index 6aa62cd82042e3e2b5099e85b66a5f72f84bfc33..ecedf1ef0bf14acf57e60c770024eae200899c9e 100644 (file)
@@ -543,7 +543,7 @@ static struct tevent_req *smbd_smb2_read_send(TALLOC_CTX *mem_ctx,
                                READ_LOCK,
                                &lock);
 
-       if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                tevent_req_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                return tevent_req_post(req, ev);
        }
index a8ebac873707a0f5db2befcaa1fc9d308c4de2f9..5657c6618d2e43ba8d4f86420d0fd848acba6f90 100644 (file)
@@ -354,7 +354,7 @@ static struct tevent_req *smbd_smb2_write_send(TALLOC_CTX *mem_ctx,
                                WRITE_LOCK,
                                &lock);
 
-       if (!SMB_VFS_STRICT_LOCK(conn, fsp, &lock)) {
+       if (!SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, &lock)) {
                tevent_req_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
                return tevent_req_post(req, ev);
        }
index f2861e24dfafde61542c61e8b7d755f864fc865d..dc0d14dc82ffd8e12a166a40c1cdcde71984c446 100644 (file)
@@ -2274,12 +2274,12 @@ const char *smb_vfs_call_connectpath(struct vfs_handle_struct *handle,
        return handle->fns->connectpath_fn(handle, smb_fname);
 }
 
-bool smb_vfs_call_strict_lock(struct vfs_handle_struct *handle,
-                             struct files_struct *fsp,
-                             struct lock_struct *plock)
+bool smb_vfs_call_strict_lock_check(struct vfs_handle_struct *handle,
+                                   struct files_struct *fsp,
+                                   struct lock_struct *plock)
 {
-       VFS_FIND(strict_lock);
-       return handle->fns->strict_lock_fn(handle, fsp, plock);
+       VFS_FIND(strict_lock_check);
+       return handle->fns->strict_lock_check_fn(handle, fsp, plock);
 }
 
 NTSTATUS smb_vfs_call_translate_name(struct vfs_handle_struct *handle,