diff options
author | Sebastian Deiss <sebastian.deiss@atos.net> | 2017-09-18 09:28:00 +0200 |
---|---|---|
committer | Sebastian Deiss <sebastian.deiss@atos.net> | 2017-09-18 09:28:00 +0200 |
commit | 2bfd3341e1b32d17d0dd358ba6a7efbde7d4859a (patch) | |
tree | 06698f43b44bb470134d8f4511e3199d81d19775 /paramiko/client.py | |
parent | 12efa62cf9c4190aab651f9dd61b1b176d8e07fe (diff) | |
download | paramiko-2bfd3341e1b32d17d0dd358ba6a7efbde7d4859a.tar.gz |
Fix gss_host setting and cleanup its logic
The parameter 'kex_requested' is misleading, since setting 'gss_host'
is also required for gssapi-with-mic.
Diffstat (limited to 'paramiko/client.py')
-rw-r--r-- | paramiko/client.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/paramiko/client.py b/paramiko/client.py index 86f5d896..75d295ea 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -354,9 +354,11 @@ class SSHClient (ClosingContextManager): ) t.use_compression(compress=compress) t.set_gss_host( - kex_requested=gss_kex, - gss_host=gss_host, + # t.hostname may be None, but GSS-API requires a target name. + # Therefore use hostname as fallback. + gss_host=gss_host or hostname, trust_dns=gss_trust_dns, + gssapi_requested=gss_auth or gss_kex, ) if self._log_channel is not None: t.set_log_channel(self._log_channel) |