From 8f4e8be85547427cf6a3969d1738d1ed68ee195e Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 24 Feb 2020 14:24:12 +0100 Subject: [PATCH] VFS: default: let vfswrap_is_offline() take conn, not handle vfswrap_is_offline() has been converted to a "helper" function some time ago, it had been a VFS interface function before. To make this change more obvious let it take a struct connection_struct instead of a struct vfs_handle_struct which is the canonical first parameter to VFS functions. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14293 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit d4c69d82bdc0fa029609032a9d32f32fa1708beb) --- source3/modules/vfs_default.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 37b59d8c3c0..209db91381e 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1638,7 +1638,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle, return NT_STATUS_NOT_SUPPORTED; } -static bool vfswrap_is_offline(struct vfs_handle_struct *handle, +static bool vfswrap_is_offline(struct connection_struct *conn, const struct smb_filename *fname, SMB_STRUCT_STAT *sbuf); @@ -1648,7 +1648,7 @@ static NTSTATUS vfswrap_get_dos_attributes(struct vfs_handle_struct *handle, { bool offline; - offline = vfswrap_is_offline(handle, smb_fname, &smb_fname->st); + offline = vfswrap_is_offline(handle->conn, smb_fname, &smb_fname->st); if (offline) { *dosmode |= FILE_ATTRIBUTE_OFFLINE; } @@ -1798,7 +1798,9 @@ static NTSTATUS vfswrap_fget_dos_attributes(struct vfs_handle_struct *handle, { bool offline; - offline = vfswrap_is_offline(handle, fsp->fsp_name, &fsp->fsp_name->st); + offline = vfswrap_is_offline(handle->conn, + fsp->fsp_name, + &fsp->fsp_name->st); if (offline) { *dosmode |= FILE_ATTRIBUTE_OFFLINE; } @@ -3543,7 +3545,7 @@ static bool vfswrap_aio_force(struct vfs_handle_struct *handle, struct files_str return false; } -static bool vfswrap_is_offline(struct vfs_handle_struct *handle, +static bool vfswrap_is_offline(struct connection_struct *conn, const struct smb_filename *fname, SMB_STRUCT_STAT *sbuf) { @@ -3555,7 +3557,7 @@ static bool vfswrap_is_offline(struct vfs_handle_struct *handle, return false; } - if (!lp_dmapi_support(SNUM(handle->conn)) || !dmapi_have_session()) { + if (!lp_dmapi_support(SNUM(conn)) || !dmapi_have_session()) { #if defined(ENOTSUP) errno = ENOTSUP; #endif -- 2.11.4.GIT