mirror of
https://github.com/clearml/dropbear
synced 2025-02-12 07:25:30 +00:00
Don't choke on disabled authorized_keys(5) options
As of 2020.79 X11 forwarding is disabled at build time, which could lock out users with authorized_keys(5) files containing ‘no-X11-forwarding’ options.
This commit is contained in:
parent
45294b458a
commit
3727b099c5
@ -147,20 +147,20 @@ int svr_add_pubkey_options(buffer *options_buf, int line_num, const char* filena
|
|||||||
ses.authstate.pubkey_options->no_port_forwarding_flag = 1;
|
ses.authstate.pubkey_options->no_port_forwarding_flag = 1;
|
||||||
goto next_option;
|
goto next_option;
|
||||||
}
|
}
|
||||||
#if DROPBEAR_SVR_AGENTFWD
|
|
||||||
if (match_option(options_buf, "no-agent-forwarding") == DROPBEAR_SUCCESS) {
|
if (match_option(options_buf, "no-agent-forwarding") == DROPBEAR_SUCCESS) {
|
||||||
|
#if DROPBEAR_SVR_AGENTFWD
|
||||||
dropbear_log(LOG_WARNING, "Agent forwarding disabled.");
|
dropbear_log(LOG_WARNING, "Agent forwarding disabled.");
|
||||||
ses.authstate.pubkey_options->no_agent_forwarding_flag = 1;
|
ses.authstate.pubkey_options->no_agent_forwarding_flag = 1;
|
||||||
|
#endif
|
||||||
goto next_option;
|
goto next_option;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if DROPBEAR_X11FWD
|
|
||||||
if (match_option(options_buf, "no-X11-forwarding") == DROPBEAR_SUCCESS) {
|
if (match_option(options_buf, "no-X11-forwarding") == DROPBEAR_SUCCESS) {
|
||||||
|
#if DROPBEAR_X11FWD
|
||||||
dropbear_log(LOG_WARNING, "X11 forwarding disabled.");
|
dropbear_log(LOG_WARNING, "X11 forwarding disabled.");
|
||||||
ses.authstate.pubkey_options->no_x11_forwarding_flag = 1;
|
ses.authstate.pubkey_options->no_x11_forwarding_flag = 1;
|
||||||
|
#endif
|
||||||
goto next_option;
|
goto next_option;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (match_option(options_buf, "no-pty") == DROPBEAR_SUCCESS) {
|
if (match_option(options_buf, "no-pty") == DROPBEAR_SUCCESS) {
|
||||||
dropbear_log(LOG_WARNING, "Pty allocation disabled.");
|
dropbear_log(LOG_WARNING, "Pty allocation disabled.");
|
||||||
ses.authstate.pubkey_options->no_pty_flag = 1;
|
ses.authstate.pubkey_options->no_pty_flag = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user