mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09: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 of6eea08a9efSigned-off-by: Alex Hermann <alex@hexla.nl> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commitc3a8b5009f)
This commit is contained in:
committed by
Andreas Schneider
parent
24a3f7020c
commit
8dc3d883b8
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user