Using the admin db by default will not work if using auth (and not auth'd to the admin db explicitly).
There are 5 places, in bench.cpp, pipeline_d.cpp, and document_source_out.cpp where getLastErrorDetailed() is called without a db parameter. Each location has a db that makes more sense to use that admin and will already be authenticated against. getLastError() requires being authenticated to the database. These locations should be fixed to provide a db, and we should remove the form of getLastErrorDetailed() that provides a default so that future development does not accidentally make the same mistake.