diff options
author | Alex Hermann <alex@hexla.nl> | 2017-04-04 11:23:06 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-04-13 15:58:52 +0200 |
commit | c3a8b5009ffacd7bda838ca48c79697847e83c19 (patch) | |
tree | 1d5e7e64e3e16066fcf0a934941515e883b97f7a /src | |
parent | 9ef7e90821b89fc99f349bd0944e3b4f08b28ddc (diff) | |
download | libssh-c3a8b5009ffacd7bda838ca48c79697847e83c19.tar.gz libssh-c3a8b5009ffacd7bda838ca48c79697847e83c19.tar.xz libssh-c3a8b5009ffacd7bda838ca48c79697847e83c19.zip |
config: Don't expand Host variable
Tokens are not allowed (according to the manpage).
Expansion was introduced by a wrong fix for #127.
This commit reverts part of 6eea08a9ef
Signed-off-by: Alex Hermann <alex@hexla.nl>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/config.c b/src/config.c index 52563926..ae83f90f 100644 --- a/src/config.c +++ b/src/config.c @@ -227,18 +227,12 @@ static int ssh_config_parse_line(ssh_session session, const char *line, p != NULL && p[0] != '\0'; p = ssh_config_get_str_tok(&s, NULL)) { if (ok >= 0) { - char *z = ssh_path_expand_escape(session, p); - - if (z == NULL) { - z = strdup(p); - } - ok = match_hostname(lowerhost, z, strlen(z)); + ok = match_hostname(lowerhost, p, strlen(p)); if (ok < 0) { *parsing = 0; } else if (ok > 0) { *parsing = 1; } - free(z); } } SAFE_FREE(lowerhost); |