Skip to content
Snippets Groups Projects
Commit 2a34a72b authored by Guilhem Moulin's avatar Guilhem Moulin
Browse files

Fix segfault with restricted authorized_key files without forced command

parent 24bae46e
Branches
Tags
No related merge requests found
...@@ -91,7 +91,7 @@ int svr_pubkey_allows_pty() { ...@@ -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;
......
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