Add flags for escape expand operation

Calling `ssh_options_apply` more times can result in an unwanted behaviour of
expanding the escape characters more times. Adding flags to check if the
expansion was already done on the current string variables.

Signed-off-by: Norbert Pocs <npocs@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Norbert Pocs
2022-11-16 16:51:02 +01:00
committed by Jakub Jelen
parent 87d694d5ad
commit 1bd499febb
3 changed files with 69 additions and 43 deletions

View File

@@ -115,6 +115,8 @@ ssh_session ssh_new(void)
SSH_OPT_FLAG_KBDINT_AUTH |
SSH_OPT_FLAG_GSSAPI_AUTH;
session->opts.exp_flags = 0;
session->opts.identity = ssh_list_new();
if (session->opts.identity == NULL) {
goto err;