summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2018-01-10 17:09:22 -0500
committerBilly Donahue <billy.donahue@mongodb.com>2018-01-16 13:52:44 -0500
commita6e45f0e35724ae7958e31fc141c89afcefe4d33 (patch)
tree5ac0bf28fc1b977078845cbff966ff3427cfaa92 /src/mongo/db/auth
parent1378f8ec42068913c5bdc5927bbe86d5aed08814 (diff)
downloadmongo-a6e45f0e35724ae7958e31fc141c89afcefe4d33.tar.gz
SERVER-32646 CommandHelpers
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r--src/mongo/db/auth/sasl_commands.cpp8
-rw-r--r--src/mongo/db/auth/user_management_commands_parser.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/auth/sasl_commands.cpp b/src/mongo/db/auth/sasl_commands.cpp
index bd4e4e04c5f..0d762e5e38c 100644
--- a/src/mongo/db/auth/sasl_commands.cpp
+++ b/src/mongo/db/auth/sasl_commands.cpp
@@ -285,7 +285,7 @@ bool CmdSaslStart::run(OperationContext* opCtx,
session->setOpCtxt(opCtx);
Status status = doSaslStart(client, session, db, cmdObj, &result);
- appendCommandStatus(result, status);
+ CommandHelpers::appendCommandStatus(result, status);
if (session->isDone()) {
audit::logAuthentication(client,
@@ -314,7 +314,7 @@ bool CmdSaslContinue::run(OperationContext* opCtx,
AuthenticationSession::swap(client, sessionGuard);
if (!sessionGuard || sessionGuard->getType() != AuthenticationSession::SESSION_TYPE_SASL) {
- return appendCommandStatus(
+ return CommandHelpers::appendCommandStatus(
result, Status(ErrorCodes::ProtocolError, "No SASL session state found"));
}
@@ -324,7 +324,7 @@ bool CmdSaslContinue::run(OperationContext* opCtx,
// Authenticating the __system@local user to the admin database on mongos is required
// by the auth passthrough test suite.
if (session->getAuthenticationDatabase() != db && !Command::testCommandsEnabled) {
- return appendCommandStatus(
+ return CommandHelpers::appendCommandStatus(
result,
Status(ErrorCodes::ProtocolError,
"Attempt to switch database target during SASL authentication."));
@@ -333,7 +333,7 @@ bool CmdSaslContinue::run(OperationContext* opCtx,
session->setOpCtxt(opCtx);
Status status = doSaslContinue(client, session, cmdObj, &result);
- appendCommandStatus(result, status);
+ CommandHelpers::appendCommandStatus(result, status);
if (session->isDone()) {
audit::logAuthentication(client,
diff --git a/src/mongo/db/auth/user_management_commands_parser.cpp b/src/mongo/db/auth/user_management_commands_parser.cpp
index 5d7f682579e..52d33822be0 100644
--- a/src/mongo/db/auth/user_management_commands_parser.cpp
+++ b/src/mongo/db/auth/user_management_commands_parser.cpp
@@ -62,7 +62,7 @@ Status _checkNoExtraFields(const BSONObj& cmdObj,
// ones.
for (BSONObjIterator iter(cmdObj); iter.more(); iter.next()) {
StringData fieldName = (*iter).fieldNameStringData();
- if (!Command::isGenericArgument(fieldName) &&
+ if (!CommandHelpers::isGenericArgument(fieldName) &&
!validFieldNames.count(fieldName.toString())) {
return Status(ErrorCodes::BadValue,
mongoutils::str::stream() << "\"" << fieldName << "\" is not "