[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Jul 11 01:38:03 UTC 2017


The branch, master has been updated
       via  6746627 s3/vfs: rename SMB_VFS_STRICT_LOCK to SMB_VFS_STRICT_LOCK_CHECK
       via  c9172c5 s3/vfs: remove SMB_VFS_STRICT_UNLOCK
       via  77cbced s3:smbd: consistently use talloc_tos() memory for rpc_pipe_open_interface()
      from  305eb1b vfs_fruit: fix a typo

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 67466271c26ca10c6bce6a51f9dd97a22258f8a4
Author: Ralph Boehme <slow at samba.org>
Date:   Sun Jul 9 14:34:10 2017 +0200

    s3/vfs: rename SMB_VFS_STRICT_LOCK to SMB_VFS_STRICT_LOCK_CHECK
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Jul 11 03:37:44 CEST 2017 on sn-devel-144

commit c9172c5a4505eb18cb4645e2436eabcc93ec67e1
Author: Ralph Boehme <slow at samba.org>
Date:   Sun Jul 9 14:21:21 2017 +0200

    s3/vfs: remove SMB_VFS_STRICT_UNLOCK
    
    It's just a noop, so let's remove it. SMB_VFS_STRICT_LOCK doesn't set
    logs, it just checks for the presence of incompatible locks.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12887
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 77cbced5d2f8bf65c8d02f5edfaba8cbad519d08
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jul 10 11:29:58 2017 +0200

    s3:smbd: consistently use talloc_tos() memory for rpc_pipe_open_interface()
    
    The result is only used temporary and should not be leaked on a long term
    memory context as 'conn'.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12890
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 examples/VFS/skel_opaque.c        | 16 ++-----
 examples/VFS/skel_transparent.c   | 18 +++-----
 source3/include/vfs.h             | 22 ++++-----
 source3/include/vfs_macros.h      | 13 ++----
 source3/locking/locking.c         |  6 +--
 source3/locking/proto.h           |  6 +--
 source3/modules/vfs_btrfs.c       |  9 +---
 source3/modules/vfs_catia.c       | 28 +++---------
 source3/modules/vfs_default.c     | 47 ++++++--------------
 source3/modules/vfs_full_audit.c  | 30 ++++---------
 source3/modules/vfs_glusterfs.c   |  3 +-
 source3/modules/vfs_time_audit.c  | 30 +++----------
 source3/smbd/aio.c                | 28 ++----------
 source3/smbd/lanman.c             | 20 ++++-----
 source3/smbd/reply.c              | 93 ++++++++++++++-------------------------
 source3/smbd/smb2_ioctl_filesys.c |  5 +--
 source3/smbd/smb2_read.c          |  8 +---
 source3/smbd/smb2_write.c         |  4 +-
 source3/smbd/vfs.c                | 18 +++-----
 19 files changed, 114 insertions(+), 290 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index fed9d2f..614dcff 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -687,21 +687,14 @@ 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;
 }
 
-static void skel_strict_unlock(struct vfs_handle_struct *handle,
-			       struct files_struct *fsp,
-			       struct lock_struct *plock)
-{
-	;
-}
-
 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
 				    const char *mapped_name,
 				    enum vfs_translate_direction direction,
@@ -1022,8 +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_unlock_fn = skel_strict_unlock,
+	.strict_lock_check_fn = skel_strict_lock_check,
 	.translate_name_fn = skel_translate_name,
 	.fsctl_fn = skel_fsctl,
 	.readdir_attr_fn = skel_readdir_attr,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index d9123e0..2f59a3d 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -856,18 +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);
-}
-
-static void skel_strict_unlock(struct vfs_handle_struct *handle,
-			       struct files_struct *fsp,
-			       struct lock_struct *plock)
-{
-	SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock);
+	return SMB_VFS_NEXT_STRICT_LOCK_CHECK(handle, fsp, plock);
 }
 
 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
