Commit 2a34a72b authored by Guilhem Moulin's avatar Guilhem Moulin
Browse files

Fix segfault with restricted authorized_key files without forced command

parent 24bae46e
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment