The Samba-Bugzilla – Bug 12614
libsmbclient ignores username part after @
Last modified: 2017-08-01 13:32:38 UTC
Created attachment 13021 [details]
Screenshot of Wireshark dump of gvfsd-smb login sequence
When trying to connect to an smb share, libsmbclient ignores the part after an @ in the username. This causes login to fail when an @-part is required.
I discovered this bug through GNOME (original bug report at https://bugzilla.gnome.org/show_bug.cgi?id=775477), but it turns out the bug is in libsmbclient.
I've attached a screenshot of a Wireshark dump of a login attempt with gvfsd-smb.
Created attachment 13022 [details]
Screenshot of Wireshark dump of mount.cifs login sequence
This is a screenshot of a wireshark dump of a login attempt to the same host using mount.cifs
This will be mostly fixed in 4.6 (at least for the 'smbclient' command line tool).
I'm not sure if libsmbclient is fixed yet.
I just checked whether it was fixed (using 4.6.5). I can indeed connect using smbclient, but gvfsd-smb still fails.
Looking through the code, it seems `cli_session_creds_init` mistakenly thinks it's a principal, and proceeds to strip the part after the @ from the username (source3/libsmb/cliconnect.c, lines 111-122). I'm not too sure what the best option would be here, so I'll leave that to the Samba team.