@@ -1195,8 +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_unlock_fn = skel_strict_unlock,
+	.strict_lock_check_fn = skel_strict_lock_check,
 	.translate_name_fn = skel_translate_name,
 	.fsctl_fn = skel_fsctl,
 	.readdir_attr_fn = skel_readdir_attr,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 7b9a6f8..d71d7cc 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -241,6 +241,9 @@
 /* Version 37 - Add SMB_VFS_OFFLOAD_READ_SEND/RECV */
 /* 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
 
@@ -848,13 +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);
-
-	void (*strict_unlock_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,
@@ -1315,12 +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);
-void smb_vfs_call_strict_unlock(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,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 69fa85b..3cce192 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -376,15 +376,10 @@
 #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_UNLOCK(conn, fsp, plock) \
-	smb_vfs_call_strict_unlock((conn)->vfs_handles, (fsp), (plock))
-#define SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock) \
-	smb_vfs_call_strict_unlock((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))
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 037a987..4e9f1bb 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -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);
@@ -164,10 +164,6 @@ bool strict_lock_default(files_struct *fsp, struct lock_struct *plock)
 	return ret;
 }
 
-void strict_unlock_default(files_struct *fsp, struct lock_struct *plock)
-{
-}
-
 /****************************************************************************
  Find out if a lock could be granted - return who is blocking us if we can't.
 ****************************************************************************/
diff --git a/source3/locking/proto.h b/source3/locking/proto.h
index 6fb2bf2..33184e0 100644
--- a/source3/locking/proto.h
+++ b/source3/locking/proto.h
@@ -105,10 +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);
-void strict_unlock_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,
diff --git a/source3/modules/vfs_btrfs.c b/source3/modules/vfs_btrfs.c
index 0fd4c6c..13fd5e3 100644
--- a/source3/modules/vfs_btrfs.c
+++ b/source3/modules/vfs_btrfs.c
@@ -317,12 +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)) {
-			SMB_VFS_STRICT_UNLOCK(src_fsp->conn, src_fsp, &src_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);
 		}
