X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/ddf5b0259b7246c0d3207ceb22ea72379ae64e89..827facc0fe3f6f0ef2a9e81917d2eb29fac209aa:/sbr/getpass.c diff --git a/sbr/getpass.c b/sbr/getpass.c index 4b24af3c..99c03e00 100644 --- a/sbr/getpass.c +++ b/sbr/getpass.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. */ -#include +#include "h/mh.h" #include /* We don't use MAX_PASS here because the maximum password length on a remote @@ -78,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);