summaryrefslogtreecommitdiff
path: root/src/common/compat.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-06-17 11:52:54 -0400
committerNick Mathewson <nickm@torproject.org>2015-06-25 10:52:47 -0400
commit272229ff5d3828eb2f51b93a0079a8e86d1ec5af (patch)
tree648e57daaf91d1f667bc330481dba90f33e1a35c /src/common/compat.c
parenta64f2d167eab4baefb4fe2471fd2e554a132d37f (diff)
downloadtor-272229ff5d3828eb2f51b93a0079a8e86d1ec5af.tar.gz
tor-272229ff5d3828eb2f51b93a0079a8e86d1ec5af.zip
Remove janky getpass implementations
Diffstat (limited to 'src/common/compat.c')
-rw-r--r--src/common/compat.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 4a35183f38..6e46f277f8 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -3321,22 +3321,7 @@ tor_getpass(const char *prompt, char *output, size_t buflen)
SecureZeroMemory(buf, sizeof(wchar_t)*buflen);
tor_free(buf);
return r;
-#elif defined(HAVE_GETPASS)
- /* XXX We shouldn't actually use this; it's deprecated to hell and back */
- memset(output, 0, buflen);
- char *pwd = getpass(prompt);
- if (pwd == NULL)
- return -1;
- ssize_t len = (ssize_t)strlen(pwd);
- strlcpy(output, pwd, buflen);
- memset(pwd, 0, len);
- return len;
#else
- /* XXX This is even worse. */
- puts(prompt);
- ssize_t n = read(STDIN_FILENO, output, buflen);
- if (n < 0)
- return -1;
- return n;
+#error "No implementation for tor_getpass found!"
#endif
}