@@ -46,7 +46,7 @@ static void add_netcat(const char *str);
4646static void add_extendedopt (const char * str );
4747
4848#if DROPBEAR_USE_SSH_CONFIG
49- void apply_config_settings (char * cli_host_arg );
49+ static void apply_config_settings (char * cli_host_arg );
5050#endif
5151
5252static void printhelp () {
@@ -551,24 +551,23 @@ void cli_getopts(int argc, char ** argv) {
551551#if DROPBEAR_CLI_PUBKEY_AUTH
552552void loadidentityfile (const char * filename , int warnfail ) {
553553 sign_key * key ;
554- char * expand_path = expand_homedir_path (filename );
555554 enum signkey_type keytype ;
556555
557556 char * id_key_path = expand_homedir_path (filename );
558557 TRACE (("loadidentityfile %s" , id_key_path ))
559558
560559 key = new_sign_key ();
561560 keytype = DROPBEAR_SIGNKEY_ANY ;
562- if ( readhostkey (expand_path , key , & keytype ) != DROPBEAR_SUCCESS ) {
561+ if ( readhostkey (id_key_path , key , & keytype ) != DROPBEAR_SUCCESS ) {
563562 if (warnfail ) {
564563 dropbear_log (LOG_WARNING , "Failed loading keyfile '%s'\n" , id_key_path );
565564 }
566565 sign_key_free (key );
567- m_free (expand_path );
566+ m_free (id_key_path );
568567 } else {
569568 key -> type = keytype ;
570569 key -> source = SIGNKEY_SOURCE_RAW_FILE ;
571- key -> filename = expand_path ;
570+ key -> filename = id_key_path ;
572571 list_append (cli_opts .privkeys , key );
573572 }
574573}
0 commit comments