libsmbclient: how to see if authentication succeeded

Willem van Engen dev-list-samba at
Tue May 27 07:42:48 GMT 2008

Hi Andrew,

Thanks for your quick reply.

On Tue, 2008-05-27 at 14:10 +1000, Andrew Bartlett wrote:
> On Mon, 2008-05-26 at 20:18 +0200, Willem van Engen wrote:
> > I'm looking for a way in libsmbclient to see if authentication
> > succeeded or not. 
> Perhaps we should move up a layer here.  Why do you need to know if
> authentication succeeded?

Gnome's new virtual filesystem layer gvfs first opens a connection
before any file access is done, similar to mounting a filesystem. Here
connections are cached (not only smb but also other protocols), a fuse
filesystem is mounted optionally, and the connection appears in the gui.
This would be a sensible place to error out if authentication fails,
inform the user, and cancel the mount. If merely a directory is
unreadable, it still makes sense to have the connection opened. Or at
least the user should be able to know the difference.

What would be the correct direction to proceed, exposing a login
function as I described in the previous mail?

Kind regards,
- Willem van Engen

More information about the samba-technical mailing list