[PATCH] vfs: propagate snapshot enumeration permissions errors
jra at samba.org
Thu Feb 27 09:53:38 MST 2014
On Thu, Feb 27, 2014 at 10:51:13AM +0100, David Disseldorp wrote:
> Hi Andrew,
> On Thu, 27 Feb 2014 12:33:14 +1300, Andrew Bartlett wrote:
> > On Thu, 2014-02-27 at 00:06 +0100, David Disseldorp wrote:
> > > The current FSCTL_GET_SHADOW_COPY_DATA/FSCTL_SRV_ENUMERATE_SNAPSHOTS
> > > handler squashes all non-ENOSYS errors into an NT_STATUS_UNSUCCESSFUL
> > > response.
> > > This commit ensures that permissions errors are propagated up to the
> > > client as NT_STATUS_ACCESS_DENIED, to aid debugging.
> > > The Windows Explorer "Previous Versions" dialogue doesn't appear to
> > > distinguish between error codes. It displays "There are no previous
> > > versions available" in both cases.
> > Any particular reason not to use the generic mapping from unix error
> > codes?
> I only tested how the "Previous Versions" dialogue handled the
> NT_STATUS_ACCESS_DENIED error code. That said, I don't expect other
> error codes to be a problem, so can change it to call
> map_nt_error_from_unix() if you'd prefer.
Yes please. I think that's the best solution as we
don't then special-case error codes.
More information about the samba-technical