[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-306-gf5a1f68

Tim Prouty tprouty at samba.org
Fri Mar 13 22:12:09 GMT 2009


The branch, v3-4-test has been updated
       via  f5a1f68ee39ee1b31253acdb392d9d62f96a3c0e (commit)
       via  2d5e98e7e5a737dde360ab3490fff786fa0703b6 (commit)
      from  e5136e984922570ce9992c642c340dd3e937fc4e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit f5a1f68ee39ee1b31253acdb392d9d62f96a3c0e
Author: Dave Richards <dave.richards at isilon.com>
Date:   Fri Mar 13 14:21:40 2009 -0700

    s3 OneFS: Add kernel strict locking support

commit 2d5e98e7e5a737dde360ab3490fff786fa0703b6
Author: Dave Richards <dave.richards at isilon.com>
Date:   Fri Mar 13 14:15:28 2009 -0700

    s3: Add strict lock/unlock calls to the vfs layer to replace is_locked

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

Summary of changes:
 source3/include/proto.h          |   15 ++-
 source3/include/smbprofile.h     |    8 ++
 source3/include/vfs.h            |   13 +++
 source3/include/vfs_macros.h     |    6 ++
 source3/locking/locking.c        |   90 ++++++++++++--------
 source3/modules/onefs.h          |    8 ++
 source3/modules/onefs_cbrl.c     |   93 ++++++++++++++++++--
 source3/modules/vfs_default.c    |   24 +++++
 source3/modules/vfs_full_audit.c |   40 +++++++++
 source3/modules/vfs_onefs.c      |    4 +
 source3/smbd/reply.c             |  179 ++++++++++++++++++++++++-------------
 11 files changed, 367 insertions(+), 113 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 40024c5..ec6e676 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3409,11 +3409,16 @@ void brl_register_msgs(struct messaging_context *msg_ctx);
 
 const char *lock_type_name(enum brl_type lock_type);
 const char *lock_flav_name(enum brl_flavour lock_flav);
-bool is_locked(files_struct *fsp,
-		uint32 smbpid,
-		uint64_t count,
-		uint64_t offset, 
-		enum brl_type lock_type);
+void init_strict_lock_struct(files_struct *fsp,
+				uint32 smbpid,
+				br_off start,
+				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);
 NTSTATUS query_lock(files_struct *fsp,
 			uint32 *psmbpid,
 			uint64_t *pcount,
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index f9a0436..5b52bad 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -243,6 +243,14 @@ enum profile_stats_values
 #define syscall_brl_cancel_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_CANCEL, count)
 #define syscall_brl_cancel_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_CANCEL, time)
 
+	PR_VALUE_SYSCALL_STRICT_LOCK,
+#define syscall_strict_lock_count __profile_stats_value(PR_VALUE_SYSCALL_STRICT_LOCK, count)
+#define syscall_strict_lock_time __profile_stats_value(PR_VALUE_SYSCALL_STRICT_LOCK, time)
+
+	PR_VALUE_SYSCALL_STRICT_UNLOCK,
+#define syscall_strict_unlock_count __profile_stats_value(PR_VALUE_SYSCALL_STRICT_UNLOCK, count)
+#define syscall_strict_unlock_time __profile_stats_value(PR_VALUE_SYSCALL_STRICT_UNLOCK, time)
+
 /* counters for individual SMB types */
 	PR_VALUE_SMBMKDIR,
 #define SMBmkdir_count __profile_stats_value(PR_VALUE_SMBMKDIR, count)
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 0ee7f23..0c0e093 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -116,6 +116,7 @@
 /* Leave at 25 - not yet released. Add SMB_STRUCT_STAT to readdir. - sdann */
 /* Leave at 25 - not yet released. Add init_search_op call. - sdann */
 /* Leave at 25 - not yet released. Add locking calls. -- zkirsch. */
+/* Leave at 25 - not yet released. Add strict locking calls. -- drichards. */
 
 #define SMB_VFS_INTERFACE_VERSION 25
 
@@ -223,6 +224,8 @@ 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,
 
 	/* NT ACL operations. */
 
@@ -415,6 +418,14 @@ struct vfs_ops {
 					   struct lock_struct *plock,
 					   struct blocking_lock_record *blr);
 
+		bool (*strict_lock)(struct vfs_handle_struct *handle,
+					struct files_struct *fsp,
+					struct lock_struct *plock);
+
+		void (*strict_unlock)(struct vfs_handle_struct *handle,
+					struct files_struct *fsp,
+					struct lock_struct *plock);
+
 		/* NT ACL operations. */
 
 		NTSTATUS (*fget_nt_acl)(struct vfs_handle_struct *handle,
@@ -556,6 +567,8 @@ struct vfs_ops {
 		struct vfs_handle_struct *brl_lock_windows;
 		struct vfs_handle_struct *brl_unlock_windows;
 		struct vfs_handle_struct *brl_cancel_windows;
+		struct vfs_handle_struct *strict_lock;
+		struct vfs_handle_struct *strict_unlock;
 
 		/* NT ACL operations. */
 
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 7dacd23..acb158e 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -91,6 +91,8 @@
 #define SMB_VFS_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock, blr) ((conn)->vfs.ops.brl_lock_windows((conn)->vfs.handles.brl_lock_windows, (br_lck), (plock), (blocking_lock), (blr)))
 #define SMB_VFS_BRL_UNLOCK_WINDOWS(conn, msg_ctx, br_lck, plock) ((conn)->vfs.ops.brl_unlock_windows((conn)->vfs.handles.brl_unlock_windows, (msg_ctx), (br_lck), (plock)))
 #define SMB_VFS_BRL_CANCEL_WINDOWS(conn, br_lck, plock, blr) ((conn)->vfs.ops.brl_cancel_windows((conn)->vfs.handles.brl_cancel_windows, (br_lck), (plock), (blr)))
+#define SMB_VFS_STRICT_LOCK(conn, fsp, plock) ((conn)->vfs.ops.strict_lock((conn)->vfs.handles.strict_lock, (fsp), (plock)))
+#define SMB_VFS_STRICT_UNLOCK(conn, fsp, plock) ((conn)->vfs.ops.strict_unlock((conn)->vfs.handles.strict_unlock, (fsp), (plock)))
 
 /* NT ACL operations. */
 #define SMB_VFS_FGET_NT_ACL(fsp, security_info, ppdesc) ((fsp)->conn->vfs.ops.fget_nt_acl((fsp)->conn->vfs.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
@@ -223,6 +225,8 @@
 #define SMB_VFS_OPAQUE_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock, blr) ((conn)->vfs_opaque.ops.brl_lock_windows((conn)->vfs_opaque.handles.brl_lock_windows, (br_lck), (plock), (blocking_lock), (blr)))
 #define SMB_VFS_OPAQUE_BRL_UNLOCK_WINDOWS(conn, msg_ctx, br_lck, plock) ((conn)->vfs_opaque.ops.brl_unlock_windows((conn)->vfs_opaque.handles.brl_unlock_windows, (msg_ctx), (br_lck), (plock)))
 #define SMB_VFS_OPAQUE_BRL_CANCEL_WINDOWS(conn, br_lck, plock, blr) ((conn)->vfs_opaque.ops.brl_cancel_windows((conn)->vfs_opaque.handles.brl_cancel_windows, (br_lck), (plock), (blr)))
+#define SMB_VFS_OPAQUE_STRICT_LOCK(conn, fsp, plock) ((conn)->vfs_opaque.ops.strict_lock((conn)->vfs_opaque.handles.strict_lock, (fsp), (plock)))
+#define SMB_VFS_OPAQUE_STRICT_UNLOCK(conn, fsp, plock) ((conn)->vfs_opaque.ops.strict_unlock((conn)->vfs_opaque.handles.strict_unlock, (fsp), (plock)))
 
 /* NT ACL operations. */
 #define SMB_VFS_OPAQUE_FGET_NT_ACL(fsp, security_info, ppdesc) ((fsp)->conn->vfs_opaque.ops.fget_nt_acl((fsp)->conn->vfs_opaque.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
@@ -356,6 +360,8 @@
 #define SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock, blocking_lock, blr) ((handle)->vfs_next.ops.brl_lock_windows((handle)->vfs_next.handles.brl_lock_windows, (br_lck), (plock), (blocking_lock), (blr)))
 #define SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock) ((handle)->vfs_next.ops.brl_unlock_windows((handle)->vfs_next.handles.brl_unlock_windows, (msg_ctx), (br_lck), (plock)))
 #define SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock, blr) ((handle)->vfs_next.ops.brl_cancel_windows((handle)->vfs_next.handles.brl_cancel_windows, (br_lck), (plock), (blr)))
+#define SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock) ((handle)->vfs_next.ops.strict_lock((handle)->vfs_next.handles.strict_lock, (fsp), (plock)))
+#define SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock) ((handle)->vfs_next.ops.strict_unlock((handle)->vfs_next.handles.strict_unlock, (fsp), (plock)))
 
 /* NT ACL operations. */
 #define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc) ((handle)->vfs_next.ops.fget_nt_acl((handle)->vfs_next.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index e9a5f75..bafb895 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -75,69 +75,89 @@ const char *lock_flav_name(enum brl_flavour lock_flav)
  Called in the read/write codepath.
 ****************************************************************************/
 
-bool is_locked(files_struct *fsp,
-		uint32 smbpid,
-		uint64_t count,
-		uint64_t offset, 
-		enum brl_type lock_type)
+void init_strict_lock_struct(files_struct *fsp,
+				uint32 smbpid,
+				br_off start,
+				br_off size,
+				enum brl_type lock_type,
+				struct lock_struct *plock)
+{
+	SMB_ASSERT(lock_type == READ_LOCK || lock_type == WRITE_LOCK);
+
+	plock->context.smbpid = smbpid;
+        plock->context.tid = fsp->conn->cnum;
+        plock->context.pid = procid_self();
+        plock->start = start;
+        plock->size = size;
+        plock->fnum = fsp->fnum;
+        plock->lock_type = lock_type;
+        plock->lock_flav = lp_posix_cifsu_locktype(fsp);
+}
+
+bool strict_lock_default(files_struct *fsp, struct lock_struct *plock)
 {
 	int strict_locking = lp_strict_locking(fsp->conn->params);
-	enum brl_flavour lock_flav = lp_posix_cifsu_locktype(fsp);
-	bool ret = True;
-	
-	if (count == 0) {
-		return False;
+	bool ret = False;
+
+	if (plock->size == 0) {
+		return True;
 	}
 
 	if (!lp_locking(fsp->conn->params) || !strict_locking) {
-		return False;
+		return True;
 	}
 
 	if (strict_locking == Auto) {
-		if  (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) && (lock_type == READ_LOCK || lock_type == WRITE_LOCK)) {
+		if  (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) && (plock->lock_type == READ_LOCK || plock->lock_type == WRITE_LOCK)) {
 			DEBUG(10,("is_locked: optimisation - exclusive oplock on file %s\n", fsp->fsp_name ));
-			ret = False;
+			ret = True;
 		} else if ((fsp->oplock_type == LEVEL_II_OPLOCK) &&
-			   (lock_type == READ_LOCK)) {
+			   (plock->lock_type == READ_LOCK)) {
 			DEBUG(10,("is_locked: optimisation - level II oplock on file %s\n", fsp->fsp_name ));
-			ret = False;
+			ret = True;
 		} else {
 			struct byte_range_lock *br_lck = brl_get_locks_readonly(talloc_tos(), fsp);
 			if (!br_lck) {
-				return False;
+				return True;
 			}
-			ret = !brl_locktest(br_lck,
-					smbpid,
-					procid_self(),
-					offset,
-					count,
-					lock_type,
-					lock_flav);
+			ret = brl_locktest(br_lck,
+					plock->context.smbpid,
+					plock->context.pid,
+					plock->start,
+					plock->size,
+					plock->lock_type,
+					plock->lock_flav);
 			TALLOC_FREE(br_lck);
 		}
 	} else {
 		struct byte_range_lock *br_lck = brl_get_locks_readonly(talloc_tos(), fsp);
 		if (!br_lck) {
-			return False;
+			return True;
 		}
-		ret = !brl_locktest(br_lck,
-				smbpid,
-				procid_self(),
-				offset,
-				count,
-				lock_type,
-				lock_flav);
+		ret = brl_locktest(br_lck,
+				plock->context.smbpid,
+				plock->context.pid,
+				plock->start,
+				plock->size,
+				plock->lock_type,
+				plock->lock_flav);
 		TALLOC_FREE(br_lck);
 	}
 
-	DEBUG(10,("is_locked: flavour = %s brl start=%.0f len=%.0f %s for fnum %d file %s\n",
-			lock_flav_name(lock_flav),
-			(double)offset, (double)count, ret ? "locked" : "unlocked",
-			fsp->fnum, fsp->fsp_name ));
+	DEBUG(10,("strict_lock_default: flavour = %s brl start=%.0f "
+			"len=%.0f %s for fnum %d file %s\n",
+			lock_flav_name(plock->lock_flav),
+			(double)plock->start, (double)plock->size,
+			ret ? "unlocked" : "locked",
+			plock->fnum, fsp->fsp_name ));
 
 	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/modules/onefs.h b/source3/modules/onefs.h
index ebeece4..bb76958 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -106,6 +106,14 @@ bool onefs_brl_cancel_windows(vfs_handle_struct *handle,
 			      struct lock_struct *plock,
 			      struct blocking_lock_record *blr);
 
+bool onefs_strict_lock(vfs_handle_struct *handle,
+			files_struct *fsp,
+			struct lock_struct *plock);
+
+void onefs_strict_unlock(vfs_handle_struct *handle,
+			files_struct *fsp,
+			struct lock_struct *plock);
+
 NTSTATUS onefs_notify_watch(vfs_handle_struct *vfs_handle,
 			    struct sys_notify_context *ctx,
 			    struct notify_entry *e,
diff --git a/source3/modules/onefs_cbrl.c b/source3/modules/onefs_cbrl.c
index 7311e19..a6178a9 100644
--- a/source3/modules/onefs_cbrl.c
+++ b/source3/modules/onefs_cbrl.c
@@ -248,7 +248,7 @@ NTSTATUS onefs_brl_lock_windows(vfs_handle_struct *handle,
 {
 	int fd = br_lck->fsp->fh->fd;
 	uint64_t id = 0;
-	bool exclusive = false;
+	enum cbrl_lock_type type;
 	bool async = false;
 	bool pending = false;
 	bool pending_async = false;
@@ -268,20 +268,22 @@ NTSTATUS onefs_brl_lock_windows(vfs_handle_struct *handle,
 
 	switch (plock->lock_type) {
 		case WRITE_LOCK:
-			exclusive = true;
+			type = CBRL_LK_EX;
 			break;
 		case READ_LOCK:
+			type = CBRL_LK_SH;
 			break;
 		case PENDING_WRITE_LOCK:
 			/* Called when a blocking lock request is added - do an
 			 * async lock. */
+			type = CBRL_LK_EX;
 			pending = true;
 			async = true;
-			exclusive = true;
 			break;
 		case PENDING_READ_LOCK:
 			/* Called when a blocking lock request is added - do an
 			 * async lock. */
+			type = CBRL_LK_SH;
 			pending = true;
 			async = true;
 			break;
@@ -323,7 +325,7 @@ NTSTATUS onefs_brl_lock_windows(vfs_handle_struct *handle,
 	}
 
 	DEBUG(10, ("Calling ifs_cbrl(LOCK)..."));
-	error = ifs_cbrl(fd, CBRL_OP_LOCK, exclusive, plock->start,
+	error = ifs_cbrl(fd, CBRL_OP_LOCK, type, plock->start,
 	    plock->size, async, id, plock->context.smbpid, plock->context.tid,
 	    plock->fnum);
 	if (!error) {
@@ -373,8 +375,6 @@ success:
 	return NT_STATUS_OK;
 }
 
-#define CBRL_NOTYPE true
-
 bool onefs_brl_unlock_windows(vfs_handle_struct *handle,
 			      struct messaging_context *msg_ctx,
 			      struct byte_range_lock *br_lck,
@@ -389,8 +389,8 @@ bool onefs_brl_unlock_windows(vfs_handle_struct *handle,
 	SMB_ASSERT(plock->lock_type == UNLOCK_LOCK);
 
 	DEBUG(10, ("Calling ifs_cbrl(UNLOCK)..."));
-	error = ifs_cbrl(fd, CBRL_OP_UNLOCK, CBRL_NOTYPE,
-	    plock->start, plock->size, CBRL_NOTYPE, 0, plock->context.smbpid,
+	error = ifs_cbrl(fd, CBRL_OP_UNLOCK, CBRL_LK_SH,
+	    plock->start, plock->size, false, 0, plock->context.smbpid,
 	    plock->context.tid, plock->fnum);
 
 	END_PROFILE(syscall_brl_unlock);
@@ -444,8 +444,8 @@ bool onefs_brl_cancel_windows(vfs_handle_struct *handle,
 
 	/* A real cancel. */
 	DEBUG(10, ("Calling ifs_cbrl(CANCEL)..."));
-	error = ifs_cbrl(fd, CBRL_OP_CANCEL, CBRL_NOTYPE, plock->start,
-	    plock->size, CBRL_NOTYPE, bs->id, plock->context.smbpid,
+	error = ifs_cbrl(fd, CBRL_OP_CANCEL, CBRL_LK_UNSPEC, plock->start,
+	    plock->size, false, bs->id, plock->context.smbpid,
 	    plock->context.tid, plock->fnum);
 
 	END_PROFILE(syscall_brl_cancel);
@@ -462,6 +462,79 @@ bool onefs_brl_cancel_windows(vfs_handle_struct *handle,
 	return true;
 }
 
+bool onefs_strict_lock(vfs_handle_struct *handle,
+			files_struct *fsp,
+			struct lock_struct *plock)
+{
+	int error;
+
+	START_PROFILE(syscall_strict_lock);
+
+	SMB_ASSERT(plock->lock_type == READ_LOCK ||
+	    plock->lock_type == WRITE_LOCK);
+
+        if (!lp_locking(handle->conn->params) ||
+	    !lp_strict_locking(handle->conn->params)) {
+		END_PROFILE(syscall_strict_lock);
+                return True;
+        }
+
+	if (plock->lock_flav == POSIX_LOCK) {
+		END_PROFILE(syscall_strict_lock);
+		return SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock);
+	}
+
+	if (plock->size == 0) {
+		END_PROFILE(syscall_strict_lock);
+                return True;
+	}
+
+	error = ifs_cbrl(fsp->fh->fd, CBRL_OP_LOCK,
+	    plock->lock_type == READ_LOCK ? CBRL_LK_RD : CBRL_LK_WR,
+	    plock->start, plock->size, 0, 0, plock->context.smbpid,
+	    plock->context.tid, plock->fnum);
+
+	END_PROFILE(syscall_strict_lock);
+
+	return (error == 0);
+}
+
+void onefs_strict_unlock(vfs_handle_struct *handle,
+			files_struct *fsp,
+			struct lock_struct *plock)
+{
+	START_PROFILE(syscall_strict_unlock);
+
+	SMB_ASSERT(plock->lock_type == READ_LOCK ||
+	    plock->lock_type == WRITE_LOCK);
+
+        if (!lp_locking(handle->conn->params) ||
+	    !lp_strict_locking(handle->conn->params)) {
+		END_PROFILE(syscall_strict_unlock);
+		return;
+        }
+
+	if (plock->lock_flav == POSIX_LOCK) {
+		SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock);
+		END_PROFILE(syscall_strict_unlock);
+		return;
+	}
+
+	if (plock->size == 0) {
+		END_PROFILE(syscall_strict_unlock);
+		return;
+	}
+
+	if (fsp->fh) {
+		ifs_cbrl(fsp->fh->fd, CBRL_OP_UNLOCK,
+		    plock->lock_type == READ_LOCK ? CBRL_LK_RD : CBRL_LK_WR,
+		    plock->start, plock->size, 0, 0, plock->context.smbpid,
+		    plock->context.tid, plock->fnum);
+	}
+
+	END_PROFILE(syscall_strict_unlock);
+}
+
 /* TODO Optimization: Abstract out brl_get_locks() in the Windows case.
  * We'll malloc some memory or whatever (can't return NULL), but not actually
  * touch the TDB. */
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 7384268..a4973df 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1157,6 +1157,26 @@ 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)
+{
+	SMB_ASSERT(plock->lock_type == READ_LOCK ||
+	    plock->lock_type == WRITE_LOCK);
+
+	return strict_unlock_default(fsp, plock);
+}
+
 /* NT ACL operations. */
 
 static NTSTATUS vfswrap_fget_nt_acl(vfs_handle_struct *handle,
@@ -1592,6 +1612,10 @@ static vfs_op_tuple vfs_default_ops[] = {
 	 SMB_VFS_LAYER_OPAQUE},
 	{SMB_VFS_OP(vfswrap_brl_cancel_windows),SMB_VFS_OP_BRL_CANCEL_WINDOWS,
 	 SMB_VFS_LAYER_OPAQUE},
+	{SMB_VFS_OP(vfswrap_strict_lock),	SMB_VFS_OP_STRICT_LOCK,
+	 SMB_VFS_LAYER_OPAQUE},
+	{SMB_VFS_OP(vfswrap_strict_unlock),	SMB_VFS_OP_STRICT_UNLOCK,
+	 SMB_VFS_LAYER_OPAQUE},
 
 	/* NT ACL operations. */
 
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 3c159f1..ebe89ec 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -234,6 +234,12 @@ static bool smb_full_audit_brl_cancel_windows(struct vfs_handle_struct *handle,
 				              struct byte_range_lock *br_lck,
 					      struct lock_struct *plock,
 					      struct blocking_lock_record *blr);
+static bool smb_full_audit_strict_lock(struct vfs_handle_struct *handle,
+				       struct files_struct *fsp,
+				       struct lock_struct *plock);
+static void smb_full_audit_strict_unlock(struct vfs_handle_struct *handle,
+				         struct files_struct *fsp,
+				         struct lock_struct *plock);
 static NTSTATUS smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 				uint32 security_info,
 				SEC_DESC **ppdesc);
@@ -483,6 +489,10 @@ static vfs_op_tuple audit_op_tuples[] = {
 	 SMB_VFS_LAYER_LOGGER},
 	{SMB_VFS_OP(smb_full_audit_brl_cancel_windows), SMB_VFS_OP_BRL_CANCEL_WINDOWS,
 	 SMB_VFS_LAYER_LOGGER},
+	{SMB_VFS_OP(smb_full_audit_strict_lock), SMB_VFS_OP_STRICT_LOCK,
+	 SMB_VFS_LAYER_LOGGER},
+	{SMB_VFS_OP(smb_full_audit_strict_unlock), SMB_VFS_OP_STRICT_UNLOCK,
+	 SMB_VFS_LAYER_LOGGER},
 
 	/* NT ACL operations. */
 
@@ -660,6 +670,8 @@ static struct {
 	{ SMB_VFS_OP_BRL_LOCK_WINDOWS,  "brl_lock_windows" },
 	{ SMB_VFS_OP_BRL_UNLOCK_WINDOWS, "brl_unlock_windows" },


-- 
Samba Shared Repository


More information about the samba-cvs mailing list