There was an error while loading. Please reload this page.
1 parent 056d1a0 commit baa6cf0Copy full SHA for baa6cf0
pymongo/auth.py
@@ -241,8 +241,9 @@ def _authenticate_gssapi(credentials, sock_info):
241
gsn = credentials.mechanism_properties.service_name
242
# Starting here and continuing through the while loop below - establish
243
# the security context. See RFC 4752, Section 3.1, first paragraph.
244
+ host = sock_info.address[0]
245
result, ctx = kerberos.authGSSClientInit(
- gsn + '@' + sock_info.host, gssflags=kerberos.GSS_C_MUTUAL_FLAG)
246
+ gsn + '@' + host, gssflags=kerberos.GSS_C_MUTUAL_FLAG)
247
248
if result != kerberos.AUTH_GSS_COMPLETE:
249
raise OperationFailure('Kerberos context failed to initialize.')
0 commit comments