diff options
-rw-r--r-- | lib/libc/gen/getpass.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/getpass.c b/lib/libc/gen/getpass.c index 475a7ab20c1..4fdc7f79be0 100644 --- a/lib/libc/gen/getpass.c +++ b/lib/libc/gen/getpass.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getpass.c,v 1.3 1996/08/19 08:23:57 tholo Exp $"; +static char rcsid[] = "$OpenBSD: getpass.c,v 1.4 1996/12/04 23:02:13 chuck Exp $"; #endif /* LIBC_SCCS and not lint */ #include <termios.h> @@ -59,7 +59,7 @@ getpass(prompt) * read and write to /dev/tty if possible; else read from * stdin and write to stderr. */ - if ((outfp = fp = fopen(_PATH_TTY, "w+")) == NULL) { + if ((outfp = fp = fopen(_PATH_TTY, "r+")) == NULL) { outfp = stderr; fp = stdin; } |