mongod --auth crash during unauthenticated operation

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.0.2
    • Component/s: Security
    • None
    • Environment:
      FreeBSD 9.0-STABLE FreeBSD 9.0-STABLE #1 r230142 amd64
      mongodb-2.0.2
      using spider monkey for javascript
    • FreeBSD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When trying to do an operation on a database without being authenticated when mongod is started with --auth flag, mongod crashes.

      Example:

      1. mongo
        MongoDB shell version: 2.0.2
        connecting to: test
        > db.system.users.find()
        Mon Jan 16 19:20:36 DBClientCursor::init call() failed
        Mon Jan 16 19:20:36 query failed : test.system.users {} to: 127.0.0.1
        Error: error doing query: failed
        Mon Jan 16 19:20:36 trying reconnect to 127.0.0.1
        Mon Jan 16 19:20:36 reconnect 127.0.0.1 failed couldn't connect to server 127.0.0.1
        > exit
        bye
        mongo# /usr/local/etc/rc.d/mongod restart
        mongod not running?
        Starting mongod.
        forked process: 7424
        all output going to: /var/db/mongodb/mongod.log
        mongo# mongo
        MongoDB shell version: 2.0.2
        connecting to: test
        > db.auth('test','secret')
        1
        > db.system.users.find() { "_id" : ObjectId("4f10853a4292b966a9f08ef9"), "user" : "test", "readOnly" : false, "pwd" : "d42ffb4208a6ee4ef351cea495d01631" } { "_id" : ObjectId("4f1087f34292b966a9f08efa"), "user" : "patxi", "readOnly" : false, "pwd" : "3a43f2e323947ced066d82d4433281f7" }

      Attached is a relevant part of mongod.log

        1. mongod.log
          3 kB
          Romain Garbage

            Assignee:
            Spencer Brody (Inactive)
            Reporter:
            Romain Garbage
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: