From f7235a59b707cabf831127100916de63b2ef1bc7 Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Mon, 19 May 2008 02:36:35 -0700 Subject: [PATCH] Password prompt only once, and before backgrounding. --- src/ChangeLog | 8 ++++++++ src/main.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7c1869b0..5a0a927e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2008-05-19 Micah Cowan + + * main.c (main): Password prompt should be done only once (not + once per argument), and should be done prior to the background + fork. + 2008-05-17 Steven Schubiger * init.c (defaults): Set the preferred IP family to `none' by @@ -6,6 +12,8 @@ 2008-05-17 Kenny Parnell (cmd_spec_prefer_family): Initialize prefer_family to prefer_none. +2008-05-17 Micah Cowan + * main.c (main): Handle Ctrl-D on command-line. 2008-05-15 Steven Schubiger diff --git a/src/main.c b/src/main.c index 228bb27f..d68cdbd6 100644 --- a/src/main.c +++ b/src/main.c @@ -947,6 +947,14 @@ for details.\n\n")); exit (1); } + if (opt.ask_passwd) + { + opt.passwd = prompt_for_password (); + + if (opt.passwd == NULL || opt.passwd[0] == '\0') + exit (1); + } + #ifdef MSDOS if (opt.wdebug) dbug_init(); @@ -1030,14 +1038,6 @@ for details.\n\n")); char *filename = NULL, *redirected_URL = NULL; int dt; - if (opt.ask_passwd) - { - opt.passwd = prompt_for_password (); - - if (opt.passwd == NULL || opt.passwd[0] == '\0') - exit (1); - } - if ((opt.recursive || opt.page_requisites) && (url_scheme (*t) != SCHEME_FTP || url_uses_proxy (*t))) { -- 2.39.2