comparison svr-authpubkeyoptions.c @ 1818:587c76726b5f

Add "restrict" authorized_keys option
author Matt Johnston <matt@ucc.asn.au>
date Sat, 01 May 2021 20:47:15 +0800
parents 2f5d797d9811
children d39cfedaf015
comparison
equal deleted inserted replaced
1817:209711833f15 1818:587c76726b5f
161 #endif 161 #endif
162 goto next_option; 162 goto next_option;
163 } 163 }
164 if (match_option(options_buf, "no-pty") == DROPBEAR_SUCCESS) { 164 if (match_option(options_buf, "no-pty") == DROPBEAR_SUCCESS) {
165 dropbear_log(LOG_WARNING, "Pty allocation disabled."); 165 dropbear_log(LOG_WARNING, "Pty allocation disabled.");
166 ses.authstate.pubkey_options->no_pty_flag = 1;
167 goto next_option;
168 }
169 if (match_option(options_buf, "restrict") == DROPBEAR_SUCCESS) {
170 dropbear_log(LOG_WARNING, "Restrict option set");
171 ses.authstate.pubkey_options->no_port_forwarding_flag = 1;
172 #if DROPBEAR_SVR_AGENTFWD
173 ses.authstate.pubkey_options->no_agent_forwarding_flag = 1;
174 #endif
175 #if DROPBEAR_X11FWD
176 ses.authstate.pubkey_options->no_x11_forwarding_flag = 1;
177 #endif
166 ses.authstate.pubkey_options->no_pty_flag = 1; 178 ses.authstate.pubkey_options->no_pty_flag = 1;
167 goto next_option; 179 goto next_option;
168 } 180 }
169 if (match_option(options_buf, "command=\"") == DROPBEAR_SUCCESS) { 181 if (match_option(options_buf, "command=\"") == DROPBEAR_SUCCESS) {
170 int escaped = 0; 182 int escaped = 0;