summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-29 12:35:12 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-29 12:35:12 +0000
commit5d739a4c86d69598f4a42b22aab6e224030ac403 (patch)
treeb47c900000cf97efa9db9464c90d88d17cd3113e
parentdeacfcc43f968f20c7aa6e99ae077b7036059850 (diff)
- (bal) Fixed _DISABLE_VPOSIX in readpassphrase.c.
-rw-r--r--ChangeLog3
-rw-r--r--openbsd-compat/readpassphrase.c8
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 30455a224..d43ed21f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
120010629 120010629
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
420010628 520010628
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;