diff options
author | Anselm Kruis <a.kruis@science-computing.de> | 2015-03-03 13:00:47 +0100 |
---|---|---|
committer | Anselm Kruis <a.kruis@science-computing.de> | 2015-03-03 13:00:47 +0100 |
commit | ceddde7498a1b88e9662668b037552b71010cf46 (patch) | |
tree | 405309e7240d684800d332b905eb98bd6fceb4d2 | |
parent | ee47257684d2b9999743317c1b1bc1a0b135875d (diff) |
Fix an uninitialised variable usage and simplify the code.
-rw-r--r-- | paramiko/auth_handler.py | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index 9cf4e271..ef4a8c7e 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -510,15 +510,11 @@ class AuthHandler (object): result = AUTH_FAILED self._send_auth_result(username, method, result) raise - if retval == 0: - # TODO: Implement client credential saving. - # The OpenSSH server is able to create a TGT with the delegated - # client credentials, but this is not supported by GSS-API. - result = AUTH_SUCCESSFUL - self.transport.server_object.check_auth_gssapi_with_mic( - username, result) - else: - result = AUTH_FAILED + # TODO: Implement client credential saving. + # The OpenSSH server is able to create a TGT with the delegated + # client credentials, but this is not supported by GSS-API. + result = AUTH_SUCCESSFUL + self.transport.server_object.check_auth_gssapi_with_mic(username, result) elif method == "gssapi-keyex" and gss_auth: mic_token = m.get_string() sshgss = self.transport.kexgss_ctxt @@ -534,12 +530,8 @@ class AuthHandler (object): result = AUTH_FAILED self._send_auth_result(username, method, result) raise - if retval == 0: - result = AUTH_SUCCESSFUL - self.transport.server_object.check_auth_gssapi_keyex(username, - result) - else: - result = AUTH_FAILED + result = AUTH_SUCCESSFUL + self.transport.server_object.check_auth_gssapi_keyex(username, result) else: result = self.transport.server_object.check_auth_none(username) # okay, send result |