1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

vfs: remove dirfsp arg from SMB_VFS_CREATE_FILE()

This was supposed to be a shortcut to avoid passing dirfsp around as an explicit
function argument throughout the whole codebase when the new VFS design idea was
based on using *AT functions throughout the VFS.

Now that we've opted for basing the VFS on handles and *AT functions will only
be used in a much more limitted extent, it makes sense to remove this internal
dirfsp reference, otherwise the combination of internal fsp->dirfsp and
smb_fname->fsp is going to be a tough to wrap your head around.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct  2 21:00:05 UTC 2020 on sn-devel-184
This commit is contained in:
Ralph Boehme 2020-10-02 17:29:58 +02:00 committed by Jeremy Allison
parent 1c444f9c37
commit 322574834f
24 changed files with 9 additions and 72 deletions

View File

@ -204,7 +204,6 @@ static int skel_openat(struct vfs_handle_struct *handle,
static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,

View File

@ -212,7 +212,6 @@ static int skel_openat(struct vfs_handle_struct *handle,
static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -231,7 +230,6 @@ static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
{
return SMB_VFS_NEXT_CREATE_FILE(handle,
req,
dirfsp,
smb_fname,
access_mask,
share_access,

View File

@ -329,6 +329,7 @@
otherwise.
* Change to Version 44 - will ship with 4.14.
* Version 44 - Remove dirfsp arg from struct files_struct
* Version 44 - Remove dirfsp arg to SMB_VFS_CREATE_FILE()
*/
#define SMB_VFS_INTERFACE_VERSION 44
@ -774,7 +775,6 @@ struct vfs_fn_pointers {
mode_t mode);
NTSTATUS (*create_file_fn)(struct vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -1289,7 +1289,6 @@ int smb_vfs_call_openat(struct vfs_handle_struct *handle,
mode_t mode);
NTSTATUS smb_vfs_call_create_file(struct vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -1750,7 +1749,6 @@ int vfs_not_implemented_openat(vfs_handle_struct *handle,
mode_t mode);
NTSTATUS vfs_not_implemented_create_file(struct vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,

View File

@ -147,14 +147,14 @@
#define SMB_VFS_NEXT_OPENAT(handle, dirfsp, smb_fname, fsp, flags, mode) \
smb_vfs_call_openat((handle)->next, (dirfsp), (smb_fname), (fsp), (flags), (mode))
#define SMB_VFS_CREATE_FILE(conn, req, dirfsp, smb_fname, access_mask, share_access, create_disposition, \
#define SMB_VFS_CREATE_FILE(conn, req, smb_fname, access_mask, share_access, create_disposition, \
create_options, file_attributes, oplock_request, lease, allocation_size, private_flags, sd, ea_list, result, pinfo, in_context_blobs, out_context_blobs) \
smb_vfs_call_create_file((conn)->vfs_handles, (req), (dirfsp), (smb_fname), (access_mask), (share_access), (create_disposition), \
smb_vfs_call_create_file((conn)->vfs_handles, (req), (smb_fname), (access_mask), (share_access), (create_disposition), \
(create_options), (file_attributes), (oplock_request), (lease), (allocation_size), (private_flags), (sd), (ea_list), (result), (pinfo), \
(in_context_blobs), (out_context_blobs))
#define SMB_VFS_NEXT_CREATE_FILE(handle, req, dirfsp, smb_fname, access_mask, share_access, create_disposition, \
#define SMB_VFS_NEXT_CREATE_FILE(handle, req, smb_fname, access_mask, share_access, create_disposition, \
create_options, file_attributes, oplock_request, lease, allocation_size, private_flags, sd, ea_list, result, pinfo, in_context_blobs, out_context_blobs) \
smb_vfs_call_create_file((handle)->next, (req), (dirfsp), (smb_fname), (access_mask), (share_access), (create_disposition), \
smb_vfs_call_create_file((handle)->next, (req), (smb_fname), (access_mask), (share_access), (create_disposition), \
(create_options), (file_attributes), (oplock_request), (lease), (allocation_size), (private_flags), (sd), (ea_list), (result), (pinfo), \
(in_context_blobs), (out_context_blobs))

View File

@ -1109,7 +1109,6 @@ static bool ad_convert_xattr(vfs_handle_struct *handle,
status = SMB_VFS_CREATE_FILE(
handle->conn, /* conn */
NULL, /* req */
&handle->conn->cwd_fsp, /* dirfsp */
stream_name, /* fname */
FILE_GENERIC_WRITE, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */
@ -1239,7 +1238,6 @@ static bool ad_convert_finderinfo(vfs_handle_struct *handle,
status = SMB_VFS_CREATE_FILE(
handle->conn, /* conn */
NULL, /* req */
&handle->conn->cwd_fsp, /* dirfsp */
stream_name, /* fname */
FILE_GENERIC_WRITE, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */
@ -1470,7 +1468,6 @@ static bool ad_unconvert_open_ad(TALLOC_CTX *mem_ctx,
status = SMB_VFS_CREATE_FILE(
handle->conn,
NULL, /* req */
&handle->conn->cwd_fsp, /* dirfsp */
adpath,
FILE_READ_DATA|FILE_WRITE_DATA,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
@ -1522,7 +1519,6 @@ static bool ad_unconvert_get_streams(struct vfs_handle_struct *handle,
status = SMB_VFS_CREATE_FILE(
handle->conn, /* conn */
NULL, /* req */
&handle->conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_READ_ATTRIBUTES, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */
@ -1622,7 +1618,6 @@ static bool ad_collect_one_stream(struct vfs_handle_struct *handle,
status = SMB_VFS_CREATE_FILE(
handle->conn,
NULL, /* req */
&handle->conn->cwd_fsp, /* dirfsp */
sname,
FILE_READ_DATA|DELETE_ACCESS,
FILE_SHARE_READ,
@ -2084,7 +2079,6 @@ static int ad_open_rsrc(vfs_handle_struct *handle,
status = SMB_VFS_CREATE_FILE(
handle->conn, /* conn */
NULL, /* req */
&handle->conn->cwd_fsp, /* dirfsp */
adp_smb_fname,
access_mask,
share_access,

View File

@ -710,7 +710,6 @@ out:
}
static NTSTATUS vfswrap_create_file(vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -728,7 +727,7 @@ static NTSTATUS vfswrap_create_file(vfs_handle_struct *handle,
const struct smb2_create_blobs *in_context_blobs,
struct smb2_create_blobs *out_context_blobs)
{
return create_file_default(handle->conn, req, dirfsp, smb_fname,
return create_file_default(handle->conn, req, smb_fname,
access_mask, share_access,
create_disposition, create_options,
file_attributes, oplock_request, lease,

View File

@ -898,7 +898,6 @@ static bool readdir_attr_meta_finderi_stream(
status = SMB_VFS_CREATE_FILE(
handle->conn, /* conn */
NULL, /* req */
&handle->conn->cwd_fsp, /* dirfsp */
stream_name, /* fname */
FILE_READ_DATA, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */
@ -3912,7 +3911,6 @@ static int fruit_ftruncate(struct vfs_handle_struct *handle,
static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -3967,7 +3965,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
}
status = SMB_VFS_NEXT_CREATE_FILE(
handle, req, dirfsp, smb_fname,
handle, req, smb_fname,
access_mask, share_access,
create_disposition, create_options,
file_attributes, oplock_request,
@ -4732,7 +4730,6 @@ static bool fruit_get_bandsize(vfs_handle_struct *handle,
status = SMB_VFS_NEXT_CREATE_FILE(
handle, /* conn */
NULL, /* req */
&handle->conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_GENERIC_READ, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */

View File

@ -1099,7 +1099,6 @@ static int smb_full_audit_openat(vfs_handle_struct *handle,
static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -1146,7 +1145,6 @@ static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle,
result = SMB_VFS_NEXT_CREATE_FILE(
handle, /* handle */
req, /* req */
dirfsp,
smb_fname, /* fname */
access_mask, /* access_mask */
share_access, /* share_access */

View File

@ -1106,7 +1106,6 @@ out:
*/
static NTSTATUS mh_create_file(vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -1136,7 +1135,6 @@ static NTSTATUS mh_create_file(vfs_handle_struct *handle,
status = SMB_VFS_NEXT_CREATE_FILE(
handle,
req,
dirfsp,
smb_fname,
access_mask,
share_access,
@ -1175,7 +1173,6 @@ static NTSTATUS mh_create_file(vfs_handle_struct *handle,
status = SMB_VFS_NEXT_CREATE_FILE(
handle,
req,
dirfsp,
clientFname,
access_mask,
share_access,

View File

@ -201,7 +201,6 @@ int vfs_not_implemented_openat(vfs_handle_struct *handle,
NTSTATUS vfs_not_implemented_create_file(struct vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,

View File

@ -614,7 +614,6 @@ static int smb_time_audit_openat(vfs_handle_struct *handle,
static NTSTATUS smb_time_audit_create_file(vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *fname,
uint32_t access_mask,
uint32_t share_access,
@ -640,7 +639,6 @@ static NTSTATUS smb_time_audit_create_file(vfs_handle_struct *handle,
result = SMB_VFS_NEXT_CREATE_FILE(
handle, /* handle */
req, /* req */
dirfsp, /* dirfsp */
fname, /* fname */
access_mask, /* access_mask */
share_access, /* share_access */

View File

@ -838,7 +838,6 @@ err:
static NTSTATUS um_create_file(vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -866,7 +865,6 @@ static NTSTATUS um_create_file(vfs_handle_struct *handle,
return SMB_VFS_NEXT_CREATE_FILE(
handle,
req,
dirfsp,
smb_fname,
access_mask,
share_access,
@ -901,7 +899,6 @@ static NTSTATUS um_create_file(vfs_handle_struct *handle,
status = SMB_VFS_NEXT_CREATE_FILE(
handle,
req,
dirfsp,
client_fname,
access_mask,
share_access,

View File

@ -24,7 +24,6 @@
static NTSTATUS vfs_worm_create_file(vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -63,7 +62,7 @@ static NTSTATUS vfs_worm_create_file(vfs_handle_struct *handle,
}
status = SMB_VFS_NEXT_CREATE_FILE(
handle, req, dirfsp, smb_fname, access_mask,
handle, req, smb_fname, access_mask,
share_access, create_disposition, create_options,
file_attributes, oplock_request, lease, allocation_size,
private_flags, sd, ea_list, result, pinfo,

View File

@ -844,7 +844,6 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_GENERIC_READ, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */
@ -899,7 +898,6 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_GENERIC_READ, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */
@ -1103,7 +1101,6 @@ static uint32_t get_correct_cversion(const struct auth_session_info *session_inf
nt_status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_GENERIC_READ, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */

View File

@ -2429,7 +2429,6 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
nt_status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_READ_ATTRIBUTES, /* access_mask */
FILE_SHARE_READ|FILE_SHARE_WRITE, /* share_access */
@ -2564,7 +2563,6 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p,
nt_status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_WRITE_ATTRIBUTES, /* access_mask */
FILE_SHARE_READ|FILE_SHARE_WRITE, /* share_access */

View File

@ -1396,7 +1396,6 @@ static NTSTATUS get_file_handle_for_metadata(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_cp, /* fname */
FILE_WRITE_ATTRIBUTES, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */

View File

@ -655,7 +655,6 @@ void reply_ntcreate_and_X(struct smb_request *req)
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
access_mask, /* access_mask */
share_access, /* share_access */
@ -1337,7 +1336,6 @@ static void call_nt_transact_create(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
access_mask, /* access_mask */
share_access, /* share_access */
@ -1596,7 +1594,6 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_src, /* fname */
FILE_READ_DATA|FILE_READ_ATTRIBUTES|
FILE_READ_EA, /* access_mask */
@ -1622,7 +1619,6 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_dst, /* fname */
FILE_WRITE_DATA|FILE_WRITE_ATTRIBUTES|
FILE_WRITE_EA, /* access_mask */

View File

@ -4661,7 +4661,6 @@ NTSTATUS create_directory(connection_struct *conn, struct smb_request *req,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_dname, /* fname */
FILE_READ_ATTRIBUTES, /* access_mask */
FILE_SHARE_NONE, /* share_access */
@ -4854,7 +4853,6 @@ static NTSTATUS open_streams_for_delete(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_cp, /* fname */
DELETE_ACCESS, /* access_mask */
(FILE_SHARE_READ | /* share_access */
@ -5875,7 +5873,6 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
NTSTATUS create_file_default(connection_struct *conn,
struct smb_request *req,
struct files_struct **_dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,

View File

@ -749,7 +749,6 @@ struct fsp_lease *find_fsp_lease(struct files_struct *new_fsp,
uint16_t lease_epoch);
NTSTATUS create_file_default(connection_struct *conn,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename * smb_fname,
uint32_t access_mask,
uint32_t share_access,

View File

@ -1842,7 +1842,6 @@ void reply_search(struct smb_request *req)
nt_status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_dname, /* dname */
FILE_LIST_DIRECTORY, /* access_mask */
FILE_SHARE_READ|
@ -2220,7 +2219,6 @@ void reply_open(struct smb_request *req)
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
access_mask, /* access_mask */
share_mode, /* share_access */
@ -2410,7 +2408,6 @@ void reply_open_and_X(struct smb_request *req)
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
access_mask, /* access_mask */
share_mode, /* share_access */
@ -2841,7 +2838,6 @@ void reply_mknew(struct smb_request *req)
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
access_mask, /* access_mask */
share_mode, /* share_access */
@ -2977,7 +2973,6 @@ void reply_ctemp(struct smb_request *req)
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_GENERIC_READ | FILE_GENERIC_WRITE, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */
@ -3222,7 +3217,6 @@ static NTSTATUS do_unlink(connection_struct *conn,
status = SMB_VFS_CREATE_FILE
(conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
DELETE_ACCESS, /* access_mask */
FILE_SHARE_NONE, /* share_access */
@ -7161,7 +7155,6 @@ void reply_rmdir(struct smb_request *req)
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_dname, /* fname */
DELETE_ACCESS, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */
@ -8013,7 +8006,6 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_src, /* fname */
access_mask, /* access_mask */
(FILE_SHARE_READ | /* share_access */
@ -8180,7 +8172,6 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_src, /* fname */
access_mask, /* access_mask */
(FILE_SHARE_READ | /* share_access */
@ -8483,7 +8474,6 @@ NTSTATUS copy_file(TALLOC_CTX *ctx,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_src, /* fname */
FILE_GENERIC_READ, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */
@ -8514,7 +8504,6 @@ NTSTATUS copy_file(TALLOC_CTX *ctx,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_dst, /* fname */
FILE_GENERIC_WRITE, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */

View File

@ -988,7 +988,6 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
status = SMB_VFS_CREATE_FILE(smb1req->conn,
smb1req,
&smb1req->conn->cwd_fsp,
smb_fname,
in_desired_access,
in_share_access,

View File

@ -167,7 +167,6 @@ static NTSTATUS get_posix_fsp(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_tmp, /* fname */
access_mask, /* access_mask */
share_access, /* share_access */
@ -1437,7 +1436,6 @@ static void call_trans2open(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
access_mask, /* access_mask */
share_mode, /* share_access */
@ -2974,7 +2972,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
ntstatus = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_dname, /* dname */
FILE_LIST_DIRECTORY, /* access_mask */
FILE_SHARE_READ|
@ -6736,7 +6733,6 @@ static NTSTATUS smb_set_file_size(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname_tmp, /* fname */
FILE_WRITE_DATA, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */
@ -8001,7 +7997,6 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_WRITE_DATA, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */
@ -8515,7 +8510,6 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
FILE_READ_ATTRIBUTES, /* access_mask */
FILE_SHARE_NONE, /* share_access */
@ -8757,7 +8751,6 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
access_mask, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */
@ -8900,7 +8893,6 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&conn->cwd_fsp, /* dirfsp */
smb_fname, /* fname */
DELETE_ACCESS, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */

View File

@ -1807,7 +1807,6 @@ int smb_vfs_call_openat(struct vfs_handle_struct *handle,
NTSTATUS smb_vfs_call_create_file(struct vfs_handle_struct *handle,
struct smb_request *req,
struct files_struct **dirfsp,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
@ -1827,7 +1826,7 @@ NTSTATUS smb_vfs_call_create_file(struct vfs_handle_struct *handle,
{
VFS_FIND(create_file);
return handle->fns->create_file_fn(
handle, req, dirfsp, smb_fname,
handle, req, smb_fname,
access_mask, share_access, create_disposition, create_options,
file_attributes, oplock_request, lease, allocation_size,
private_flags, sd, ea_list,

View File

@ -244,7 +244,6 @@ static int net_vfs_get_ntacl(struct net_context *net,
status = SMB_VFS_CREATE_FILE(
state.conn_tos->conn,
NULL, /* req */
&state.conn_tos->conn->cwd_fsp,
smb_fname,
FILE_READ_ATTRIBUTES|READ_CONTROL_ACCESS,
FILE_SHARE_READ|FILE_SHARE_WRITE,