[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] getpass echoes on many systems
From: |
Paul Eggert |
Subject: |
Re: [Bug-gnulib] getpass echoes on many systems |
Date: |
02 Oct 2003 11:24:31 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
address@hidden (Larry Jones) writes:
> They may have been closed and reopened. In general, I don't think
> there's anything that says a user isn't allowed to do:
>
> fclose (stderr);
> fclose (stdin);
> stdin = stderr = fopen ("/dev/null", "r+");
That program isn't strictly conforming C code, since stdin and stderr
need not be lvalues. However, glibc does allow it so I suppose we
should cater to it.
> From: Bruno Haible <address@hidden>
> Date: Thu, 2 Oct 2003 19:08:49 +0200
2003-10-02 Bruno Haible <address@hidden>
* getpass.c (getpass): Don't assume that fopen() always returns a
stream != stdin. Reported by Larry Jones <address@hidden>.
(Hey, I reported the bug first! :-)
A slightly cleaner fix is to store the fopen returned value into a new
variable, 'tty' say. I'll propose a patch along those lines.
- Re: [Bug-gnulib] getpass echoes on many systems, (continued)
- Re: [Bug-gnulib] getpass echoes on many systems, Paul Eggert, 2003/10/01
- Re: [Bug-gnulib] getpass echoes on many systems, Larry Jones, 2003/10/01
- Re: [Bug-gnulib] getpass echoes on many systems, Paul Eggert, 2003/10/01
- Re: [Bug-gnulib] getpass echoes on many systems, Larry Jones, 2003/10/01
- Re: [Bug-gnulib] getpass echoes on many systems, Paul Eggert, 2003/10/02
- Re: [Bug-gnulib] getpass echoes on many systems, Larry Jones, 2003/10/02
- Re: [Bug-gnulib] getpass echoes on many systems, Bruno Haible, 2003/10/02
- Re: [Bug-gnulib] getpass echoes on many systems, Larry Jones, 2003/10/02
- Re: [Bug-gnulib] getpass echoes on many systems, Bruno Haible, 2003/10/02
- Re: [Bug-gnulib] getpass echoes on many systems, Larry Jones, 2003/10/02
- Re: [Bug-gnulib] getpass echoes on many systems,
Paul Eggert <=