<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:55:07 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-778] don&apos;t give read lock when write lock needed in weird auth case</title>
                <link>https://jira.mongodb.org/browse/SERVER-778</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;So I was able to create a new WRITE command that got run with a read lock and did an insert without asserting.  Presumably a lockType=WRITE/requiresAuth=false combo is unusual.  There are a couple such commands right now, but I think they would more properly have read locks.  Might be worth putting a guard in execCommand() anyway.&lt;/p&gt;

&lt;p&gt;    struct BogusCmd : public Command {&lt;br/&gt;
        BogusCmd() : Command( &quot;bogus&quot; ){}&lt;br/&gt;
        virtual bool slaveOk() &lt;/p&gt;
{ return true; }
&lt;p&gt;        virtual LockType locktype() &lt;/p&gt;
{ return WRITE; }
&lt;p&gt;        virtual bool requiresAuth() &lt;/p&gt;
{ return false; }
&lt;p&gt;        virtual bool run(const char * badns, BSONObj&amp;amp; cmdObj, string&amp;amp; errmsg, BSONObjBuilder&amp;amp; result, bool)&lt;/p&gt;
{
            log() &amp;lt;&amp;lt; &quot;mutex state: &quot; &amp;lt;&amp;lt; dbMutex.getState() &amp;lt;&amp;lt; endl;
            BSONObj o = BSON( &quot;a&quot; &amp;lt;&amp;lt; &quot;b&quot; );
            theDataFileMgr.insert( &quot;test.test&quot;, o );
            return true;
        }
&lt;p&gt;    } bogusCommand;&lt;/p&gt;</description>
                <environment></environment>
        <key id="11552">SERVER-778</key>
            <summary>don&apos;t give read lock when write lock needed in weird auth case</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="eliot">Eliot Horowitz</assignee>
                                    <reporter username="aaron">Aaron Staple</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 Mar 2010 02:14:54 +0000</created>
                <updated>Tue, 12 Jul 2016 00:28:58 +0000</updated>
                            <resolved>Tue, 11 May 2010 10:06:11 +0000</resolved>
                                                    <fixVersion>1.5.2</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="14161" author="auto" created="Tue, 11 May 2010 10:06:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-778&quot; title=&quot;don&amp;#39;t give read lock when write lock needed in weird auth case&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-778&quot;&gt;&lt;del&gt;SERVER-778&lt;/del&gt;&lt;/a&gt; don&apos;t allow running write command with read lock&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/a5e1865e2802a1a3abc078d5f3715aff111d95a1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/a5e1865e2802a1a3abc078d5f3715aff111d95a1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="13095" author="aaron" created="Thu, 18 Mar 2010 03:30:25 +0000"  >&lt;p&gt;My fix made it impossible for a read only user to use db.eval, since $eval is a WRITE mode command and once a write lock is acquired that&apos;s currently how auth is checked.  Is $eval a write lock command because we have trouble running multithreaded js?  If this is the case you&apos;ll run into trouble when someone only has read access, because $eval will run with a read lock instead.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure it always makes sense for the lock type to be tied to the access type.&lt;/p&gt;</comment>
                            <comment id="13094" author="auto" created="Thu, 18 Mar 2010 03:22:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;astaple&apos;, &apos;name&apos;: &apos;Aaron&apos;, &apos;email&apos;: &apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-778&quot; title=&quot;don&amp;#39;t give read lock when write lock needed in weird auth case&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-778&quot;&gt;&lt;del&gt;SERVER-778&lt;/del&gt;&lt;/a&gt; don&apos;t allow running write command with read lock&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit ad6e86e451b94230041d413e7c46fc0ad30c7633.&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/e07aa8a7ca29241d4209cf05db1fb63d38af49e7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/e07aa8a7ca29241d4209cf05db1fb63d38af49e7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="13093" author="aaron" created="Thu, 18 Mar 2010 02:54:47 +0000"  >&lt;p&gt;Just going to allow running with a write lock when the command doesn&apos;t require auth.  There&apos;s no checking the lock type farther down, and we don&apos;t want to run with the wrong type.  &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-779&quot; title=&quot;make a couple commands not use write locks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-779&quot;&gt;&lt;del&gt;SERVER-779&lt;/del&gt;&lt;/a&gt; will eliminate the write commands that don&apos;t require auth.&lt;/p&gt;</comment>
                            <comment id="13092" author="auto" created="Thu, 18 Mar 2010 02:51:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;astaple&apos;, &apos;name&apos;: &apos;Aaron&apos;, &apos;email&apos;: &apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-778&quot; title=&quot;don&amp;#39;t give read lock when write lock needed in weird auth case&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-778&quot;&gt;&lt;del&gt;SERVER-778&lt;/del&gt;&lt;/a&gt; don&apos;t allow running write command with read lock&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/ad6e86e451b94230041d413e7c46fc0ad30c7633&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/ad6e86e451b94230041d413e7c46fc0ad30c7633&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 18 Mar 2010 02:51:24 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 41 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 41 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>aaron</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpq9z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrilvr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>22197</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hs9z13:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>