Add a placehohlder for non-expanded identities

Expanding a string twice could lead to unwanted behaviour.
This solution creates a ssh_list (`opts.identites_non_exp`) to store the strings
before expansion and by using ssh_apply it moves the string to the
`opts.identities`. This way the expanded strings are separated.

Signed-off-by: Norbert Pocs <npocs@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 1ff893c914)
This commit is contained in:
Norbert Pocs
2022-11-16 10:40:38 +01:00
committed by Andreas Schneider
parent 438cc6df52
commit 1fb95070f2
3 changed files with 75 additions and 35 deletions

View File

@@ -209,6 +209,7 @@ struct ssh_session_struct {
#endif
struct {
struct ssh_list *identity;
struct ssh_list *identity_non_exp;
char *username;
char *host;
char *bindaddr; /* bind the client to an ip addr */