[BusyBox] correct_password() /dev/tty

Glenn McGrath bug1 at iinet.net.au
Wed Sep 15 03:47:49 UTC 2004


On Wed, 08 Sep 2004 14:20:04 +0400
"Vladimir N. Oleynik" <dzo at simtreas.ru> wrote:

> Hi.
> 
> libbb/correct_password.c have line:
> fputs ( "cannot open /dev/tty\n", stderr );
> but bb_askpass() don`t open /dev/tty and use stdin
> and return NULL if EOF or error of read(2).
> As the algorithm has changed, I think, this line only misleads about
> a problem and must removed.

Perhaps errno should be preserved in bb_askpass, then correct_password
could return a proper error message if read fails.

Or, we could just not report any message, just retruning the 0 for error
and let the calling function handle it.

What do you think ?



Glenn



More information about the busybox mailing list