diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-08-07 23:00:08 +0800 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-08-07 23:00:08 +0800 |
commit | 2a34a72bff1df3952ed484daa5ea57700510c6fe (patch) | |
tree | 366d20d95b2a0948cd38f2330acb59a14bc7d96c /svr-authpubkeyoptions.c | |
parent | 24bae46e429aa54d0b9da29adf06192a799dd520 (diff) |
Fix segfault with restricted authorized_key files without forced command
Diffstat (limited to 'svr-authpubkeyoptions.c')
-rw-r--r-- | svr-authpubkeyoptions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svr-authpubkeyoptions.c b/svr-authpubkeyoptions.c index c296141..9bdf99d 100644 --- a/svr-authpubkeyoptions.c +++ b/svr-authpubkeyoptions.c @@ -91,7 +91,7 @@ int svr_pubkey_allows_pty() { /* Set chansession command to the one forced * by any 'command' public key option. */ 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) { /* original_command takes ownership */ chansess->original_command = chansess->cmd; |