From 04afa4b6b50f3a23a1872983c75653dc5f670279 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Fri, 12 Jun 2009 12:54:11 -0700 Subject: s3: Plumb smb_filename through SMB_VFS_CREATE_FILE --- source3/include/proto.h | 8 +++----- source3/include/vfs.h | 10 +++++----- source3/include/vfs_macros.h | 6 +++--- 3 files changed, 11 insertions(+), 13 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index c39bb783e6..1c7ba8725a 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -6632,7 +6632,7 @@ NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn, SMB_STRUCT_STAT *psbuf, files_struct **result); NTSTATUS close_file_fchmod(struct smb_request *req, files_struct *fsp); NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, - const struct smb_filename *smb_dname); + struct smb_filename *smb_dname); void msg_file_was_renamed(struct messaging_context *msg, void *private_data, uint32_t msg_type, @@ -6646,8 +6646,7 @@ NTSTATUS open_streams_for_delete(connection_struct *conn, NTSTATUS create_file_default(connection_struct *conn, struct smb_request *req, uint16_t root_dir_fid, - const char *fname, - uint32_t create_file_flags, + struct smb_filename * smb_fname, uint32_t access_mask, uint32_t share_access, uint32_t create_disposition, @@ -6659,8 +6658,7 @@ NTSTATUS create_file_default(connection_struct *conn, struct ea_list *ea_list, files_struct **result, - int *pinfo, - SMB_STRUCT_STAT *psbuf); + int *pinfo); NTSTATUS get_relative_fid_filename(connection_struct *conn, struct smb_request *req, uint16_t root_dir_fid, diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 9a736a7ca0..e0e022877a 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -117,8 +117,9 @@ /* Leave at 25 - not yet released. Add init_search_op call. - sdann */ /* Leave at 25 - not yet released. Add locking calls. -- zkirsch. */ /* Leave at 25 - not yet released. Add strict locking calls. -- drichards. */ +/* Changed to version 26 - Plumb struct smb_filename to SMB_VFS_CREATE_FILE. */ -#define SMB_VFS_INTERFACE_VERSION 25 +#define SMB_VFS_INTERFACE_VERSION 26 /* to bug old modules which are trying to compile with the old functions */ @@ -145,6 +146,7 @@ struct smb_request; struct ea_list; struct smb_file_time; struct blocking_lock_record; +struct smb_filename; /* Available VFS operations. These values must be in sync with vfs_ops struct @@ -332,8 +334,7 @@ struct vfs_ops { NTSTATUS (*create_file)(struct vfs_handle_struct *handle, struct smb_request *req, uint16_t root_dir_fid, - const char *fname, - uint32_t create_file_flags, + struct smb_filename *smb_fname, uint32_t access_mask, uint32_t share_access, uint32_t create_disposition, @@ -344,8 +345,7 @@ struct vfs_ops { struct security_descriptor *sd, struct ea_list *ea_list, files_struct **result, - int *pinfo, - SMB_STRUCT_STAT *psbuf); + int *pinfo); int (*close_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp); ssize_t (*vfs_read)(struct vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n); ssize_t (*pread)(struct vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n, SMB_OFF_T offset); diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 0b59f8f3ad..d888361dc4 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -49,7 +49,7 @@ /* File operations */ #define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs.ops.open)((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode))) -#define SMB_VFS_CREATE_FILE(conn, req, root_dir_fid, fname, create_file_flags, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo, psbuf) (((conn)->vfs.ops.create_file)((conn)->vfs.handles.create_file, (req), (root_dir_fid), (fname), (create_file_flags), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo), (psbuf))) +#define SMB_VFS_CREATE_FILE(conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) (((conn)->vfs.ops.create_file)((conn)->vfs.handles.create_file, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo))) #define SMB_VFS_CLOSE(fsp) ((fsp)->conn->vfs.ops.close_fn((fsp)->conn->vfs.handles.close_hnd, (fsp))) #define SMB_VFS_READ(fsp, data, n) ((fsp)->conn->vfs.ops.vfs_read((fsp)->conn->vfs.handles.vfs_read, (fsp), (data), (n))) #define SMB_VFS_PREAD(fsp, data, n, off) ((fsp)->conn->vfs.ops.pread((fsp)->conn->vfs.handles.pread, (fsp), (data), (n), (off))) @@ -184,7 +184,7 @@ /* File operations */ #define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs_opaque.ops.open)((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode))) -#define SMB_VFS_OPAQUE_CREATE_FILE(conn, req, root_dir_fid, fname, create_file_flags, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo, psbuf) (((conn)->vfs_opaque.ops.create_file)((conn)->vfs_opaque.handles.create_file, (req), (root_dir_fid), (fname), (create_file_flags), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo), (psbuf))) +#define SMB_VFS_OPAQUE_CREATE_FILE(conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) (((conn)->vfs_opaque.ops.create_file)((conn)->vfs_opaque.handles.create_file, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo))) #define SMB_VFS_OPAQUE_CLOSE(fsp) ((fsp)->conn->vfs_opaque.ops.close_fn((fsp)->conn->vfs_opaque.handles.close_hnd, (fsp))) #define SMB_VFS_OPAQUE_READ(fsp, data, n) ((fsp)->conn->vfs_opaque.ops.vfs_read((fsp)->conn->vfs_opaque.handles.vfs_read, (fsp), (data), (n))) #define SMB_VFS_OPAQUE_PREAD(fsp, data, n, off) ((fsp)->conn->vfs_opaque.ops.pread((fsp)->conn->vfs_opaque.handles.pread, (fsp), (data), (n), (off))) @@ -320,7 +320,7 @@ /* File operations */ #define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) (((handle)->vfs_next.ops.open)((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode))) -#define SMB_VFS_NEXT_CREATE_FILE(handle, req, root_dir_fid, fname, create_file_flags, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo, psbuf) (((handle)->vfs_next.ops.create_file)((handle)->vfs_next.handles.create_file, (req), (root_dir_fid), (fname), (create_file_flags), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo), (psbuf))) +#define SMB_VFS_NEXT_CREATE_FILE(handle, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) (((handle)->vfs_next.ops.create_file)((handle)->vfs_next.handles.create_file, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo))) #define SMB_VFS_NEXT_CLOSE(handle, fsp) ((handle)->vfs_next.ops.close_fn((handle)->vfs_next.handles.close_hnd, (fsp))) #define SMB_VFS_NEXT_READ(handle, fsp, data, n) ((handle)->vfs_next.ops.vfs_read((handle)->vfs_next.handles.vfs_read, (fsp), (data), (n))) #define SMB_VFS_NEXT_PREAD(handle, fsp, data, n, off) ((handle)->vfs_next.ops.pread((handle)->vfs_next.handles.pread, (fsp), (data), (n), (off))) -- cgit