Commit 32a28d0d authored by Matt Johnston's avatar Matt Johnston

Convert #ifdef to #if, other build changes

parent d6daad29
...@@ -24,6 +24,10 @@ CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/ ...@@ -24,6 +24,10 @@ CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/
LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM)
endif endif
ifneq ($(wildcard localoptions.h),)
CFLAGS+=-DLOCALOPTIONS_H_EXISTS
endif
COMMONOBJS=dbutil.o buffer.o dbhelpers.o \ COMMONOBJS=dbutil.o buffer.o dbhelpers.o \
dss.o bignum.o \ dss.o bignum.o \
signkey.o rsa.o dbrandom.o \ signkey.o rsa.o dbrandom.o \
...@@ -76,6 +80,8 @@ [email protected]@ ...@@ -76,6 +80,8 @@ [email protected]@
sbindir=@[email protected] sbindir=@[email protected]
mandir=@[email protected] mandir=@[email protected]
.DELETE_ON_ERROR:
CC=@[email protected] CC=@[email protected]
AR=@[email protected] AR=@[email protected]
RANLIB=@[email protected] RANLIB=@[email protected]
...@@ -194,12 +200,14 @@ link%: ...@@ -194,12 +200,14 @@ link%:
-rm -f $*$(EXEEXT) -rm -f $*$(EXEEXT)
-ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT)
$(STATIC_LTC): options.h $(STATIC_LTC): options.h default_options.h
cd libtomcrypt && $(MAKE) cd libtomcrypt && $(MAKE)
$(STATIC_LTM): options.h $(STATIC_LTM): options.h default_options.h
cd libtommath && $(MAKE) cd libtommath && $(MAKE)
%.o: default_options.h
.PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean
ltc-clean: ltc-clean:
...@@ -215,7 +223,7 @@ clean: ltc-clean ltm-clean thisclean ...@@ -215,7 +223,7 @@ clean: ltc-clean ltm-clean thisclean
thisclean: thisclean:
-rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress \ -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress \
dropbearmulti *.o *.da *.bb *.bbg *.prof dropbearmulti *.o *.da *.bb *.bbg *.prof default_options.h
distclean: clean tidy distclean: clean tidy
-rm -f config.h -rm -f config.h
...@@ -223,3 +231,8 @@ distclean: clean tidy ...@@ -223,3 +231,8 @@ distclean: clean tidy
tidy: tidy:
-rm -f *~ *.gcov */*~ -rm -f *~ *.gcov */*~
default_options.h: default_options.h.in
echo "# > > > Generated from $^, edit that file instead !" > [email protected]
echo >> [email protected]
$(srcdir)/ifndef_wrapper.sh < $^ > [email protected]
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "auth.h" #include "auth.h"
#include "list.h" #include "list.h"
#ifdef ENABLE_CLI_AGENTFWD #if DROPBEAR_CLI_AGENTFWD
/* An agent reply can be reasonably large, as it can /* An agent reply can be reasonably large, as it can
* contain a list of all public keys held by the agent. * contain a list of all public keys held by the agent.
...@@ -50,14 +50,14 @@ void cli_setup_agent(struct Channel *channel); ...@@ -50,14 +50,14 @@ void cli_setup_agent(struct Channel *channel);
extern const struct ChanType cli_chan_agent; extern const struct ChanType cli_chan_agent;
#endif /* ENABLE_CLI_AGENTFWD */ #endif /* DROPBEAR_CLI_AGENTFWD */
#ifdef ENABLE_SVR_AGENTFWD #if DROPBEAR_SVR_AGENTFWD
int svr_agentreq(struct ChanSess * chansess); int svr_agentreq(struct ChanSess * chansess);
void svr_agentcleanup(struct ChanSess * chansess); void svr_agentcleanup(struct ChanSess * chansess);
void svr_agentset(struct ChanSess *chansess); void svr_agentset(struct ChanSess *chansess);
#endif /* ENABLE_SVR_AGENTFWD */ #endif /* DROPBEAR_SVR_AGENTFWD */
#endif /* DROPBEAR_AGENTFWD_H_ */ #endif /* DROPBEAR_AGENTFWD_H_ */
...@@ -86,10 +86,10 @@ enum dropbear_kex_mode { ...@@ -86,10 +86,10 @@ enum dropbear_kex_mode {
#if DROPBEAR_NORMAL_DH #if DROPBEAR_NORMAL_DH
DROPBEAR_KEX_NORMAL_DH, DROPBEAR_KEX_NORMAL_DH,
#endif #endif
#ifdef DROPBEAR_ECDH #if DROPBEAR_ECDH
DROPBEAR_KEX_ECDH, DROPBEAR_KEX_ECDH,
#endif #endif
#ifdef DROPBEAR_CURVE25519 #if DROPBEAR_CURVE25519
DROPBEAR_KEX_CURVE25519, DROPBEAR_KEX_CURVE25519,
#endif #endif
}; };
...@@ -102,7 +102,7 @@ struct dropbear_kex { ...@@ -102,7 +102,7 @@ struct dropbear_kex {
const int dh_p_len; const int dh_p_len;
/* elliptic curve DH KEX */ /* elliptic curve DH KEX */
#ifdef DROPBEAR_ECDH #if DROPBEAR_ECDH
const struct dropbear_ecc_curve *ecc_curve; const struct dropbear_ecc_curve *ecc_curve;
#else #else
const void* dummy; const void* dummy;
...@@ -128,7 +128,7 @@ enum kexguess2_used { ...@@ -128,7 +128,7 @@ enum kexguess2_used {
algo_type * buf_match_algo(buffer* buf, algo_type localalgos[], algo_type * buf_match_algo(buffer* buf, algo_type localalgos[],
enum kexguess2_used *kexguess2, int *goodguess); enum kexguess2_used *kexguess2, int *goodguess);
#ifdef ENABLE_USER_ALGO_LIST #if DROPBEAR_USER_ALGO_LIST
int check_user_algos(const char* user_algo_list, algo_type * algos, int check_user_algos(const char* user_algo_list, algo_type * algos,
const char *algo_desc); const char *algo_desc);
char * algolist_string(algo_type algos[]); char * algolist_string(algo_type algos[]);
......
...@@ -41,7 +41,7 @@ void svr_auth_password(void); ...@@ -41,7 +41,7 @@ void svr_auth_password(void);
void svr_auth_pubkey(void); void svr_auth_pubkey(void);
void svr_auth_pam(void); void svr_auth_pam(void);
#ifdef ENABLE_SVR_PUBKEY_OPTIONS #if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
int svr_pubkey_allows_agentfwd(void); int svr_pubkey_allows_agentfwd(void);
int svr_pubkey_allows_tcpfwd(void); int svr_pubkey_allows_tcpfwd(void);
int svr_pubkey_allows_x11fwd(void); int svr_pubkey_allows_x11fwd(void);
...@@ -119,12 +119,12 @@ struct AuthState { ...@@ -119,12 +119,12 @@ struct AuthState {
char *pw_shell; char *pw_shell;
char *pw_name; char *pw_name;
char *pw_passwd; char *pw_passwd;
#ifdef ENABLE_SVR_PUBKEY_OPTIONS #if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
struct PubKeyOptions* pubkey_options; struct PubKeyOptions* pubkey_options;
#endif #endif
}; };
#ifdef ENABLE_SVR_PUBKEY_OPTIONS #if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
struct PubKeyOptions; struct PubKeyOptions;
struct PubKeyOptions { struct PubKeyOptions {
/* Flags */ /* Flags */
......
...@@ -126,11 +126,11 @@ void recv_msg_channel_eof(void); ...@@ -126,11 +126,11 @@ void recv_msg_channel_eof(void);
void common_recv_msg_channel_data(struct Channel *channel, int fd, void common_recv_msg_channel_data(struct Channel *channel, int fd,
circbuffer * buf); circbuffer * buf);
#ifdef DROPBEAR_CLIENT #if DROPBEAR_CLIENT
extern const struct ChanType clichansess; extern const struct ChanType clichansess;
#endif #endif
#if defined(USING_LISTENERS) || defined(DROPBEAR_CLIENT) #if DROPBEAR_LISTENERS || DROPBEAR_CLIENT
int send_msg_channel_open_init(int fd, const struct ChanType *type); int send_msg_channel_open_init(int fd, const struct ChanType *type);
void recv_msg_channel_open_confirmation(void); void recv_msg_channel_open_confirmation(void);
void recv_msg_channel_open_failure(void); void recv_msg_channel_open_failure(void);
......
...@@ -58,7 +58,7 @@ struct ChanSess { ...@@ -58,7 +58,7 @@ struct ChanSess {
/* Used to set $SSH_CLIENT in the child session. */ /* Used to set $SSH_CLIENT in the child session. */
char *client_string; char *client_string;
#ifndef DISABLE_X11FWD #if DROPBEAR_X11FWD
struct Listener * x11listener; struct Listener * x11listener;
int x11port; int x11port;
char * x11authprot; char * x11authprot;
...@@ -67,13 +67,13 @@ struct ChanSess { ...@@ -67,13 +67,13 @@ struct ChanSess {
unsigned char x11singleconn; unsigned char x11singleconn;
#endif #endif
#ifdef ENABLE_SVR_AGENTFWD #if DROPBEAR_SVR_AGENTFWD
struct Listener * agentlistener; struct Listener * agentlistener;
char * agentfile; char * agentfile;
char * agentdir; char * agentdir;
#endif #endif
#ifdef ENABLE_SVR_PUBKEY_OPTIONS #if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
char *original_command; char *original_command;
#endif #endif
}; };
...@@ -89,7 +89,7 @@ void addnewvar(const char* param, const char* var); ...@@ -89,7 +89,7 @@ void addnewvar(const char* param, const char* var);
void cli_send_chansess_request(void); void cli_send_chansess_request(void);
void cli_tty_cleanup(void); void cli_tty_cleanup(void);
void cli_chansess_winchange(void); void cli_chansess_winchange(void);
#ifdef ENABLE_CLI_NETCAT #if DROPBEAR_CLI_NETCAT
void cli_send_netcat_request(void); void cli_send_netcat_request(void);
#endif #endif
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "includes.h" #include "includes.h"
#ifdef ENABLE_CLI_AGENTFWD #if DROPBEAR_CLI_AGENTFWD
#include "agentfwd.h" #include "agentfwd.h"
#include "session.h" #include "session.h"
......
...@@ -51,7 +51,7 @@ void cli_auth_getmethods() { ...@@ -51,7 +51,7 @@ void cli_auth_getmethods() {
encrypt_packet(); encrypt_packet();
#ifdef DROPBEAR_CLI_IMMEDIATE_AUTH #if DROPBEAR_CLI_IMMEDIATE_AUTH
/* We can't haven't two auth requests in-flight with delayed zlib mode /* We can't haven't two auth requests in-flight with delayed zlib mode
since if the first one succeeds then the remote side will since if the first one succeeds then the remote side will
expect the second one to be compressed. expect the second one to be compressed.
...@@ -121,21 +121,21 @@ out: ...@@ -121,21 +121,21 @@ out:
* SSH_MSG_USERAUTH_INFO_REQUEST. */ * SSH_MSG_USERAUTH_INFO_REQUEST. */
void recv_msg_userauth_specific_60() { void recv_msg_userauth_specific_60() {
#ifdef ENABLE_CLI_PUBKEY_AUTH #if DROPBEAR_CLI_PUBKEY_AUTH
if (cli_ses.lastauthtype == AUTH_TYPE_PUBKEY) { if (cli_ses.lastauthtype == AUTH_TYPE_PUBKEY) {
recv_msg_userauth_pk_ok(); recv_msg_userauth_pk_ok();
return; return;
} }
#endif #endif
#ifdef ENABLE_CLI_INTERACT_AUTH #if DROPBEAR_CLI_INTERACT_AUTH
if (cli_ses.lastauthtype == AUTH_TYPE_INTERACT) { if (cli_ses.lastauthtype == AUTH_TYPE_INTERACT) {
recv_msg_userauth_info_request(); recv_msg_userauth_info_request();
return; return;
} }
#endif #endif
#ifdef ENABLE_CLI_PASSWORD_AUTH #if DROPBEAR_CLI_PASSWORD_AUTH
if (cli_ses.lastauthtype == AUTH_TYPE_PASSWORD) { if (cli_ses.lastauthtype == AUTH_TYPE_PASSWORD) {
/* Eventually there could be proper password-changing /* Eventually there could be proper password-changing
* support. However currently few servers seem to * support. However currently few servers seem to
...@@ -179,7 +179,7 @@ void recv_msg_userauth_failure() { ...@@ -179,7 +179,7 @@ void recv_msg_userauth_failure() {
TRACE(("leave recv_msg_userauth_failure, ignored response, state set to USERAUTH_REQ_SENT")); TRACE(("leave recv_msg_userauth_failure, ignored response, state set to USERAUTH_REQ_SENT"));
return; return;
} else { } else {
#ifdef ENABLE_CLI_PUBKEY_AUTH #if DROPBEAR_CLI_PUBKEY_AUTH
/* If it was a pubkey auth request, we should cross that key /* If it was a pubkey auth request, we should cross that key
* off the list. */ * off the list. */
if (cli_ses.lastauthtype == AUTH_TYPE_PUBKEY) { if (cli_ses.lastauthtype == AUTH_TYPE_PUBKEY) {
...@@ -187,7 +187,7 @@ void recv_msg_userauth_failure() { ...@@ -187,7 +187,7 @@ void recv_msg_userauth_failure() {
} }
#endif #endif
#ifdef ENABLE_CLI_INTERACT_AUTH #if DROPBEAR_CLI_INTERACT_AUTH
/* If we get a failure message for keyboard interactive without /* If we get a failure message for keyboard interactive without
* receiving any request info packet, then we don't bother trying * receiving any request info packet, then we don't bother trying
* keyboard interactive again */ * keyboard interactive again */
...@@ -227,19 +227,19 @@ void recv_msg_userauth_failure() { ...@@ -227,19 +227,19 @@ void recv_msg_userauth_failure() {
for (i = 0; i <= methlen; i++) { for (i = 0; i <= methlen; i++) {
if (methods[i] == '\0') { if (methods[i] == '\0') {
TRACE(("auth method '%s'", tok)) TRACE(("auth method '%s'", tok))
#ifdef ENABLE_CLI_PUBKEY_AUTH #if DROPBEAR_CLI_PUBKEY_AUTH
if (strncmp(AUTH_METHOD_PUBKEY, tok, if (strncmp(AUTH_METHOD_PUBKEY, tok,
AUTH_METHOD_PUBKEY_LEN) == 0) { AUTH_METHOD_PUBKEY_LEN) == 0) {
ses.authstate.authtypes |= AUTH_TYPE_PUBKEY; ses.authstate.authtypes |= AUTH_TYPE_PUBKEY;
} }
#endif #endif
#ifdef ENABLE_CLI_INTERACT_AUTH #if DROPBEAR_CLI_INTERACT_AUTH
if (strncmp(AUTH_METHOD_INTERACT, tok, if (strncmp(AUTH_METHOD_INTERACT, tok,
AUTH_METHOD_INTERACT_LEN) == 0) { AUTH_METHOD_INTERACT_LEN) == 0) {
ses.authstate.authtypes |= AUTH_TYPE_INTERACT; ses.authstate.authtypes |= AUTH_TYPE_INTERACT;
} }
#endif #endif
#ifdef ENABLE_CLI_PASSWORD_AUTH #if DROPBEAR_CLI_PASSWORD_AUTH
if (strncmp(AUTH_METHOD_PASSWORD, tok, if (strncmp(AUTH_METHOD_PASSWORD, tok,
AUTH_METHOD_PASSWORD_LEN) == 0) { AUTH_METHOD_PASSWORD_LEN) == 0) {
ses.authstate.authtypes |= AUTH_TYPE_PASSWORD; ses.authstate.authtypes |= AUTH_TYPE_PASSWORD;
...@@ -267,7 +267,7 @@ void recv_msg_userauth_success() { ...@@ -267,7 +267,7 @@ void recv_msg_userauth_success() {
cli_ses.state = USERAUTH_SUCCESS_RCVD; cli_ses.state = USERAUTH_SUCCESS_RCVD;
cli_ses.lastauthtype = AUTH_TYPE_NONE; cli_ses.lastauthtype = AUTH_TYPE_NONE;
#ifdef ENABLE_CLI_PUBKEY_AUTH #if DROPBEAR_CLI_PUBKEY_AUTH
cli_auth_pubkey_cleanup(); cli_auth_pubkey_cleanup();
#endif #endif
} }
...@@ -281,14 +281,14 @@ int cli_auth_try() { ...@@ -281,14 +281,14 @@ int cli_auth_try() {
/* Order to try is pubkey, interactive, password. /* Order to try is pubkey, interactive, password.
* As soon as "finished" is set for one, we don't do any more. */ * As soon as "finished" is set for one, we don't do any more. */
#ifdef ENABLE_CLI_PUBKEY_AUTH #if DROPBEAR_CLI_PUBKEY_AUTH
if (ses.authstate.authtypes & AUTH_TYPE_PUBKEY) { if (ses.authstate.authtypes & AUTH_TYPE_PUBKEY) {
finished = cli_auth_pubkey(); finished = cli_auth_pubkey();
cli_ses.lastauthtype = AUTH_TYPE_PUBKEY; cli_ses.lastauthtype = AUTH_TYPE_PUBKEY;
} }
#endif #endif
#ifdef ENABLE_CLI_PASSWORD_AUTH #if DROPBEAR_CLI_PASSWORD_AUTH
if (!finished && (ses.authstate.authtypes & AUTH_TYPE_PASSWORD)) { if (!finished && (ses.authstate.authtypes & AUTH_TYPE_PASSWORD)) {
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) { if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n"); fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
...@@ -300,7 +300,7 @@ int cli_auth_try() { ...@@ -300,7 +300,7 @@ int cli_auth_try() {
} }
#endif #endif
#ifdef ENABLE_CLI_INTERACT_AUTH #if DROPBEAR_CLI_INTERACT_AUTH
if (!finished && (ses.authstate.authtypes & AUTH_TYPE_INTERACT)) { if (!finished && (ses.authstate.authtypes & AUTH_TYPE_INTERACT)) {
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) { if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
fprintf(stderr, "Sorry, I won't let you use interactive auth unencrypted.\n"); fprintf(stderr, "Sorry, I won't let you use interactive auth unencrypted.\n");
...@@ -324,7 +324,7 @@ int cli_auth_try() { ...@@ -324,7 +324,7 @@ int cli_auth_try() {
return DROPBEAR_FAILURE; return DROPBEAR_FAILURE;
} }
#if defined(ENABLE_CLI_PASSWORD_AUTH) || defined(ENABLE_CLI_INTERACT_AUTH) #if DROPBEAR_CLI_PASSWORD_AUTH || DROPBEAR_CLI_INTERACT_AUTH
/* A helper for getpass() that exits if the user cancels. The returned /* A helper for getpass() that exits if the user cancels. The returned
* password is statically allocated by getpass() */ * password is statically allocated by getpass() */
char* getpass_or_cancel(char* prompt) char* getpass_or_cancel(char* prompt)
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "ssh.h" #include "ssh.h"
#include "runopts.h" #include "runopts.h"
#ifdef ENABLE_CLI_INTERACT_AUTH #if DROPBEAR_CLI_INTERACT_AUTH
static char* get_response(char* prompt) static char* get_response(char* prompt)
{ {
...@@ -172,4 +172,4 @@ void cli_auth_interactive() { ...@@ -172,4 +172,4 @@ void cli_auth_interactive() {
TRACE(("leave cli_auth_interactive")) TRACE(("leave cli_auth_interactive"))
} }
#endif /* ENABLE_CLI_INTERACT_AUTH */ #endif /* DROPBEAR_CLI_INTERACT_AUTH */
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
#include "ssh.h" #include "ssh.h"
#include "runopts.h" #include "runopts.h"
#ifdef ENABLE_CLI_PASSWORD_AUTH #if DROPBEAR_CLI_PASSWORD_AUTH
#ifdef ENABLE_CLI_ASKPASS_HELPER #if DROPBEAR_CLI_ASKPASS_HELPER
/* Returns 1 if we want to use the askpass program, 0 otherwise */ /* Returns 1 if we want to use the askpass program, 0 otherwise */
static int want_askpass() static int want_askpass()
{ {
...@@ -113,7 +113,7 @@ static char *gui_getpass(const char *prompt) { ...@@ -113,7 +113,7 @@ static char *gui_getpass(const char *prompt) {
TRACE(("leave gui_getpass")) TRACE(("leave gui_getpass"))
return(buf); return(buf);
} }
#endif /* ENABLE_CLI_ASKPASS_HELPER */ #endif /* DROPBEAR_CLI_ASKPASS_HELPER */
void cli_auth_password() { void cli_auth_password() {
...@@ -125,7 +125,7 @@ void cli_auth_password() { ...@@ -125,7 +125,7 @@ void cli_auth_password() {
snprintf(prompt, sizeof(prompt), "%[email protected]%s's password: ", snprintf(prompt, sizeof(prompt), "%[email protected]%s's password: ",
cli_opts.username, cli_opts.remotehost); cli_opts.username, cli_opts.remotehost);
#ifdef ENABLE_CLI_ASKPASS_HELPER #if DROPBEAR_CLI_ASKPASS_HELPER
if (want_askpass()) if (want_askpass())
{ {
password = gui_getpass(prompt); password = gui_getpass(prompt);
...@@ -158,4 +158,4 @@ void cli_auth_password() { ...@@ -158,4 +158,4 @@ void cli_auth_password() {
TRACE(("leave cli_auth_password")) TRACE(("leave cli_auth_password"))
} }
#endif /* ENABLE_CLI_PASSWORD_AUTH */ #endif /* DROPBEAR_CLI_PASSWORD_AUTH */
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "auth.h" #include "auth.h"
#include "agentfwd.h" #include "agentfwd.h"
#ifdef ENABLE_CLI_PUBKEY_AUTH #if DROPBEAR_CLI_PUBKEY_AUTH
static void send_msg_userauth_pubkey(sign_key *key, int type, int realsign); static void send_msg_userauth_pubkey(sign_key *key, int type, int realsign);
/* Called when we receive a SSH_MSG_USERAUTH_FAILURE for a pubkey request. /* Called when we receive a SSH_MSG_USERAUTH_FAILURE for a pubkey request.
...@@ -122,7 +122,7 @@ void recv_msg_userauth_pk_ok() { ...@@ -122,7 +122,7 @@ void recv_msg_userauth_pk_ok() {
void cli_buf_put_sign(buffer* buf, sign_key *key, int type, void cli_buf_put_sign(buffer* buf, sign_key *key, int type,
buffer *data_buf) { buffer *data_buf) {
#ifdef ENABLE_CLI_AGENTFWD #if DROPBEAR_CLI_AGENTFWD
if (key->source == SIGNKEY_SOURCE_AGENT) { if (key->source == SIGNKEY_SOURCE_AGENT) {
/* Format the agent signature ourselves, as buf_put_sign would. */ /* Format the agent signature ourselves, as buf_put_sign would. */
buffer *sigblob; buffer *sigblob;
...@@ -131,7 +131,7 @@ void cli_buf_put_sign(buffer* buf, sign_key *key, int type, ...@@ -131,7 +131,7 @@ void cli_buf_put_sign(buffer* buf, sign_key *key, int type,
buf_putbufstring(buf, sigblob); buf_putbufstring(buf, sigblob);
buf_free(sigblob); buf_free(sigblob);
} else } else
#endif /* ENABLE_CLI_AGENTFWD */ #endif /* DROPBEAR_CLI_AGENTFWD */
{ {
buf_put_sign(buf, key, type, data_buf); buf_put_sign(buf, key, type, data_buf);
} }
...@@ -185,7 +185,7 @@ int cli_auth_pubkey() { ...@@ -185,7 +185,7 @@ int cli_auth_pubkey() {
TRACE(("enter cli_auth_pubkey")) TRACE(("enter cli_auth_pubkey"))
#ifdef ENABLE_CLI_AGENTFWD #if DROPBEAR_CLI_AGENTFWD
if (!cli_opts.agent_keys_loaded) { if (!cli_opts.agent_keys_loaded) {
/* get the list of available keys from the agent */ /* get the list of available keys from the agent */
cli_load_agent_keys(cli_opts.privkeys); cli_load_agent_keys(cli_opts.privkeys);
...@@ -209,7 +209,7 @@ int cli_auth_pubkey() { ...@@ -209,7 +209,7 @@ int cli_auth_pubkey() {
void cli_auth_pubkey_cleanup() { void cli_auth_pubkey_cleanup() {
#ifdef ENABLE_CLI_AGENTFWD #if DROPBEAR_CLI_AGENTFWD
m_close(cli_opts.agent_fd); m_close(cli_opts.agent_fd);
cli_opts.agent_fd = -1; cli_opts.agent_fd = -1;
#endif #endif
......
...@@ -355,7 +355,7 @@ static int cli_initchansess(struct Channel *channel) { ...@@ -355,7 +355,7 @@ static int cli_initchansess(struct Channel *channel) {
cli_init_stdpipe_sess(channel); cli_init_stdpipe_sess(channel);
#ifdef ENABLE_CLI_AGENTFWD #if DROPBEAR_CLI_AGENTFWD
if (cli_opts.agent_fwd) { if (cli_opts.agent_fwd) {
cli_setup_agent(channel);