mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
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>
This commit is contained in:
committed by
Andreas Schneider
parent
9ef7e90821
commit
c3a8b5009f
@@ -227,18 +227,12 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
|
|||||||
p != NULL && p[0] != '\0';
|
p != NULL && p[0] != '\0';
|
||||||
p = ssh_config_get_str_tok(&s, NULL)) {
|
p = ssh_config_get_str_tok(&s, NULL)) {
|
||||||
if (ok >= 0) {
|
if (ok >= 0) {
|
||||||
char *z = ssh_path_expand_escape(session, p);
|
ok = match_hostname(lowerhost, p, strlen(p));
|
||||||
|
|
||||||
if (z == NULL) {
|
|
||||||
z = strdup(p);
|
|
||||||
}
|
|
||||||
ok = match_hostname(lowerhost, z, strlen(z));
|
|
||||||
if (ok < 0) {
|
if (ok < 0) {
|
||||||
*parsing = 0;
|
*parsing = 0;
|
||||||
} else if (ok > 0) {
|
} else if (ok > 0) {
|
||||||
*parsing = 1;
|
*parsing = 1;
|
||||||
}
|
}
|
||||||
free(z);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SAFE_FREE(lowerhost);
|
SAFE_FREE(lowerhost);
|
||||||
|
|||||||
Reference in New Issue
Block a user