On Wed, 25 Jul 2007, Matthew Woehlke wrote:

> Read from stderr? I admit I've heard stderr is bi-directional but I can't say
> I've ever seen it used to read input.

 Well, `wget' can be used as a filter (and I did do so a couple of times 
in some scripts in the past; I would be surprised if others did not), so 
you better keep its standard input and output intact.  You could try to 
fopen(ttyname(fileno(stderr)), "r") or suchlike instead, but "stderr" 
should just work.  You may want to have a look at what `ssh' does for 
example.

> I both dislike GNU formatting and am not familiar with it, so obviously
> someone that understands it will have to fix this.

 Well, chances are nobody could be bothered to fix your patch if you 
submit it incorrectly formatted; I would certainly not if I were the 
maintainer.  If you do not like the GNU coding standard (which can be read 
by issuing `info standards' on a reasonably complete GNU system, BTW), 
then write your code however you like and run `indent' over it before 
submission.

 I prefer the Linux style myself, but I understand if I want to 
participate, I have to play the rules set by the copyright holders or 
otherwise I shall be ignored.  This is free software though, so if you 
disagree, the license allows you to derive your own project using your 
rules as you like as long as you obey the license.

> Which strikes me as odd, really, but I would guess not so many people use wget
> for sites that need a password (I never did until recently), at least not on
> non-private computers. I.e. if they do, they're ok with the existing security
> risks.

 You can store your password in the input file provided to `wget' so it 
will be concealed from all the other users of the system apart from the 
administrator.  And if you do not trust your administrator, you are lost 
anyway (they could log all your keystrokes if they wanted to), so why 
bother?

> I very much doubt this patch will be accepted, there are huge problems with it
> yet (like, it should persist the password, work with ftp, etc). It was meant
> more as a starting point, and for commentary... and you've made some good
> comments, thanks!

 You are welcome.

  Maciej

Reply via email to