Mercurial > gftp.yaz
changeset 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 | 6c394c91ee57 |
children | 5f28f1eaade9 |
files | ChangeLog lib/config_file.c lib/options.h |
diffstat | 3 files changed, 11 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Dec 09 15:57:27 2003 +0000 +++ b/ChangeLog Wed Dec 10 02:22:56 2003 +0000 @@ -1,4 +1,10 @@ 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. + * lib/config_file.c lib/gftp.h lib/misc.c lib/options.h - added scramble passwords option. This patch is mostly from Aurelien Jarno <lists@aurel32.net>, but it was modified by me quite a bit. This is @@ -1820,7 +1826,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.181 2003/12/08 02:53:23 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.182 2003/12/10 02:22:55 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- 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;
--- a/lib/options.h Tue Dec 09 15:57:27 2003 +0000 +++ b/lib/options.h Wed Dec 10 02:22:56 2003 +0000 @@ -88,9 +88,6 @@ {"show_trans_in_title", N_("Show transfer status in title"), gftp_option_type_checkbox, GINT_TO_POINTER(1), NULL, 0, N_("Show the file transfer status in the titlebar"), GFTP_PORT_GTK, NULL}, - {"scramble_passwords", N_("Store passwords in scrambled form"), - gftp_option_type_checkbox, GINT_TO_POINTER(1), NULL, 0, - N_("Scramble passwords stored in ~/.gftp/bookmarks"), GFTP_PORT_ALL, NULL}, {"", N_("Network"), gftp_option_type_notebook, NULL, NULL, GFTP_CVARS_FLAGS_SHOW_BOOKMARK, NULL, GFTP_PORT_GTK, NULL},