gvfs and (lib)smbclient (resend)

Ross Lagerwall rosslagerwall at gmail.com
Sat Aug 2 09:45:23 MDT 2014

On Sat, Aug 02, 2014 at 08:11:14AM -0700, Richard Sharpe wrote:
> On Sat, Aug 2, 2014 at 8:01 AM, Ross Lagerwall <rosslagerwall at gmail.com> wrote:
> > While some of these problems could probably be fixed by extending
> > libsmbclient, I feel that libsmbclient is probably slightly too
> > high-level for ideal use in gvfs.  I note the existence of
> > libsmbclient-raw but it appears to not provide a stable (or documented!)
> > API.  Searching through the mailing lists shows that I'm not the only
> > one to come to this conclusion, but I suppose the difficulty is in
> > getting the level of abstraction in the library correct.
> Hi Ross,
> So, assuming that a 'better' API becomes available, two questions come to mind:
> 1. How are you going to harmonize these with POSIX? That is, it would
> seem that you are going to have to engage in some pretty heroic code
> contortions for this to work both with POSIX and NTFS semantics.

Who says the API needs to have POSIX semantics?  gvfs doesn't provide a

> 2. Do you have a concise list of the API calls you would like available?
> Something else that comes to mind is: Do you want all functions to
> return NT_STATUS results and then have functions like
> map_nt_status_to_errno and nt_errstr?

I think that would be useful.  Certainly for gvfs's purpose, getting an
error string that's more explicit than a POSIX errno would be good.

> It might be easier to get what you want if we precisely define what you want.

Well I realise in the open source world you generally don't get what you
want without doing the work for it, so I'm probing for ideas and
feedback from the community rather than just defining an API that I
expect someone to implement.  What I mentioned previously was just the
shortcomings of using libsmbclient from gvfs's point-of-view.  Having an
API that maps closely to the GIO API [1] would be useful from my point
of view but not necessarily to the community at large.  Having an API
that abstracts the details of the SMB2 protocol but still exposes most
of its functionality could be useful to both parties.

[1] https://developer.gnome.org/gio/stable/GFile.html

Ross Lagerwall

More information about the samba-technical mailing list