|
36 | 36 | #define SYSLOG_NAMES
|
37 | 37 | #include <syslog.h>
|
38 | 38 | #endif
|
| 39 | +#include <ios> |
39 | 40 | #include <boost/filesystem.hpp>
|
40 | 41 | #include <boost/filesystem/operations.hpp>
|
41 | 42 |
|
@@ -111,13 +112,13 @@ namespace {
|
111 | 112 | Status addGeneralServerOptions(moe::OptionSection* options) {
|
112 | 113 | StringBuilder portInfoBuilder;
|
113 | 114 | StringBuilder maxConnInfoBuilder;
|
114 |
| - StringBuilder unixSockPermsBuilder; |
| 115 | + std::stringstream unixSockPermsBuilder; |
115 | 116 |
|
116 | 117 | portInfoBuilder << "specify port number - " << ServerGlobalParams::DefaultDBPort << " by default";
|
117 | 118 | maxConnInfoBuilder << "max number of simultaneous connections - "
|
118 | 119 | << DEFAULT_MAX_CONN << " by default";
|
119 | 120 | unixSockPermsBuilder << "permissions to set on UNIX domain socket file - "
|
120 |
| - << DEFAULT_UNIX_PERMS << " by default"; |
| 121 | + << "0" << std::oct << DEFAULT_UNIX_PERMS << " by default"; |
121 | 122 |
|
122 | 123 | options->addOptionChaining("help", "help,h", moe::Switch, "show this usage information")
|
123 | 124 | .setSources(moe::SourceAllLegacy);
|
@@ -275,7 +276,7 @@ namespace {
|
275 | 276 | moe::String, "alternative directory for UNIX domain sockets (defaults to /tmp)");
|
276 | 277 |
|
277 | 278 | options->addOptionChaining("net.unixDomainSocket.filePermissions", "filePermissions",
|
278 |
| - moe::Int, unixSockPermsBuilder.str().c_str() ); |
| 279 | + moe::Int, unixSockPermsBuilder.str() ); |
279 | 280 |
|
280 | 281 | options->addOptionChaining("processManagement.fork", "fork", moe::Switch,
|
281 | 282 | "fork server process");
|
|
0 commit comments