diff options
author | Matt Kangas <matt.kangas@mongodb.com> | 2014-12-15 14:48:17 -0500 |
---|---|---|
committer | Matt Kangas <matt.kangas@mongodb.com> | 2014-12-15 18:48:13 -0500 |
commit | 7d40e0f7ad1f0118998f0ec5a8cd37cef313678f (patch) | |
tree | daedc8a1e7b3bba4eae327ebf8ef44544317651c /src | |
parent | c052295f3eb8081db74be4f1e4ff48f02085a9f8 (diff) | |
download | mongo-7d40e0f7ad1f0118998f0ec5a8cd37cef313678f.tar.gz |
SERVER-16547 --filePermissions should show default in octal
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/server_options_helpers.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/server_options_helpers.cpp b/src/mongo/db/server_options_helpers.cpp index cc549560836..93862e62539 100644 --- a/src/mongo/db/server_options_helpers.cpp +++ b/src/mongo/db/server_options_helpers.cpp @@ -36,6 +36,7 @@ #define SYSLOG_NAMES #include <syslog.h> #endif +#include <ios> #include <boost/filesystem.hpp> #include <boost/filesystem/operations.hpp> @@ -111,13 +112,13 @@ namespace { Status addGeneralServerOptions(moe::OptionSection* options) { StringBuilder portInfoBuilder; StringBuilder maxConnInfoBuilder; - StringBuilder unixSockPermsBuilder; + std::stringstream unixSockPermsBuilder; portInfoBuilder << "specify port number - " << ServerGlobalParams::DefaultDBPort << " by default"; maxConnInfoBuilder << "max number of simultaneous connections - " << DEFAULT_MAX_CONN << " by default"; unixSockPermsBuilder << "permissions to set on UNIX domain socket file - " - << DEFAULT_UNIX_PERMS << " by default"; + << "0" << std::oct << DEFAULT_UNIX_PERMS << " by default"; options->addOptionChaining("help", "help,h", moe::Switch, "show this usage information") .setSources(moe::SourceAllLegacy); @@ -275,7 +276,7 @@ namespace { moe::String, "alternative directory for UNIX domain sockets (defaults to /tmp)"); options->addOptionChaining("net.unixDomainSocket.filePermissions", "filePermissions", - moe::Int, unixSockPermsBuilder.str().c_str() ); + moe::Int, unixSockPermsBuilder.str() ); options->addOptionChaining("processManagement.fork", "fork", moe::Switch, "fork server process"); |