X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/259e3f06a43ed7a515acc5937c671d4876ecc300..94187a80bd60baab4b9c4b949ad820d730578123:/sbr/getpass.c diff --git a/sbr/getpass.c b/sbr/getpass.c index 865f231b..12805f2f 100644 --- a/sbr/getpass.c +++ b/sbr/getpass.c @@ -1,4 +1,5 @@ -/* +/* getpass.c -- read a password without echo. + * * Portions of this code are Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * @@ -77,7 +78,7 @@ nmh_getpass(const char *prompt) *p++ = ch; *p = '\0'; - if (istty) { + if (istty && fin != stdin) { (void)tcsetattr(fileno(fin), TCSANOW, &oterm); rewind(fout); (void)fputc('\n', fout);