Mercurial > gftp.yaz
diff lib/config_file.c @ 332:6317b45645a8
2003-12-7 Brian Masney <masneyb@gftp.org>
* lib/options.h lib/config_file.c - removed scramble_passwords
option. Instead, make this the default action all the time. This
is to avoid having too many unnecessary options. Also put a note
at the top of the bookmarks file stating the passwords are being
scrambled.
author | masneyb |
---|---|
date | Wed, 10 Dec 2003 02:22:56 +0000 |
parents | 532eb171d5c2 |
children | d207b8241e96 |
line wrap: on
line diff
--- a/lib/config_file.c Tue Dec 09 15:57:27 2003 +0000 +++ b/lib/config_file.c Wed Dec 10 02:22:56 2003 +0000 @@ -718,12 +718,12 @@ gftp_write_bookmarks_file (void) { gftp_bookmarks_var * tempentry; - char *bmhdr, *tempstr, *password; - intptr_t scramble_passwords; + char *bmhdr, *pwhdr, *tempstr, *password; FILE * bmfile; int i; bmhdr = N_("Bookmarks file for gFTP. Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>. Warning: Any comments that you add to this file WILL be overwritten"); + pwhdr = N_("Note: The passwords contained inside this file are scrambled. This algorithm is not secure. This is to avoid your password being easily remembered by someone standing over your shoulder while you're editing this file. Prior to this, all passwords were stored in plaintext."); if ((tempstr = expand_path (BOOKMARKS_FILE)) == NULL) { @@ -741,10 +741,9 @@ g_free (tempstr); write_comment (bmfile, _(bmhdr)); + write_comment (bmfile, _(pwhdr)); fwrite ("\n", 1, 1, bmfile); - gftp_lookup_global_option ("scramble_passwords", &scramble_passwords); - tempentry = gftp_bookmarks->children; while (tempentry != NULL) { @@ -759,12 +758,7 @@ tempstr++; if (tempentry->save_password && tempentry->pass != NULL) - { - if (scramble_passwords) - password = gftp_scramble_password (tempentry->pass); - else - password = g_strdup (tempentry->pass); - } + password = gftp_scramble_password (tempentry->pass); else password = NULL;