summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/client.cpp2
-rw-r--r--src/mongo/db/curop.cpp12
-rw-r--r--src/mongo/db/curop.h1
-rw-r--r--src/mongo/db/dbcommands.cpp2
-rw-r--r--src/mongo/db/instance.cpp2
-rw-r--r--src/mongo/dbtests/counttests.cpp2
6 files changed, 5 insertions, 16 deletions
diff --git a/src/mongo/db/client.cpp b/src/mongo/db/client.cpp
index 8aa5350f06e..6caefabaa1c 100644
--- a/src/mongo/db/client.cpp
+++ b/src/mongo/db/client.cpp
@@ -380,7 +380,7 @@ namespace mongo {
string Client::toString() const {
stringstream ss;
if ( _curOp )
- ss << _curOp->infoNoauth().jsonString();
+ ss << _curOp->info().jsonString();
return ss.str();
}
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index 96e2c423241..570ee02f8e2 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -88,16 +88,6 @@ namespace mongo {
return _progressMeter;
}
-
- BSONObj CurOp::info() {
- if( ! cc().getAuthenticationInfo()->isAuthorized("admin") ) {
- BSONObjBuilder b;
- b.append("err", "unauthorized");
- return b.obj();
- }
- return infoNoauth();
- }
-
CurOp::~CurOp() {
killCurrentOp.notifyAllWaiters();
@@ -133,7 +123,7 @@ namespace mongo {
}
}
- BSONObj CurOp::infoNoauth() {
+ BSONObj CurOp::info() {
BSONObjBuilder b;
b.append("opid", _opNum);
bool a = _active && _start;
diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h
index 5c023bcc4fc..e0afd1de3fc 100644
--- a/src/mongo/db/curop.h
+++ b/src/mongo/db/curop.h
@@ -217,7 +217,6 @@ namespace mongo {
void setQuery(const BSONObj& query) { _query.set( query ); }
Client * getClient() const { return _client; }
BSONObj info();
- BSONObj infoNoauth();
string getRemoteString( bool includePort = true ) { return _remote.toString(includePort); }
ProgressMeter& setMessage( const char * msg , unsigned long long progressMeterTotal = 0 , int secondsBetween = 3 );
string getMessage() const { return _message.toString(); }
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp
index fd83267615a..9ad224fd7a4 100644
--- a/src/mongo/db/dbcommands.cpp
+++ b/src/mongo/db/dbcommands.cpp
@@ -1596,7 +1596,7 @@ namespace mongo {
const BSONObj& cmdObj,
std::vector<Privilege>* out) {} // No auth required
virtual bool run(const string& dbname, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) {
- BSONObj info = cc().curop()->infoNoauth();
+ BSONObj info = cc().curop()->info();
result << "you" << info[ "client" ];
return true;
}
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp
index b7c95845003..b0af6200259 100644
--- a/src/mongo/db/instance.cpp
+++ b/src/mongo/db/instance.cpp
@@ -175,7 +175,7 @@ namespace mongo {
}
verify( co );
if( all || co->displayInCurop() ) {
- BSONObj info = co->infoNoauth();
+ BSONObj info = co->info();
if ( all || m->matches( info )) {
vals.push_back( info );
}
diff --git a/src/mongo/dbtests/counttests.cpp b/src/mongo/dbtests/counttests.cpp
index bcaf4ac0185..1a06687bb5c 100644
--- a/src/mongo/dbtests/counttests.cpp
+++ b/src/mongo/dbtests/counttests.cpp
@@ -225,7 +225,7 @@ namespace CountTests {
}
private:
int numYields() const {
- return cc().curop()->infoNoauth()[ "numYields" ].Int();
+ return cc().curop()->info()[ "numYields" ].Int();
}
// A writer client is registered while the test runs, causing runCount() to yield.
WriterClientScope _writer;