Replace obsolete getpass()
Function getpass(3) is reported as obsolete.
Replace it with new vpnc_getpass().
Differences with original implementation:
- output prompt on stdout, instead of /dev/tty;
- input from stdin, instead of /dev/tty;
- password length limited by vpnc_getline() to 200 chars.
Functions tcgetattr()/tcsetattr() return error if stdin
is not a terminal but, e.g., a pipe or a file. I simply
ignore the error, since no need to disable ECHO on them.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
git-svn-id: https://svn.unix-ag.uni-kl.de/vpnc/trunk@542 315857ad-0bdb-0310-b42e-dec37551a5f0