[RFC]: VFS open return NTSTATUS (was:Add vfs_admin vfs module)

Jeremy Allison jra at samba.org
Thu Oct 29 19:39:50 UTC 2015


On Thu, Oct 29, 2015 at 04:54:02PM +0100, Volker Lendecke wrote:
> On Thu, Oct 29, 2015 at 07:32:44AM -0700, Richard Sharpe wrote:
> > On Wed, Oct 28, 2015 at 2:04 PM, Uri Simchoni <uri at samba.org> wrote:
> > > Hi,
> > >
> > > I've spent some time trying to change the interface of VFS POSIX open
> > > (open_fn). The change is that instead of returning a created file
> > > descriptor, it now sets the file descriptor in the FSP and returns an
> > > ntstatus.This can serve as a POC for a migration for all VFS methods to
> > > return NTSTATUS.
> > 
> > One more comment here is that being able to return NTSTATUS from VFS
> > functions means that we have access to the full range of Windows error
> > codes, not that poor Unix substitute.
> 
> I'm not sure about the poverty of the unix errno. SHARING_VIOLATION
> might be conveyed by TXTBUSY for example. Wherever I see NTSTATUS these
> days I try to find ways to convert that back to errno, if only for the
> reason to reduce dependencies.

For isolated subsystems I agree 100%. However, the VFS is the
very opposite of an isolated subsystem IMHO :-). It already
*has* to deal with NTSTATUS, so standardizing on that as an
error return inside the VFS doesn't make our dependencies
worse, and helps contributors understand our error code
better I think.

Jeremy.



More information about the samba-technical mailing list