diff options
author | Volker Lendecke <vl@samba.org> | 2008-10-09 15:38:53 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-10-13 19:32:38 +0200 |
commit | c3fedcddd5e79c60f5fcc0219752c27277a4d9f7 (patch) | |
tree | 8248641a0fbedb7d87072cfc2e852683b2da3267 /source3/smbd/open.c | |
parent | 3bbe5e88e55a92a177260310daffd6deae551ba3 (diff) | |
download | samba-c3fedcddd5e79c60f5fcc0219752c27277a4d9f7.tar.gz samba-c3fedcddd5e79c60f5fcc0219752c27277a4d9f7.tar.bz2 samba-c3fedcddd5e79c60f5fcc0219752c27277a4d9f7.zip |
Pass struct smb_request to file_new
Goal is to remove the chain_fsp global variable
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r-- | source3/smbd/open.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 6edbe5ab92..0ae444b3d8 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -890,7 +890,8 @@ static bool open_match_attributes(connection_struct *conn, Try and find a duplicated file handle. ****************************************************************************/ -static files_struct *fcb_or_dos_open(connection_struct *conn, +static files_struct *fcb_or_dos_open(struct smb_request *req, + connection_struct *conn, const char *fname, struct file_id id, uint16 file_pid, @@ -940,7 +941,7 @@ static files_struct *fcb_or_dos_open(connection_struct *conn, } /* We need to duplicate this fsp. */ - if (!NT_STATUS_IS_OK(dup_file_fsp(fsp, access_mask, share_access, + if (!NT_STATUS_IS_OK(dup_file_fsp(req, fsp, access_mask, share_access, create_options, &dup_fsp))) { return NULL; } @@ -1178,7 +1179,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn, DEBUG(10, ("open_file_ntcreate: printer open fname=%s\n", fname)); - return print_fsp_open(conn, fname, req->vuid, result); + return print_fsp_open(req, conn, fname, req->vuid, result); } if (!parent_dirname_talloc(talloc_tos(), fname, &parent_dir, @@ -1435,7 +1436,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn, return NT_STATUS_ACCESS_DENIED; } - status = file_new(conn, &fsp); + status = file_new(req, conn, &fsp); if(!NT_STATUS_IS_OK(status)) { return status; } @@ -1530,7 +1531,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn, /* Use the client requested access mask here, * not the one we open with. */ - fsp_dup = fcb_or_dos_open(conn, fname, id, + fsp_dup = fcb_or_dos_open(req, conn, fname, id, req->smbpid, req->vuid, access_mask, @@ -1948,7 +1949,8 @@ NTSTATUS open_file_ntcreate(connection_struct *conn, Open a file for for write to ensure that we can fchmod it. ****************************************************************************/ -NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname, +NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn, + const char *fname, SMB_STRUCT_STAT *psbuf, files_struct **result) { files_struct *fsp = NULL; @@ -1958,7 +1960,7 @@ NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname, return NT_STATUS_INVALID_PARAMETER; } - status = file_new(conn, &fsp); + status = file_new(req, conn, &fsp); if(!NT_STATUS_IS_OK(status)) { return status; } @@ -2198,7 +2200,7 @@ NTSTATUS open_directory(connection_struct *conn, return NT_STATUS_NOT_A_DIRECTORY; } - status = file_new(conn, &fsp); + status = file_new(req, conn, &fsp); if(!NT_STATUS_IS_OK(status)) { return status; } @@ -3000,7 +3002,7 @@ NTSTATUS create_file(connection_struct *conn, * also tries a QUERY_FILE_INFO on the file and then * close it */ - status = open_fake_file(conn, req->vuid, + status = open_fake_file(req, conn, req->vuid, fake_file_type, fname, access_mask, &fsp); if (!NT_STATUS_IS_OK(status)) { |