summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/smbd/open.c12
2 files changed, 9 insertions, 5 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 78110161c5..41e3618503 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6723,6 +6723,8 @@ void msg_file_was_renamed(struct messaging_context *msg,
struct case_semantics_state;
struct case_semantics_state *set_posix_case_semantics(TALLOC_CTX *mem_ctx,
connection_struct *conn);
+NTSTATUS open_streams_for_delete(connection_struct *conn,
+ const char *fname);
NTSTATUS create_file_default(connection_struct *conn,
struct smb_request *req,
uint16_t root_dir_fid,
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index acd347520d..ccc6fc77d6 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2719,7 +2719,7 @@ struct case_semantics_state *set_posix_case_semantics(TALLOC_CTX *mem_ctx,
* If that works, delete them all by setting the delete on close and close.
*/
-static NTSTATUS open_streams_for_delete(connection_struct *conn,
+NTSTATUS open_streams_for_delete(connection_struct *conn,
const char *fname)
{
struct stream_struct *stream_info;
@@ -2777,13 +2777,15 @@ static NTSTATUS open_streams_for_delete(connection_struct *conn,
goto fail;
}
- status = create_file_unixpath
- (conn, /* conn */
+ status = SMB_VFS_CREATE_FILE(
+ conn, /* conn */
NULL, /* req */
+ 0, /* root_dir_fid */
streamname, /* fname */
+ 0, /* create_file_flags */
DELETE_ACCESS, /* access_mask */
- FILE_SHARE_READ | FILE_SHARE_WRITE
- | FILE_SHARE_DELETE, /* share_access */
+ (FILE_SHARE_READ | /* share_access */
+ FILE_SHARE_WRITE | FILE_SHARE_DELETE),
FILE_OPEN, /* create_disposition*/
NTCREATEX_OPTIONS_PRIVATE_STREAM_DELETE, /* create_options */
FILE_ATTRIBUTE_NORMAL, /* file_attributes */