aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-06-13 17:22:56 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-06-14 07:48:01 +0200
commited8284ab0976130c6c1001e2e370593d00675007 (patch)
tree98567fd075a77b682732e899bc6415bbcc75d274 /src/config.c
parentf46eff79e2bb45fc4e5dc480ae8c97246179ab0f (diff)
downloadlibssh-ed8284ab0976130c6c1001e2e370593d00675007.tar.gz
libssh-ed8284ab0976130c6c1001e2e370593d00675007.tar.xz
libssh-ed8284ab0976130c6c1001e2e370593d00675007.zip
config: Skip the rest of the line for Match exec
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index e9c20cd4..1e17d00c 100644
--- a/src/config.c
+++ b/src/config.c
@@ -499,6 +499,22 @@ ssh_config_parse_line(ssh_session session,
break;
case MATCH_EXEC:
+ /* Skip to the end of line as unsupported */
+ p = ssh_config_get_cmd(&s);
+ if (p == NULL || p[0] == '\0') {
+ SSH_LOG(SSH_LOG_WARN, "line %d: Match keyword "
+ "'%s' requires argument", count, p2);
+ SAFE_FREE(x);
+ return -1;
+ }
+ args++;
+ SSH_LOG(SSH_LOG_WARN,
+ "line %d: Unsupported Match keyword '%s', ignoring",
+ count,
+ p2);
+ result = 0;
+ break;
+
case MATCH_ORIGINALHOST:
case MATCH_LOCALUSER:
/* Skip one argument */