[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wget
Subject:    RE: (Extended) Reading commandline option values from files or fi
From:       Herold Heiko <Heiko.Herold () previnet ! it>
Date:       2002-04-29 11:10:37
[Download RAW message or body]

> From: Umut Sezen [mailto:u.sezen@warwick.ac.uk]
> To: wget-patches@sunsite.dk
> 
> (Applies to GNU WGet v1.8.1)
> 
> Hi,
> 
> I extended my previous patch to support reading option values 
> from file
> descriptors as well. I think these two features will make 
> wget more secure
> and more functional. Currently I do not intend to extend this 
> patch, so you
> can consider this as the final version.
> 
> This patch will add wget two features reading the vlues of 
> the command-line
> options from files or file descriptors. These features
> will enable to supply passwords from files or pipes.
>       i.e.
>            wget --option=normal
>            wget --option=@filename
>            wget --option=:file_descriptor
> 

You know, while reading this far there's a thing I don't like: this does
invalidate every other use of the @ and : characters, for every option. What
about --output-file, --input-file, and lots of other options (including
possible future ones) ? Somebody could want/need to use filenames starting
with those characters (perfectly legal on unix). I'd say at least a couple
of options are need in order to set those characters (if wanted), better if
more than one character is possible, for example
--file-magic=@@@ --http-passwd=@@@passwd.txt
But, this still would not work well enough - just suppose you have a generic
script using wget, and you do set --file-magic=<something>, and sooner or
later a argument used somewhere for that script (for example -R) uses
exactly <something> - BUM! This means your script would need to check the
arguments, use another <something> if there is collision, and so on. Really
bad thing.
It would be better imho if the options itself are modified, in that case the
variable option wouldn't be necessary, supposing we keep the @ and :, this
could be
--@http-passwd=passwd.txt --:proxy-passwd=0

Heiko Herold

-- 
-- PREVINET S.p.A.            Heiko.Herold@previnet.it
-- Via Ferretto, 1            ph  x39-041-5907073
-- I-31021 Mogliano V.to (TV) fax x39-041-5907472
-- ITALY
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic