From e84cb3c3c28e8120484197b817631ded4141cc74 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Oct 2015 22:48:15 +0800 Subject: [PATCH] fix default build when getpass() is unavailable if the system doesn't support getpass, we still default on the options that require it which causes a build failure. instead, only default enable these when getpass is available. --- configure.ac | 2 +- options.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6ae8c32..e08af5a 100644 --- a/configure.ac +++ b/configure.ac @@ -632,7 +632,7 @@ fi AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_FUNC_SELECT_ARGTYPES -AC_CHECK_FUNCS([dup2 getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo fork writev]) +AC_CHECK_FUNCS([dup2 getpass getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo fork writev]) AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) diff --git a/options.h b/options.h index 6b87762..c2db3d8 100644 --- a/options.h +++ b/options.h @@ -220,9 +220,12 @@ If you test it please contact the Dropbear author */ #define ENABLE_SVR_PUBKEY_OPTIONS #endif +/* This requires getpass. */ +#ifdef HAVE_GETPASS #define ENABLE_CLI_PASSWORD_AUTH -#define ENABLE_CLI_PUBKEY_AUTH #define ENABLE_CLI_INTERACT_AUTH +#endif +#define ENABLE_CLI_PUBKEY_AUTH /* A default argument for dbclient -i . Homedir is prepended unless path begins with / */