Hi, On Sun, Mar 28, 2021 at 01:52:51AM +0100, Antonio Quartulli wrote: > I believe termios.h should normally be available on any *nix system, > therefore it should be ok to switch to it.
Well, on everything that is recent enough to have tun/tap and sockets,
termios.h will exist.
On the necessity for the patch, I have mixed feelings - I do not see
any OS remove getpass() any time soon, as it would break applications...
But I need to have a close look at the patch again - give that we already
do the /dev/tty handling etc., it might effectively make the code easier.
[..]
> > + {
> > + (void) tcsetattr(fileno(fp), TCSAFLUSH, &tty_save);
>
> We should not need to cast to void - I don't think we have warnings set
> for non-checked return values.
Actually we should catch errors here and log them. If tcsetattr() fails,
the tty will be in a messed-up state - so we want to know that it happened,
and possibly also the "why".
gert
--
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]
signature.asc
Description: PGP signature
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
