Re: PATCH for sftp-method to use gnome-keyring



On Mon, 2004-05-24 at 07:00, Fernando Herrera wrote:
> 	Just reading the patch... I love leaking! :)
> New patch attached. (and fixing a leak of password in the current code).
> 
> 
> BTW, don't write patches at 6am in the morning the day after last
> GUADEC-ES night drinking queimada and sleeping 3 hours.

Nice work!!

In invoke_save_auth() there really isn't any use for all the strdups.
The caller-passed strings will exist for the lifetime of the function.

+		if (full_auth == TRUE) {
+			invoke_save_auth (uri, keyring, user, object, authtype, password);
+		}

You also need to make sure that save_password was acutally passed back
as TRUE from the full_auth callback.

You want to pass
GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_SAVING_SUPPORTED in flags
in the full_auth callback. This is not supported by libgnomeui atm, but
it allows us to only show the "save password" checkbox when supported.

Also, there is a lot of parsing code in invoke_fill_auth and
invoke_full_auth that could be shared in a function.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suicidal devious cyborg with a passion for fast cars. She's a psychotic 
mutant journalist who hides her beauty behind a pair of thick-framed 
spectacles. They fight crime! 




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