[PATCH 6/8] Bug 9395 - Samba fails the simple_nodelete test of smb2.rename tests from master.

Jeremy Allison jra at samba.org
Fri Nov 16 12:54:18 MST 2012


Make open_mode_check() a public function. We're going to need this
inside parent_dirname_compatible_open() for rename checks.

Signed-off-by: Jeremy Allison <jra at samba.org>
---
 source3/smbd/open.c  |    2 +-
 source3/smbd/proto.h |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 7eb9f32..875ebb9 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1085,7 +1085,7 @@ bool is_stat_open(uint32 access_mask)
  Returns -1 on error, or number of share modes on success (may be zero).
 ****************************************************************************/
 
-static NTSTATUS open_mode_check(connection_struct *conn,
+NTSTATUS open_mode_check(connection_struct *conn,
 				struct share_mode_lock *lck,
 				uint32_t name_hash,
 				uint32 access_mask,
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 7d405a6..42a806a 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -612,6 +612,13 @@ NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
 				    const char *fname,
 				    SMB_STRUCT_STAT *psbuf);
 bool is_stat_open(uint32 access_mask);
+NTSTATUS open_mode_check(connection_struct *conn,
+			struct share_mode_lock *lck,
+			uint32_t name_hash,
+			uint32 access_mask,
+			uint32 share_access,
+			uint32 create_options,
+			bool *file_existed);
 void remove_deferred_open_entry(struct file_id id, uint64_t mid,
 				struct server_id pid);
 bool is_deferred_open_async(const void *ptr);
-- 
1.7.7.3



More information about the samba-technical mailing list