diff options
author | Tim Prouty <tprouty@samba.org> | 2009-06-10 10:37:57 -0700 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-06-10 13:13:27 -0700 |
commit | a9ec21cf219c3aef0388c252539f315d3e606a71 (patch) | |
tree | 6e0072fabc7d1b33f7c824c850d7a8f3a39dc425 /source3/smbd/open.c | |
parent | bddd7ad3dcc4a74fb61e09a2dd6fb7034c820046 (diff) | |
download | samba-a9ec21cf219c3aef0388c252539f315d3e606a71.tar.gz samba-a9ec21cf219c3aef0388c252539f315d3e606a71.tar.xz samba-a9ec21cf219c3aef0388c252539f315d3e606a71.zip |
s3: Prepare the first set of SMB_VFS_CREATE_FILE callers to take an smb_filename struct
Some of the callers required minimal changes, while others
(copy_internals) required significant changes. The task is simplified
a little bit because we are able to do operations and checks on the
base_name when a stream isn't used.
This patch should cause no functional changes.
Volker, Jeremy: Please check
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r-- | source3/smbd/open.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 773436fa8e..718feb4996 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2598,10 +2598,17 @@ static NTSTATUS open_directory(connection_struct *conn, return NT_STATUS_OK; } -NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, const char *directory) +NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, + const struct smb_filename *smb_dname) { NTSTATUS status; files_struct *fsp; + char *directory = NULL; + + status = get_full_smb_filename(talloc_tos(), smb_dname, &directory); + if (!NT_STATUS_IS_OK(status)) { + goto out; + } status = SMB_VFS_CREATE_FILE( conn, /* conn */ @@ -2625,7 +2632,8 @@ NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, cons if (NT_STATUS_IS_OK(status)) { close_file(req, fsp, NORMAL_CLOSE); } - + out: + TALLOC_FREE(directory); return status; } |