@@ -335,10 +334,6 @@ static struct tevent_req *btrfs_offload_write_send(struct vfs_handle_struct *han
 	cr_args.src_length = (uint64_t)num;
 
 	ret = ioctl(dest_fsp->fh->fd, BTRFS_IOC_CLONE_RANGE, &cr_args);
-	if (do_locking) {
-		SMB_VFS_STRICT_UNLOCK(dest_fsp->conn, dest_fsp, &dest_lck);
-		SMB_VFS_STRICT_UNLOCK(src_fsp->conn, src_fsp, &src_lck);
-	}
 	if (ret < 0) {
 		/*
 		 * BTRFS_IOC_CLONE_RANGE only supports 'sectorsize' aligned
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 6adf441..5cf7476 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -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,30 +2383,13 @@ 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);
 
 	return ok;
 }
 
-static void catia_strict_unlock(struct vfs_handle_struct *handle,
-				struct files_struct *fsp,
-				struct lock_struct *plock)
-{
-	struct catia_cache *cc = NULL;
-	int ret;
-
-	ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc);
-	if (ret != 0) {
-		smb_panic("CATIA_FETCH_FSP_PRE_NEXT failed\n");
-	}
-
-	SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock);
-
-	CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
-}
-
 static NTSTATUS catia_fsctl(struct vfs_handle_struct *handle,
 			    struct files_struct *fsp,
 			    TALLOC_CTX *ctx,
@@ -2623,8 +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_unlock_fn = catia_strict_unlock,
+	.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,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 111a0c3..bf857b6 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1686,9 +1686,7 @@ struct vfswrap_offload_write_state {
 	struct tevent_context *ev;
 	uint8_t *buf;
 	bool read_lck_locked;
-	struct lock_struct read_lck;
 	bool write_lck_locked;
-	struct lock_struct write_lck;
 	DATA_BLOB *token;
 	struct files_struct *src_fsp;
 	off_t src_off;
@@ -1827,6 +1825,7 @@ static NTSTATUS vfswrap_offload_write_loop(struct tevent_req *req)
 	struct vfswrap_offload_write_state *state = tevent_req_data(
 		req, struct vfswrap_offload_write_state);
 	struct tevent_req *subreq = NULL;
+	struct lock_struct read_lck;
 	bool ok;
 
 	state->next_io_size = MIN(state->remaining, talloc_array_length(state->buf));
@@ -1836,11 +1835,11 @@ static NTSTATUS vfswrap_offload_write_loop(struct tevent_req *req)
 				state->src_off,
 				state->next_io_size,
 				READ_LOCK,
-				&state->read_lck);
+				&read_lck);
 
-	ok = SMB_VFS_STRICT_LOCK(state->src_fsp->conn,
+	ok = SMB_VFS_STRICT_LOCK_CHECK(state->src_fsp->conn,
 				 state->src_fsp,
-				 &state->read_lck);
+				 &read_lck);
 	if (!ok) {
 		return NT_STATUS_FILE_LOCK_CONFLICT;
 	}
@@ -1868,14 +1867,10 @@ static void vfswrap_offload_write_read_done(struct tevent_req *subreq)
 	struct vfswrap_offload_write_state *state = tevent_req_data(
 		req, struct vfswrap_offload_write_state);
 	struct vfs_aio_state aio_state;
+	struct lock_struct write_lck;
 	ssize_t nread;
 	bool ok;
 
-	SMB_VFS_STRICT_UNLOCK(state->src_fsp->conn,
-			      state->src_fsp,
-			      &state->read_lck);
-	ZERO_STRUCT(state->read_lck);
-
 	nread = SMB_VFS_PREAD_RECV(subreq, &aio_state);
 	TALLOC_FREE(subreq);
 	if (nread == -1) {
@@ -1897,11 +1892,11 @@ static void vfswrap_offload_write_read_done(struct tevent_req *subreq)
 				state->dst_off,
 				state->next_io_size,
 				WRITE_LOCK,
-				&state->write_lck);
+				&write_lck);
 
-	ok = SMB_VFS_STRICT_LOCK(state->dst_fsp->conn,
+	ok = SMB_VFS_STRICT_LOCK_CHECK(state->dst_fsp->conn,
 				 state->dst_fsp,
-				 &state->write_lck);
+				 &write_lck);
 	if (!ok) {
 		tevent_req_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
 		return;
@@ -1930,11 +1925,6 @@ static void vfswrap_offload_write_write_done(struct tevent_req *subreq)
 	ssize_t nwritten;
 	NTSTATUS status;
 
-	SMB_VFS_STRICT_UNLOCK(state->dst_fsp->conn,
-			      state->dst_fsp,
-			      &state->write_lck);
-	ZERO_STRUCT(state->write_lck);
-
 	nwritten = SMB_VFS_PWRITE_RECV(subreq, &aio_state);
 	TALLOC_FREE(subreq);
 	if (nwritten == -1) {
@@ -2750,24 +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)
-{
-	SMB_ASSERT(plock->lock_type == READ_LOCK ||
-	    plock->lock_type == WRITE_LOCK);
-
-	return strict_lock_default(fsp, plock);
-}
-
-static void vfswrap_strict_unlock(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);
 
-	strict_unlock_default(fsp, plock);
+	return strict_lock_check_default(fsp, plock);
 }
 
 /* NT ACL operations. */
@@ -3098,8 +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_unlock_fn = vfswrap_strict_unlock,
+	.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,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index bd31fad..a205007 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -164,8 +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_UNLOCK,
+	SMB_VFS_OP_STRICT_LOCK_CHECK,
 	SMB_VFS_OP_TRANSLATE_NAME,
 	SMB_VFS_OP_FSCTL,
 	SMB_VFS_OP_OFFLOAD_READ_SEND,
@@ -308,8 +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_UNLOCK, "strict_unlock" },
+	{ 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" },
@@ -1834,32 +1832,21 @@ 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);
 
 	return result;
 }
 
-static void smb_full_audit_strict_unlock(struct vfs_handle_struct *handle,
-					 struct files_struct *fsp,
-					 struct lock_struct *plock)
-{
-	SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock);
-
-	do_log(SMB_VFS_OP_STRICT_UNLOCK, true, handle,
-	    "%s:%llu-%llu:%d", fsp_str_do_log(fsp), plock->start,
-	    plock->size, plock->lock_type);
-}
-
 static NTSTATUS smb_full_audit_translate_name(struct vfs_handle_struct *handle,
 					      const char *name,
 					      enum vfs_translate_direction direction,
@@ -2589,8 +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_unlock_fn = smb_full_audit_strict_unlock,
+	.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,
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 1dafe8d..91cf87f 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1480,8 +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_unlock_fn = NULL,
+	.strict_lock_check_fn = NULL,
 	.translate_name_fn = NULL,
 	.fsctl_fn = NULL,
 
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 164f56d..7116796 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1710,43 +1710,26 @@ 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;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list