1
1
Fixes T194

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
Anderson Toshiyuki Sasaki 2019-11-05 10:26:15 +01:00 коммит произвёл Andreas Schneider
родитель c54fd03e50
Коммит 3f64fb3b3b

Просмотреть файл

@ -56,7 +56,8 @@
* *
* @returns A new ssh_session pointer, NULL on error. * @returns A new ssh_session pointer, NULL on error.
*/ */
ssh_session ssh_new(void) { ssh_session ssh_new(void)
{
ssh_session session; ssh_session session;
char *id = NULL; char *id = NULL;
int rc; int rc;
@ -109,8 +110,12 @@ ssh_session ssh_new(void) {
session->opts.fd = -1; session->opts.fd = -1;
session->opts.compressionlevel = 7; session->opts.compressionlevel = 7;
session->opts.nodelay = 0; session->opts.nodelay = 0;
session->opts.flags = SSH_OPT_FLAG_PASSWORD_AUTH | SSH_OPT_FLAG_PUBKEY_AUTH |
SSH_OPT_FLAG_KBDINT_AUTH | SSH_OPT_FLAG_GSSAPI_AUTH; session->opts.flags = SSH_OPT_FLAG_PASSWORD_AUTH |
SSH_OPT_FLAG_PUBKEY_AUTH |
SSH_OPT_FLAG_KBDINT_AUTH |
SSH_OPT_FLAG_GSSAPI_AUTH;
session->opts.identity = ssh_list_new(); session->opts.identity = ssh_list_new();
if (session->opts.identity == NULL) { if (session->opts.identity == NULL) {
goto err; goto err;
@ -120,6 +125,7 @@ ssh_session ssh_new(void) {
if (id == NULL) { if (id == NULL) {
goto err; goto err;
} }
rc = ssh_list_append(session->opts.identity, id); rc = ssh_list_append(session->opts.identity, id);
if (rc == SSH_ERROR) { if (rc == SSH_ERROR) {
goto err; goto err;