diff options
author | Tim Prouty <tprouty@samba.org> | 2009-03-03 19:23:33 -0800 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-03-04 18:32:12 -0800 |
commit | f61f1690548edbd1c6e3badfe8d2e7b50485d03e (patch) | |
tree | 35ecc5421c6ac605a521a762002d029b2d853927 /source3 | |
parent | d526d340d8f5d70ea48bcaf535ea57d2c1cd48db (diff) | |
download | samba-f61f1690548edbd1c6e3badfe8d2e7b50485d03e.tar.gz samba-f61f1690548edbd1c6e3badfe8d2e7b50485d03e.tar.bz2 samba-f61f1690548edbd1c6e3badfe8d2e7b50485d03e.zip |
s3: Change open_streams_for_delete to call through the vfs layer
This eliminates the last direct caller of create_file_unixpath
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/smbd/open.c | 12 |
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 */ |