Skip to content
Permalink
Browse files
Parse remotecommand config option.
  • Loading branch information
bluhm committed May 30, 2017
1 parent 0a5d9a7 commit e49bd12
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
@@ -148,7 +148,8 @@ typedef enum {
oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
oSendEnv, oControlPath, oControlMaster, oControlPersist,
oHashKnownHosts,
oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
oTunnel, oTunnelDevice,
oLocalCommand, oPermitLocalCommand, oRemoteCommand,
oVisualHostKey,
oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,
@@ -269,6 +270,7 @@ static struct {
{ "tunneldevice", oTunnelDevice },
{ "localcommand", oLocalCommand },
{ "permitlocalcommand", oPermitLocalCommand },
{ "remotecommand", oRemoteCommand },
{ "visualhostkey", oVisualHostKey },
{ "kexalgorithms", oKexAlgorithms },
{ "ipqos", oIPQoS },
@@ -286,6 +288,7 @@ static struct {
{ "updatehostkeys", oUpdateHostkeys },
{ "hostbasedkeytypes", oHostbasedKeyTypes },
{ "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes },
{ "remotecommand", oRemoteCommand },
{ "ignoreunknown", oIgnoreUnknown },
{ "proxyjump", oProxyJump },

@@ -1425,6 +1428,10 @@ process_config_line_depth(Options *options, struct passwd *pw, const char *host,
intptr = &options->permit_local_command;
goto parse_flag;

case oRemoteCommand:
charptr = &options->remote_command;
goto parse_command;

case oVisualHostKey:
intptr = &options->visual_host_key;
goto parse_flag;
@@ -1813,6 +1820,7 @@ initialize_options(Options * options)
options->tun_remote = -1;
options->local_command = NULL;
options->permit_local_command = -1;
options->remote_command = NULL;
options->add_keys_to_agent = -1;
options->identity_agent = NULL;
options->visual_host_key = -1;
@@ -2015,6 +2023,7 @@ fill_default_options(Options * options)
} \
} while(0)
CLEAR_ON_NONE(options->local_command);
CLEAR_ON_NONE(options->remote_command);
CLEAR_ON_NONE(options->proxy_command);
CLEAR_ON_NONE(options->control_path);
CLEAR_ON_NONE(options->revoked_host_keys);
@@ -2492,6 +2501,7 @@ dump_client_config(Options *o, const char *host)
dump_cfg_string(oKbdInteractiveDevices, o->kbd_interactive_devices);
dump_cfg_string(oKexAlgorithms, o->kex_algorithms ? o->kex_algorithms : KEX_CLIENT_KEX);
dump_cfg_string(oLocalCommand, o->local_command);
dump_cfg_string(oRemoteCommand, o->remote_command);
dump_cfg_string(oLogLevel, log_level_name(o->log_level));
dump_cfg_string(oMacs, o->macs ? o->macs : KEX_CLIENT_MAC);
#ifdef ENABLE_PKCS11
@@ -134,6 +134,7 @@ typedef struct {

char *local_command;
int permit_local_command;
char *remote_command;
int visual_host_key;

int request_tty;

0 comments on commit e49bd12

Please sign in to comment.