Mercurial > dropbear
comparison svr-authpubkeyoptions.c @ 1342:8747c2b19152
merge 2017.75
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 18 May 2017 22:59:38 +0800 |
parents | ab06e093d1e1 750ec4ec4cbe |
children | 2d450c1056e3 |
comparison
equal
deleted
inserted
replaced
1341:ab35a9ccc2eb | 1342:8747c2b19152 |
---|---|
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 |
145 if (match_option(options_buf, "no-port-forwarding") == DROPBEAR_SUCCESS) { | 145 if (match_option(options_buf, "no-port-forwarding") == DROPBEAR_SUCCESS) { |
146 dropbear_log(LOG_WARNING, "Port forwarding disabled."); | 146 dropbear_log(LOG_WARNING, "Port forwarding disabled."); |
147 ses.authstate.pubkey_options->no_port_forwarding_flag = 1; | 147 ses.authstate.pubkey_options->no_port_forwarding_flag = 1; |
148 goto next_option; | 148 goto next_option; |
149 } | 149 } |
150 #ifdef ENABLE_SVR_AGENTFWD | 150 #if DROPBEAR_SVR_AGENTFWD |
151 if (match_option(options_buf, "no-agent-forwarding") == DROPBEAR_SUCCESS) { | 151 if (match_option(options_buf, "no-agent-forwarding") == DROPBEAR_SUCCESS) { |
152 dropbear_log(LOG_WARNING, "Agent forwarding disabled."); | 152 dropbear_log(LOG_WARNING, "Agent forwarding disabled."); |
153 ses.authstate.pubkey_options->no_agent_forwarding_flag = 1; | 153 ses.authstate.pubkey_options->no_agent_forwarding_flag = 1; |
154 goto next_option; | 154 goto next_option; |
155 } | 155 } |
156 #endif | 156 #endif |
157 #ifdef ENABLE_X11FWD | 157 #if DROPBEAR_X11FWD |
158 if (match_option(options_buf, "no-X11-forwarding") == DROPBEAR_SUCCESS) { | 158 if (match_option(options_buf, "no-X11-forwarding") == DROPBEAR_SUCCESS) { |
159 dropbear_log(LOG_WARNING, "X11 forwarding disabled."); | 159 dropbear_log(LOG_WARNING, "X11 forwarding disabled."); |
160 ses.authstate.pubkey_options->no_x11_forwarding_flag = 1; | 160 ses.authstate.pubkey_options->no_x11_forwarding_flag = 1; |
161 goto next_option; | 161 goto next_option; |
162 } | 162 } |