diff svr-authpubkeyoptions.c @ 1173:d734fe76b72f coverity

merge
author Matt Johnston <matt@ucc.asn.au>
date Mon, 23 Nov 2015 23:04:48 +0800
parents 5709b15a1b57
children 750ec4ec4cbe ab06e093d1e1
line wrap: on
line diff
--- a/svr-authpubkeyoptions.c	Fri Aug 07 21:26:03 2015 +0800
+++ b/svr-authpubkeyoptions.c	Mon Nov 23 23:04:48 2015 +0800
@@ -91,7 +91,7 @@
 /* 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;