Make sure getpass() is available

It's not on Android for example.
This commit is contained in:
Tobias Brunner
2014-05-29 12:28:53 +02:00
parent 95d13fcc3f
commit b2b54bd71d
3 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -72,7 +72,7 @@ static shared_key_t* callback_shared(private_cmd_creds_t *this,
id_match_t *match_me, id_match_t *match_other)
{
shared_key_t *shared;
char *label, *pwd;
char *label, *pwd = NULL;
if (type == this->prompted)
{
@@ -95,7 +95,9 @@ static shared_key_t* callback_shared(private_cmd_creds_t *this,
default:
return NULL;
}
#ifdef HAVE_GETPASS
pwd = getpass(label);
#endif
if (!pwd || strlen(pwd) == 0)
{
return NULL;