diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-11-14 15:55:05 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-11-14 15:55:05 -0500 |
commit | 8723be4f957441b3ce5938c6059ed838a51c46f3 (patch) | |
tree | 236fac9f7f095ceb98552d38544f34500fec5479 | |
parent | 58a501e059ba633bc6e331a8114638ac6fba2ac0 (diff) | |
download | mongo-8723be4f957441b3ce5938c6059ed838a51c46f3.tar.gz |
backport of Make sharded killOp/curOp/unlock check auth SERVER-4250
-rw-r--r-- | s/strategy_single.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/s/strategy_single.cpp b/s/strategy_single.cpp index 012be5fb3dd..fc206e5f080 100644 --- a/s/strategy_single.cpp +++ b/s/strategy_single.cpp @@ -182,6 +182,9 @@ namespace mongo { vector<Shard> shards; if ( strcmp( ns , "inprog" ) == 0 ) { + + r.checkAuth(); + Shard::getAllShards( shards ); BSONArrayBuilder arr( b.subarrayStart( "inprog" ) ); @@ -219,6 +222,9 @@ namespace mongo { arr.done(); } else if ( strcmp( ns , "killop" ) == 0 ) { + + r.checkAuth(); + BSONElement e = q.query["op"]; if ( strstr( r.getns() , "admin." ) != 0 ) { b.append( "err" , "unauthorized" ); |