mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +09:00
config: Expand tilde when handling include directives
Related: #93
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit d69026d7a4)
This commit is contained in:
committed by
Andreas Schneider
parent
1f973320a8
commit
fd1563575f
@@ -548,6 +548,11 @@ ssh_config_make_absolute(ssh_session session,
|
||||
return out;
|
||||
}
|
||||
|
||||
/* paths starting with tilde are already absolute */
|
||||
if (path[0] == '~') {
|
||||
return ssh_path_expand_tilde(path);
|
||||
}
|
||||
|
||||
/* Parsing user config relative to home directory (generally ~/.ssh) */
|
||||
if (session->opts.sshdir == NULL) {
|
||||
ssh_set_error_invalid(session);
|
||||
|
||||
Reference in New Issue
Block a user