Re: SMB module authentication rewrite patch



On Thu, 2005-01-06 at 02:08 +0000, Nielsen wrote:
> I've updated and tested the patch. The new patch is found here:
> http://bugzilla.gnome.org/show_bug.cgi?id=132933
> 
> As noted earlier this patch rewrites most of the gnome-vfs SMB 
> authentication code. The previous code deadlocks under circumstances.
> 
> The per server caching issue isn't tackled in this patch yet, but this 
> is the first step and should increase stability greatly. It would be 
> nice to get this reviewed, critiqued and into GNOME 2.10 before the 
> feature freeze on Jan 10th.

I'm just back from a vacation. I don't think an actually working smb
authentication mechanism is a feature, but I'd still like to get this in
as soon as possible.

There was a bug that made it crash on my machine due to entries in
default_user_hashtable being used after being freed. I fixed this (it
was the normal g_hashtable_insert reusing the old key problem).

Also, do_read() set bytes_read wrongly if n < 0.

There might be other problems, because i'm really tired at the moment
and was pretty sloppy when reviewing. However, I think the approach is
right, so I commited it.

How is getting the SMBCCTX_FLAG_NO_AUTO_ANON patch accepted upstream
going? Non guest login on guest-supporting shares really isn't gonna
work at all without it.

Also, this code:
/* We have no credentials ... */			
} else {
	DEBUG_SMB(("[auth] No credentials, returning null values\n"));
	strncpy (username_out, "", unmaxlen);
	strncpy (password_out, "", pwmaxlen);
	strncpy (domain_out, "", domainmaxlen);
}
is always gonna be called for the first time when you get an
authentication request. Shouldn't it try something else (the old code
did "no" "match" as user/pwd) so that it doesn't accidentally cause a
guest login that succeeds?

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suave dishevelled stage actor from a doomed world. She's a violent 
bisexual Hell's Angel looking for love in all the wrong places. They fight 
crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]