Comment 73 for bug 207072

Revision history for this message
Sebastien Bacher (seb128) wrote :

upstream comment:

"- code duplication is an issue but as temporary solution I'm fine with this.
There are more design changes underway and users can't wait anymore. Later I
plan to rip out some code and clean the code for both backends.
- the patch as is is bad due to recent kerberos change - yes, libsmbclient
expects *some* username, otherwise it refuses to do kerberos tries. However
removing anonymous auth attempt is preventing me to get list of workgroups and
machines at all.
- sharing active login credentials with the smbbrowse and the smb backend can
be partially handled by gnome-keyring, in case when user saves password to
keyring. This needs more work still.

I'm attaching updated patch, doing authentication tries in three stages:
  1. kerberos (current username, no password)
  2. anonymous
  3. ask for password and loop until success or cancelled

However I'm little afraid here due to number of tries we do before asking user
for credentials. This can cause account or machine being locked out or banned
for some time. Partial solution might be to look at krb5 api and somehow detect
active ticket for the particular machine we're trying to connect to.

Browsing samba network is slow due to number of attempts we do (each attempt
can take 5-10 seconds or more).

Please test this updated patch, I will backport some changes made here to smb
backend then."