diff options
Diffstat (limited to 'db/query.cpp')
-rw-r--r-- | db/query.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/db/query.cpp b/db/query.cpp index c6d40b6fd67..d2890422365 100644 --- a/db/query.cpp +++ b/db/query.cpp @@ -112,9 +112,7 @@ namespace mongo { if done here, as there are pointers into those objects in NamespaceDetails. */ - if( strstr(ns, ".system.users") ) - ; - else { + if( ! legalClientSystemNS( ns , true ) ){ uasserted("cannot delete from system namespace"); return -1; } @@ -752,7 +750,7 @@ namespace mongo { uassert("cannot update reserved $ collection", strchr(ns, '$') == 0 ); if ( strstr(ns, ".system.") ) { - uassert("cannot update system collection", strstr(ns, ".system.users")); + uassert("cannot update system collection", legalClientSystemNS( ns , true ) ); } QueryPlanSet qps( ns, pattern, BSONObj() ); |