1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Password prompt only once, and before backgrounding.

This commit is contained in:
Micah Cowan 2008-05-19 02:36:35 -07:00
parent 7c46e0f2c1
commit f7235a59b7
2 changed files with 16 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2008-05-19 Micah Cowan <micah@cowan.name>
* 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 <schubiger@gmail.com> 2008-05-17 Steven Schubiger <schubiger@gmail.com>
* init.c (defaults): Set the preferred IP family to `none' by * init.c (defaults): Set the preferred IP family to `none' by
@ -6,6 +12,8 @@
2008-05-17 Kenny Parnell <k.parnell@gmail.com> 2008-05-17 Kenny Parnell <k.parnell@gmail.com>
(cmd_spec_prefer_family): Initialize prefer_family to prefer_none. (cmd_spec_prefer_family): Initialize prefer_family to prefer_none.
2008-05-17 Micah Cowan <micah@cowan.name>
* main.c (main): Handle Ctrl-D on command-line. * main.c (main): Handle Ctrl-D on command-line.
2008-05-15 Steven Schubiger <schubiger@gmail.com> 2008-05-15 Steven Schubiger <schubiger@gmail.com>

View File

@ -947,6 +947,14 @@ for details.\n\n"));
exit (1); exit (1);
} }
if (opt.ask_passwd)
{
opt.passwd = prompt_for_password ();
if (opt.passwd == NULL || opt.passwd[0] == '\0')
exit (1);
}
#ifdef MSDOS #ifdef MSDOS
if (opt.wdebug) if (opt.wdebug)
dbug_init(); dbug_init();
@ -1030,14 +1038,6 @@ for details.\n\n"));
char *filename = NULL, *redirected_URL = NULL; char *filename = NULL, *redirected_URL = NULL;
int dt; 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) if ((opt.recursive || opt.page_requisites)
&& (url_scheme (*t) != SCHEME_FTP || url_uses_proxy (*t))) && (url_scheme (*t) != SCHEME_FTP || url_uses_proxy (*t)))
{ {