As per MS-FSA 2.1.1.5 this is a per stream attribute, but our backends don't
support it in a consistent way, therefor just pretend success and ignore the
request.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
return NT_STATUS_INVALID_PARAMETER;
}
+ if (fsp_is_alternate_stream(fsp)) {
+ /*
+ * MS-FSA 2.1.1.5 IsSparse
+ *
+ * This is a per stream attribute, but our backends don't
+ * support it a consistent way, therefor just pretend
+ * success and ignore the request.
+ */
+ DBG_DEBUG("Ignoring request to set FILE_ATTRIBUTE_SPARSE on "
+ "[%s]\n", fsp_str_dbg(fsp));
+ return NT_STATUS_OK;
+ }
+
DEBUG(10,("file_set_sparse: setting sparse bit %u on file %s\n",
sparse, smb_fname_str_dbg(fsp->fsp_name)));