Federico Mena Quintero wrote: > For the past few months at Novell, I've been working on Samba-related > stuff for gnome-vfs and Nautilus. Attached is a patch for gnome-vfs's > smb-method.c which does a few things:
Awesome. > - Turns off SMBCCTX_FLAG_NO_AUTO_ANONYMOUS_LOGON. This is what causes > the "I get prompted for a password for everything" bug. I have tried to > figure out why this flag got introduced, but it only seems to cause > trouble --- our perform_authentication() and its series of fallbacks > already take the proper steps to ensure that the user is only prompted > for authentication if absolutely required. Without this flag if a certain set of credentials fail, then libsmbclient tries to do an anonymous logon, which from gnome-vfs's point of view unexpected behavior, user confusion and frustration. There's also no real simple way to tell (from within gnome-vfs) whether this 'helpful' behavior occurred or not, but that's beside the point. smb-method tries to do an anonymous login first before prompting the user for a password. Obviously we're doing it wrong, if the only way anonymous logins work is with SMBCCTX_FLAG_NO_AUTO_ANONYMOUS_LOGON turned off. We currently use 'guest' as an anonymous login. This fixed problems with anonymous logins on non-domain simple password based SMB networks. From what I remember NULL user/password strings is what libsmbclient uses for it's anonymous login. We may need to do try various anonymous logins sequentially as (ie: NULL credentials, followed by 'guest'). Note that defaulting to an anonymous login is not a problem. The fallback in libsmbclient is the only problem. If a user typed in a username then that should be the only credentials used, and the password should be rejected when invalid. In short, the anonymous login code in smb-method needs to be fixed for all the different kinds of windows networks. Simply removing the flag will cause user confusion and hard to decipher bug reports. Again, I think it's great this is being worked on. The sheer number of possible configurations for SMB networks makes this piece of code a tough one. Cheers, Nate _______________________________________________ gnome-vfs-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
