Commit 621060e
committed
Use a more suitable method of detecting if authentication is needed
The `db.serverCmdLineOpts()` method always requires authentication when
auth is enabled. It doesn't take the `enableLocalAuthBypass` parameter
into account, the subsequent authentication attempt always fails if a
user doesn't exists. This commit switches to the `rs.status()` method,
as that method does take the `enableLocalAuthBypass` parameter into
account and allows us to obtain a shell before with authentication
enabled, but before the user exists.1 parent 5e21678 commit 621060e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments