From 7f89810e3c6ff92b0771ca11a817b82e081ccfa5 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 15 Nov 2008 13:30:43 +0100 Subject: Connection Manager: Add ability not to save any passwords --- UCore.pas | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'UCore.pas') diff --git a/UCore.pas b/UCore.pas index de62e19..90ea68b 100644 --- a/UCore.pas +++ b/UCore.pas @@ -320,6 +320,14 @@ begin def_pass := default_password; + // Disable password saving if requested + if ConfConnMgrDoNotSynchronizeKeyring then begin + flags := flags and (not VFS_ASK_PASSWORD_SAVING_SUPPORTED); + if password_save <> nil then password_save^ := VFS_PASSWORD_SAVE_NEVER; + end; + if ConfConnMgrDoNotSavePasswords then + flags := flags and (not VFS_ASK_PASSWORD_SAVE_INTERNAL); + // Use stored password, if previously set if ((flags and VFS_ASK_PASSWORD_ARCHIVE_MODE) = VFS_ASK_PASSWORD_ARCHIVE_MODE) and (password <> nil) and (Thread.AEngine is TVFSEngine) and (Length((Thread.AEngine as TVFSEngine).Password) > 0) then @@ -373,6 +381,10 @@ begin (Thread.AEngine as TVFSEngine).Password := string(password^); (Thread.AEngine as TVFSEngine).PasswordUsed := True; end; + + // Strip password saving if requested + if ConfConnMgrDoNotSynchronizeKeyring and (password_save <> nil) then + password_save^ := VFS_PASSWORD_SAVE_NEVER; end; function vfs_progress_callback(position, max: Int64; user_data: Pointer): LongBool; cdecl; -- cgit v1.2.3