getpass(3) is not supported on Android.

No replacement yet.
This commit is contained in:
Tobias Brunner
2011-10-11 16:30:20 +02:00
parent eae49aff88
commit 2421ac9e98
3 changed files with 8 additions and 4 deletions
+1 -3
View File
@@ -375,9 +375,7 @@ dnl check if native rwlocks are available
AC_CHECK_FUNCS(pthread_rwlock_init)
LIBS=$saved_LIBS
AC_CHECK_FUNCS(prctl)
AC_CHECK_FUNCS(mallinfo)
AC_CHECK_FUNCS(prctl mallinfo getpass)
AC_CHECK_HEADERS(sys/sockio.h glob.h)
AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h linux/udp.h)
+4
View File
@@ -101,7 +101,11 @@ static int send_stroke_msg (stroke_msg_t *msg)
{
*pass = ' ';
}
#ifdef HAVE_GETPASS
pass = getpass(buffer);
#else
pass = "";
#endif
if (pass)
{
ignore_result(write(sock, pass, strlen(pass)));
+3 -1
View File
@@ -797,12 +797,14 @@ static void check_end(whack_end_t *this, whack_end_t *that,
static void get_secret(int sock)
{
const char *buf, *secret;
const char *buf = NULL, *secret;
int len;
fflush(stdout);
usleep(20000); /* give fflush time for flushing */
#ifdef HAVE_GETPASS
buf = getpass("Enter: ");
#endif
secret = (buf == NULL)? "" : buf;
/* send the secret to pluto */