In the function source3/modules/vfs_default.c:vfswrap_is_offline we see the following: status = get_full_smb_filename(talloc_tos(), fname, &path); if (!NT_STATUS_IS_OK(status)) { errno = map_errno_from_nt_status(status); return false; } return (dmapi_file_flags(path) & FILE_ATTRIBUTE_OFFLINE) != 0; Should the path that was allocated above be freed? Sure, it will get cleaned up, but perhaps it should be explicitly freed. I will prepare a patch against master.
This is the patch: diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 2dc7ec7..745b36c 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1621,6 +1621,7 @@ static bool vfswrap_is_offline(struct vfs_handle_struct *h { NTSTATUS status; char *path; + bool offline = false; if (ISDOT(fname->base_name) || ISDOTDOT(fname->base_name)) { return false; @@ -1639,7 +1640,11 @@ static bool vfswrap_is_offline(struct vfs_handle_struct * return false; } - return (dmapi_file_flags(path) & FILE_ATTRIBUTE_OFFLINE) != 0; + offline = dmapi_file_flags(path) & FILE_ATTRIBUTE_OFFLINE != 0; + + TALLOC_FREE(path); + + return offline; } static int vfswrap_set_offline(struct vfs_handle_struct *handle,
Hi, Richard! Would it be possible that you do this as a git-format patch formatted attachment? Thanks, Volker
Created attachment 6951 [details] The patch in git --format-patch format No sooner said than done.
Pushed to master as dab8472731e9c1328eab2ff90f2ab8846b02cd46. Please re-open if you see a pressing need to get this into any release. Thanks, Volker