summaryrefslogtreecommitdiff
path: root/src/mongo/client/sasl_sspi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/client/sasl_sspi.cpp')
-rw-r--r--src/mongo/client/sasl_sspi.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/client/sasl_sspi.cpp b/src/mongo/client/sasl_sspi.cpp
index f904eaa24a7..695ec3f62dc 100644
--- a/src/mongo/client/sasl_sspi.cpp
+++ b/src/mongo/client/sasl_sspi.cpp
@@ -199,10 +199,11 @@ int sspiClientMechNew(void* glob_context,
// Then obtain all potential FQDNs for the hostname.
std::string canonName = cparams->serverFQDN;
- auto fqdns = getHostFQDNs(cparams->serverFQDN, saslSSPIGlobalParams.canonicalization);
- if (!fqdns.empty()) {
+ auto fqdnsSW = getHostFQDNs(cparams->serverFQDN, saslSSPIGlobalParams.canonicalization);
+ if (fqdnsSW.isOK() && !fqdnsSW.getValue().empty()) {
// PTR records should point to the canonical name. If there's more than one, warn and
// arbitrarily use the last entry.
+ auto fqdns = fqdnsSW.getValue();
if (fqdns.size() > 1) {
LOGV2_WARNING(23933,
"Found multiple PTR records while performing reverse DNS",