summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2020-10-02 17:29:58 +0200
committerJeremy Allison <jra@samba.org>2020-10-02 21:00:05 +0000
commit322574834f1e71bc01f21be9059ca4d386517c84 (patch)
tree93f427036eb20da2df5ae30d186f3c16321a1fe6
parent1c444f9c37c01f986cbe880f0a6d4abdd8c34a0b (diff)
downloadsamba-322574834f1e71bc01f21be9059ca4d386517c84.tar.gz
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
-rw-r--r--examples/VFS/skel_opaque.c1
-rw-r--r--examples/VFS/skel_transparent.c2
-rw-r--r--source3/include/vfs.h4
-rw-r--r--source3/include/vfs_macros.h8
-rw-r--r--source3/lib/adouble.c6
-rw-r--r--source3/modules/vfs_default.c3
-rw-r--r--source3/modules/vfs_fruit.c5
-rw-r--r--source3/modules/vfs_full_audit.c2
-rw-r--r--source3/modules/vfs_media_harmony.c3
-rw-r--r--source3/modules/vfs_not_implemented.c1
-rw-r--r--source3/modules/vfs_time_audit.c2
-rw-r--r--source3/modules/vfs_unityed_media.c3
-rw-r--r--source3/modules/vfs_worm.c3
-rw-r--r--source3/printing/nt_printing.c3
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c2
-rw-r--r--source3/smbd/dosmode.c1
-rw-r--r--source3/smbd/nttrans.c4
-rw-r--r--source3/smbd/open.c3
-rw-r--r--source3/smbd/proto.h1
-rw-r--r--source3/smbd/reply.c11
-rw-r--r--source3/smbd/smb2_create.c1
-rw-r--r--source3/smbd/trans2.c8
-rw-r--r--source3/smbd/vfs.c3
-rw-r--r--source3/utils/net_vfs.c1
24 files changed, 9 insertions, 72 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 0a6ca4d9200..90ee82ab258 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -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,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 677af2217bf..d48ac47443b 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -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,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 81e9a9f8716..b282e2a361b 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -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,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index e0a8d391945..70d9ab6784c 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -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))
diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c
index 42b2e808d66..d701465e3d1 100644
--- a/source3/lib/adouble.c
+++ b/source3/lib/adouble.c
@@ -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,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index d42706a0fff..49e92ffea55 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -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,
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 90eaea4d911..8a843407596 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -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 */
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 82f60f8a68b..5fceac6cf1f 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -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 */
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index 202c711ff92..e3ce2804b5f 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -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,
diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c
index 529ad579f49..9b5b0f6b4f6 100644
--- a/source3/modules/vfs_not_implemented.c
+++ b/source3/modules/vfs_not_implemented.c
@@ -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,
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index f70ff73fec1..c6b0130bb93 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -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 */
diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c
index c42acaef3fe..ca20dc6baeb 100644
--- a/source3/modules/vfs_unityed_media.c
+++ b/source3/modules/vfs_unityed_media.c
@@ -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,
diff --git a/source3/modules/vfs_worm.c b/source3/modules/vfs_worm.c
index 85232bd101e..3ae1f9f39e6 100644
--- a/source3/modules/vfs_worm.c
+++ b/source3/modules/vfs_worm.c
@@ -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,
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index e57ff3404de..fc4e552e213 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -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 */
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 2f18127b03b..c0c67c792e2 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -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 */
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 8eef16404e0..18e46e86529 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -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 */
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index bc3cb82c889..9f5737b83c0 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -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 */
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 0686081b993..e55e4590336 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -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,
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 8c36f9ec01f..66a5bd87902 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -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,
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index a3c992beee2..4fd60c1a9d1 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -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 */
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index c082b806743..dbbf00dd905 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -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,
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 40c2559861f..14c788e6c0b 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -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 */
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 9ba104903f8..515b8c079b4 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -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,
diff --git a/source3/utils/net_vfs.c b/source3/utils/net_vfs.c
index ddd9514893f..59e9c60b3a6 100644
--- a/source3/utils/net_vfs.c
+++ b/source3/utils/net_vfs.c
@@ -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,