diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-29 14:35:12 +0200 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-29 14:35:12 +0200 |
commit | 5d739a4c86d69598f4a42b22aab6e224030ac403 (patch) | |
tree | b47c900000cf97efa9db9464c90d88d17cd3113e /openbsd-compat/readpassphrase.c | |
parent | - (bal) Removed net_aton() since we don't use it any more (diff) | |
download | openssh-5d739a4c86d69598f4a42b22aab6e224030ac403.tar.xz openssh-5d739a4c86d69598f4a42b22aab6e224030ac403.zip |
- (bal) Fixed _DISABLE_VPOSIX in readpassphrase.c.
Diffstat (limited to 'openbsd-compat/readpassphrase.c')
-rw-r--r-- | openbsd-compat/readpassphrase.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c index 10f0e0ed3..8e5785520 100644 --- a/openbsd-compat/readpassphrase.c +++ b/openbsd-compat/readpassphrase.c @@ -51,7 +51,9 @@ readpassphrase(prompt, buf, bufsiz, flags) { struct termios term; char ch, *p, *end; +#ifdef _POSIX_VDISABLE u_char status; +#endif int echo, input, output; sigset_t oset, nset; @@ -86,7 +88,9 @@ readpassphrase(prompt, buf, bufsiz, flags) /* Turn off echo if possible. */ echo = 0; +#ifdef _POSIX_VDISABLE status = _POSIX_VDISABLE; +#endif if (tcgetattr(input, &term) == 0) { if (!(flags & RPP_ECHO_ON) && (term.c_lflag & ECHO)) { echo = 1; @@ -124,7 +128,11 @@ readpassphrase(prompt, buf, bufsiz, flags) } } *p = '\0'; +#ifdef _POSIX_VDISABLE if (echo || status != _POSIX_VDISABLE) { +#else + if (echo) { +#endif if (echo) { (void)write(output, "\n", 1); term.c_lflag |= ECHO; |