diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | openbsd-compat/readpassphrase.c | 8 |
2 files changed, 10 insertions, 1 deletions
@@ -1,5 +1,6 @@ | |||
1 | 20010629 | 1 | 20010629 |
2 | - (bal) Removed net_aton() since we don't use it any more | 2 | - (bal) Removed net_aton() since we don't use it any more |
3 | - (bal) Fixed _DISABLE_VPOSIX in readpassphrase.c. | ||
3 | 4 | ||
4 | 20010628 | 5 | 20010628 |
5 | - (djm) Sync openbsd-compat with -current libc | 6 | - (djm) Sync openbsd-compat with -current libc |
@@ -5819,4 +5820,4 @@ | |||
5819 | - Wrote replacements for strlcpy and mkdtemp | 5820 | - Wrote replacements for strlcpy and mkdtemp |
5820 | - Released 1.0pre1 | 5821 | - Released 1.0pre1 |
5821 | 5822 | ||
5822 | $Id: ChangeLog,v 1.1339 2001/06/29 12:32:31 mouring Exp $ | 5823 | $Id: ChangeLog,v 1.1340 2001/06/29 12:35:12 mouring Exp $ |
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) | |||
51 | { | 51 | { |
52 | struct termios term; | 52 | struct termios term; |
53 | char ch, *p, *end; | 53 | char ch, *p, *end; |
54 | #ifdef _POSIX_VDISABLE | ||
54 | u_char status; | 55 | u_char status; |
56 | #endif | ||
55 | int echo, input, output; | 57 | int echo, input, output; |
56 | sigset_t oset, nset; | 58 | sigset_t oset, nset; |
57 | 59 | ||
@@ -86,7 +88,9 @@ readpassphrase(prompt, buf, bufsiz, flags) | |||
86 | 88 | ||
87 | /* Turn off echo if possible. */ | 89 | /* Turn off echo if possible. */ |
88 | echo = 0; | 90 | echo = 0; |
91 | #ifdef _POSIX_VDISABLE | ||
89 | status = _POSIX_VDISABLE; | 92 | status = _POSIX_VDISABLE; |
93 | #endif | ||
90 | if (tcgetattr(input, &term) == 0) { | 94 | if (tcgetattr(input, &term) == 0) { |
91 | if (!(flags & RPP_ECHO_ON) && (term.c_lflag & ECHO)) { | 95 | if (!(flags & RPP_ECHO_ON) && (term.c_lflag & ECHO)) { |
92 | echo = 1; | 96 | echo = 1; |
@@ -124,7 +128,11 @@ readpassphrase(prompt, buf, bufsiz, flags) | |||
124 | } | 128 | } |
125 | } | 129 | } |
126 | *p = '\0'; | 130 | *p = '\0'; |
131 | #ifdef _POSIX_VDISABLE | ||
127 | if (echo || status != _POSIX_VDISABLE) { | 132 | if (echo || status != _POSIX_VDISABLE) { |
133 | #else | ||
134 | if (echo) { | ||
135 | #endif | ||
128 | if (echo) { | 136 | if (echo) { |
129 | (void)write(output, "\n", 1); | 137 | (void)write(output, "\n", 1); |
130 | term.c_lflag |= ECHO; | 138 | term.c_lflag |= ECHO; |