mirror of
https://github.com/clearml/dropbear
synced 2025-05-01 18:58:15 +00:00
Fix segfault with restricted authorized_key files without forced command
This commit is contained in:
parent
24bae46e42
commit
2a34a72bff
@ -91,7 +91,7 @@ int svr_pubkey_allows_pty() {
|
|||||||
/* Set chansession command to the one forced
|
/* Set chansession command to the one forced
|
||||||
* by any 'command' public key option. */
|
* by any 'command' public key option. */
|
||||||
void svr_pubkey_set_forced_command(struct ChanSess *chansess) {
|
void svr_pubkey_set_forced_command(struct ChanSess *chansess) {
|
||||||
if (ses.authstate.pubkey_options) {
|
if (ses.authstate.pubkey_options && ses.authstate.pubkey_options->forced_command) {
|
||||||
if (chansess->cmd) {
|
if (chansess->cmd) {
|
||||||
/* original_command takes ownership */
|
/* original_command takes ownership */
|
||||||
chansess->original_command = chansess->cmd;
|
chansess->original_command = chansess->cmd;
|
||||||
|
Loading…
Reference in New Issue
Block a user