getpass(3) is not supported on Android.
No replacement yet.
This commit is contained in:
+1
-3
@@ -375,9 +375,7 @@ dnl check if native rwlocks are available
|
|||||||
AC_CHECK_FUNCS(pthread_rwlock_init)
|
AC_CHECK_FUNCS(pthread_rwlock_init)
|
||||||
LIBS=$saved_LIBS
|
LIBS=$saved_LIBS
|
||||||
|
|
||||||
AC_CHECK_FUNCS(prctl)
|
AC_CHECK_FUNCS(prctl mallinfo getpass)
|
||||||
|
|
||||||
AC_CHECK_FUNCS(mallinfo)
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(sys/sockio.h glob.h)
|
AC_CHECK_HEADERS(sys/sockio.h glob.h)
|
||||||
AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h linux/udp.h)
|
AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h linux/udp.h)
|
||||||
|
|||||||
@@ -101,7 +101,11 @@ static int send_stroke_msg (stroke_msg_t *msg)
|
|||||||
{
|
{
|
||||||
*pass = ' ';
|
*pass = ' ';
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_GETPASS
|
||||||
pass = getpass(buffer);
|
pass = getpass(buffer);
|
||||||
|
#else
|
||||||
|
pass = "";
|
||||||
|
#endif
|
||||||
if (pass)
|
if (pass)
|
||||||
{
|
{
|
||||||
ignore_result(write(sock, pass, strlen(pass)));
|
ignore_result(write(sock, pass, strlen(pass)));
|
||||||
|
|||||||
+3
-1
@@ -797,12 +797,14 @@ static void check_end(whack_end_t *this, whack_end_t *that,
|
|||||||
|
|
||||||
static void get_secret(int sock)
|
static void get_secret(int sock)
|
||||||
{
|
{
|
||||||
const char *buf, *secret;
|
const char *buf = NULL, *secret;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
usleep(20000); /* give fflush time for flushing */
|
usleep(20000); /* give fflush time for flushing */
|
||||||
|
#ifdef HAVE_GETPASS
|
||||||
buf = getpass("Enter: ");
|
buf = getpass("Enter: ");
|
||||||
|
#endif
|
||||||
secret = (buf == NULL)? "" : buf;
|
secret = (buf == NULL)? "" : buf;
|
||||||
|
|
||||||
/* send the secret to pluto */
|
/* send the secret to pluto */
|
||||||
|
|||||||
Reference in New Issue
Block a user