- (bal) Fixed _DISABLE_VPOSIX in readpassphrase.c.
This commit is contained in:
parent
deacfcc43f
commit
5d739a4c86
|
@ -1,5 +1,6 @@
|
||||||
20010629
|
20010629
|
||||||
- (bal) Removed net_aton() since we don't use it any more
|
- (bal) Removed net_aton() since we don't use it any more
|
||||||
|
- (bal) Fixed _DISABLE_VPOSIX in readpassphrase.c.
|
||||||
|
|
||||||
20010628
|
20010628
|
||||||
- (djm) Sync openbsd-compat with -current libc
|
- (djm) Sync openbsd-compat with -current libc
|
||||||
|
@ -5819,4 +5820,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1339 2001/06/29 12:32:31 mouring Exp $
|
$Id: ChangeLog,v 1.1340 2001/06/29 12:35:12 mouring Exp $
|
||||||
|
|
|
@ -51,7 +51,9 @@ readpassphrase(prompt, buf, bufsiz, flags)
|
||||||
{
|
{
|
||||||
struct termios term;
|
struct termios term;
|
||||||
char ch, *p, *end;
|
char ch, *p, *end;
|
||||||
|
#ifdef _POSIX_VDISABLE
|
||||||
u_char status;
|
u_char status;
|
||||||
|
#endif
|
||||||
int echo, input, output;
|
int echo, input, output;
|
||||||
sigset_t oset, nset;
|
sigset_t oset, nset;
|
||||||
|
|
||||||
|
@ -86,7 +88,9 @@ readpassphrase(prompt, buf, bufsiz, flags)
|
||||||
|
|
||||||
/* Turn off echo if possible. */
|
/* Turn off echo if possible. */
|
||||||
echo = 0;
|
echo = 0;
|
||||||
|
#ifdef _POSIX_VDISABLE
|
||||||
status = _POSIX_VDISABLE;
|
status = _POSIX_VDISABLE;
|
||||||
|
#endif
|
||||||
if (tcgetattr(input, &term) == 0) {
|
if (tcgetattr(input, &term) == 0) {
|
||||||
if (!(flags & RPP_ECHO_ON) && (term.c_lflag & ECHO)) {
|
if (!(flags & RPP_ECHO_ON) && (term.c_lflag & ECHO)) {
|
||||||
echo = 1;
|
echo = 1;
|
||||||
|
@ -124,7 +128,11 @@ readpassphrase(prompt, buf, bufsiz, flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
#ifdef _POSIX_VDISABLE
|
||||||
if (echo || status != _POSIX_VDISABLE) {
|
if (echo || status != _POSIX_VDISABLE) {
|
||||||
|
#else
|
||||||
|
if (echo) {
|
||||||
|
#endif
|
||||||
if (echo) {
|
if (echo) {
|
||||||
(void)write(output, "\n", 1);
|
(void)write(output, "\n", 1);
|
||||||
term.c_lflag |= ECHO;
|
term.c_lflag |= ECHO;
|
||||||
|
|
Loading…
Reference in New Issue