comparison svr-authpubkeyoptions.c @ 1295:750ec4ec4cbe

Convert #ifdef to #if, other build changes
author Matt Johnston <matt@ucc.asn.au>
date Wed, 04 May 2016 15:33:40 +0200
parents 5709b15a1b57
children 8747c2b19152
comparison
equal deleted inserted replaced
1294:56aba7dedbea 1295:750ec4ec4cbe
45 #include "session.h" 45 #include "session.h"
46 #include "dbutil.h" 46 #include "dbutil.h"
47 #include "signkey.h" 47 #include "signkey.h"
48 #include "auth.h" 48 #include "auth.h"
49 49
50 #ifdef ENABLE_SVR_PUBKEY_OPTIONS 50 #if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
51 51
52 /* Returns 1 if pubkey allows agent forwarding, 52 /* Returns 1 if pubkey allows agent forwarding,
53 * 0 otherwise */ 53 * 0 otherwise */
54 int svr_pubkey_allows_agentfwd() { 54 int svr_pubkey_allows_agentfwd() {
55 if (ses.authstate.pubkey_options 55 if (ses.authstate.pubkey_options
141 if (match_option(options_buf, "no-port-forwarding") == DROPBEAR_SUCCESS) { 141 if (match_option(options_buf, "no-port-forwarding") == DROPBEAR_SUCCESS) {
142 dropbear_log(LOG_WARNING, "Port forwarding disabled."); 142 dropbear_log(LOG_WARNING, "Port forwarding disabled.");
143 ses.authstate.pubkey_options->no_port_forwarding_flag = 1; 143 ses.authstate.pubkey_options->no_port_forwarding_flag = 1;
144 goto next_option; 144 goto next_option;
145 } 145 }
146 #ifdef ENABLE_SVR_AGENTFWD 146 #if DROPBEAR_SVR_AGENTFWD
147 if (match_option(options_buf, "no-agent-forwarding") == DROPBEAR_SUCCESS) { 147 if (match_option(options_buf, "no-agent-forwarding") == DROPBEAR_SUCCESS) {
148 dropbear_log(LOG_WARNING, "Agent forwarding disabled."); 148 dropbear_log(LOG_WARNING, "Agent forwarding disabled.");
149 ses.authstate.pubkey_options->no_agent_forwarding_flag = 1; 149 ses.authstate.pubkey_options->no_agent_forwarding_flag = 1;
150 goto next_option; 150 goto next_option;
151 } 151 }
152 #endif 152 #endif
153 #ifdef ENABLE_X11FWD 153 #if DROPBEAR_X11FWD
154 if (match_option(options_buf, "no-X11-forwarding") == DROPBEAR_SUCCESS) { 154 if (match_option(options_buf, "no-X11-forwarding") == DROPBEAR_SUCCESS) {
155 dropbear_log(LOG_WARNING, "X11 forwarding disabled."); 155 dropbear_log(LOG_WARNING, "X11 forwarding disabled.");
156 ses.authstate.pubkey_options->no_x11_forwarding_flag = 1; 156 ses.authstate.pubkey_options->no_x11_forwarding_flag = 1;
157 goto next_option; 157 goto next_option;
158 } 158 }