summaryrefslogtreecommitdiff
path: root/src/mongo/db/introspect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/introspect.cpp')
-rw-r--r--src/mongo/db/introspect.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mongo/db/introspect.cpp b/src/mongo/db/introspect.cpp
index 2c6fa6c5600..a7671bc4497 100644
--- a/src/mongo/db/introspect.cpp
+++ b/src/mongo/db/introspect.cpp
@@ -20,6 +20,7 @@
#include "mongo/bson/util/builder.h"
#include "mongo/db/auth/authorization_manager.h"
+#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/auth/principal_set.h"
#include "mongo/db/curop.h"
#include "mongo/db/databaseholder.h"
@@ -35,8 +36,10 @@ namespace {
namespace mongo {
namespace {
- void _appendUserInfo(const Client& c, BSONObjBuilder& builder, AuthorizationManager* authManager) {
- PrincipalSet::NameIterator nameIter = authManager->getAuthenticatedPrincipalNames();
+ void _appendUserInfo(const Client& c,
+ BSONObjBuilder& builder,
+ AuthorizationSession* authSession) {
+ PrincipalSet::NameIterator nameIter = authSession->getAuthenticatedPrincipalNames();
PrincipalName bestUser;
if (nameIter.more())
@@ -76,8 +79,8 @@ namespace {
b.appendDate("ts", jsTime());
b.append("client", c.clientAddress());
- AuthorizationManager* authManager = c.getAuthorizationManager();
- _appendUserInfo(c, b, authManager);
+ AuthorizationSession * authSession = c.getAuthorizationSession();
+ _appendUserInfo(c, b, authSession);
BSONObj p = b.done();
@@ -90,7 +93,7 @@ namespace {
BSONObjBuilder b(profileBufBuilder);
b.appendDate("ts", jsTime());
b.append("client", c.clientAddress() );
- _appendUserInfo(c, b, authManager);
+ _appendUserInfo(c, b, authSession);
b.append("err", "profile line too large (max is 100KB)");