diff options
author | green <green@FreeBSD.org> | 2002-03-09 03:16:41 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2002-03-09 03:16:41 +0000 |
commit | fa8475a7f60257af5e650a70ab42edf1362a2215 (patch) | |
tree | ac21b58d872bbc1ab750f40e213bba3faf8afadc /lib/libc | |
parent | c00d7245d74325c0e185f3af9fbcb9b0dcf6fe5e (diff) | |
download | FreeBSD-src-fa8475a7f60257af5e650a70ab42edf1362a2215.zip FreeBSD-src-fa8475a7f60257af5e650a70ab42edf1362a2215.tar.gz |
Fix build. I commented out getpass() in readpassphrase.c because the
implementation did not match our manpage description (i.e., it could
return NULL). I mistakenly thought we were still using getpass.c
because, for some reason, CVS never removed it from the tree.
Pointy hat received from: alfred
Kick in the groin to: CVS
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/readpassphrase.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/readpassphrase.c b/lib/libc/gen/readpassphrase.c index 1812354..983e01d 100644 --- a/lib/libc/gen/readpassphrase.c +++ b/lib/libc/gen/readpassphrase.c @@ -161,15 +161,15 @@ restart: return(nr == -1 ? NULL : buf); } -#if 0 char * getpass(const char *prompt) { static char buf[_PASSWORD_LEN + 1]; - return(readpassphrase(prompt, buf, sizeof(buf), RPP_ECHO_OFF)); + if (readpassphrase(prompt, buf, sizeof(buf), RPP_ECHO_OFF) == NULL) + buf[0] = '\0'; + return(buf); } -#endif static void handler(int s) { |