diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-09-08 17:11:22 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-09-08 17:11:22 -0700 |
commit | ed09d7f461852a23b338b4773360a3c231ba65ad (patch) | |
tree | c8df94c9699ea622c94a61163a44214a1097a6ce | |
parent | f8355eed688b1b2e0a0c23ab9a210fd8b8be4a96 (diff) |
Why were these all docstrings?
-rw-r--r-- | paramiko/auth_handler.py | 54 |
1 files changed, 20 insertions, 34 deletions
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index a77ace1b..29b440f2 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -253,11 +253,9 @@ class AuthHandler (object): self._parse_userauth_banner(m) ptype, m = self.transport.packetizer.read_message() if ptype == MSG_USERAUTH_GSSAPI_RESPONSE: - """ - Read the mechanism selected by the server. - We send just the Kerberos V5 OID, so the server can only - respond with this OID. - """ + # Read the mechanism selected by the server. We send just + # the Kerberos V5 OID, so the server can only respond with + # this OID. mech = m.get_string() m = Message() m.add_byte(cMSG_USERAUTH_GSSAPI_TOKEN) @@ -273,11 +271,9 @@ class AuthHandler (object): mech, self.username, srv_token) - """ - After this step the GSSAPI should not return any - token. If it does, we keep sending the token to the - server until no more token is returned. - """ + # After this step the GSSAPI should not return any + # token. If it does, we keep sending the token to + # the server until no more token is returned. if next_token is None: break else: @@ -292,11 +288,10 @@ class AuthHandler (object): # send the MIC to the server m.add_string(sshgss.ssh_get_mic(self.transport.session_id)) elif ptype == MSG_USERAUTH_GSSAPI_ERRTOK: - """ - RFC 4462 says we are not required to implement GSS-API error - messages. - :see: `RFC 4462 Section 3.8 <http://www.ietf.org/rfc/rfc4462.txt>`_ - """ + # RFC 4462 says we are not required to implement GSS-API + # error messages. + # See RFC 4462 Section 3.8 in + # http://www.ietf.org/rfc/rfc4462.txt raise SSHException("Server returned an error token") elif ptype == MSG_USERAUTH_GSSAPI_ERROR: maj_status = m.get_int() @@ -455,16 +450,12 @@ class AuthHandler (object): return elif method == "gssapi-with-mic" and gss_auth: sshgss = GSSAuth(method) - """ - OpenSSH sends just one OID. It's the Kerveros V5 OID and that's - the only OID we support. - """ - # read the number of OID mechanisms supported by the client + # Read the number of OID mechanisms supported by the client. + # OpenSSH sends just one OID. It's the Kerveros V5 OID and that's + # the only OID we support. mechs = m.get_int() - """ - We can't accept more than one OID, so if the SSH client send more - than one disconnect - """ + # We can't accept more than one OID, so if the SSH client sends + # more than one, disconnect. if mechs > 1: self.transport._log(INFO, 'Disconnect: Received more than one GSS-API OID mechanism') @@ -478,11 +469,8 @@ class AuthHandler (object): self._disconnect_no_more_auth() # send the Kerberos V5 GSSAPI OID to the client supported_mech = sshgss.ssh_gss_oids("server") - """ - RFC 4462 says we are not required to implement GSS-API error - messages. - :see: `RFC 4462 Section 3.8 <http://www.ietf.org/rfc/rfc4462.txt>`_ - """ + # RFC 4462 says we are not required to implement GSS-API error + # messages. See section 3.8 in http://www.ietf.org/rfc/rfc4462.txt while True: m = Message() m.add_byte(cMSG_USERAUTH_GSSAPI_RESPONSE) @@ -523,11 +511,9 @@ class AuthHandler (object): 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. - """ + # 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) |