mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
Merge branch 'master' of ssh://aaron@git.10gen.com/data/gitroot/p
This commit is contained in:
commit
ed4ce395ad
@ -673,7 +673,7 @@ namespace mongo {
|
||||
string errmsg;
|
||||
Command *c = i->second;
|
||||
AuthenticationInfo *ai = authInfo.get();
|
||||
|
||||
assert( ai );
|
||||
uassert("unauthorized", ai->isAuthorized(database->name.c_str()) || !c->requiresAuth());
|
||||
|
||||
if ( c->adminOnly() && !fromRepl && strncmp(ns, "admin", p-ns) != 0 ) {
|
||||
@ -695,6 +695,7 @@ namespace mongo {
|
||||
}
|
||||
else if ( e.type() == String ) {
|
||||
AuthenticationInfo *ai = authInfo.get();
|
||||
assert( ai );
|
||||
uassert("unauthorized", ai->isAuthorized(database->name.c_str()));
|
||||
|
||||
/* { count: "collectionname"[, query: <query>] } */
|
||||
|
@ -406,8 +406,9 @@ namespace mongo {
|
||||
*/
|
||||
void jniCallback(Message& m, Message& out)
|
||||
{
|
||||
AuthenticationInfo *ai = new AuthenticationInfo();
|
||||
authInfo.reset(ai);
|
||||
/* we should be in the same thread as the original request, so authInfo should be available. */
|
||||
AuthenticationInfo *ai = authInfo.get();
|
||||
massert("no authInfo in eval", ai);
|
||||
|
||||
Database *clientOld = database;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user