diff options
author | matt dannenberg <matt.dannenberg@10gen.com> | 2013-10-17 14:26:06 -0400 |
---|---|---|
committer | matt dannenberg <matt.dannenberg@10gen.com> | 2013-10-24 11:00:24 -0400 |
commit | 50ec2a895783239dde6ed0d51ffa9d522e2bebf2 (patch) | |
tree | 27a1f0952b578d06a99973eba784fb7600a07713 /src/mongo/db/server_options.cpp | |
parent | 7023936764956d0e7c2383d89b4203fad2741596 (diff) | |
download | mongo-50ec2a895783239dde6ed0d51ffa9d522e2bebf2.tar.gz |
SERVER-11226 fix --keyFile to work with relative path when --fork'd
Diffstat (limited to 'src/mongo/db/server_options.cpp')
-rw-r--r-- | src/mongo/db/server_options.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/server_options.cpp b/src/mongo/db/server_options.cpp index 9786ebef31b..75def3d8ce8 100644 --- a/src/mongo/db/server_options.cpp +++ b/src/mongo/db/server_options.cpp @@ -34,6 +34,7 @@ #define SYSLOG_NAMES #include <syslog.h> #endif +#include <boost/filesystem.hpp> #include "mongo/base/status.h" #include "mongo/bson/util/builder.h" @@ -505,7 +506,8 @@ namespace { } if (params.count("keyFile")) { - serverGlobalParams.keyFile = params["keyFile"].as<string>(); + serverGlobalParams.keyFile = boost::filesystem::absolute( + params["keyFile"].as<string>()).generic_string(); } if ( params.count("pidfilepath")) { |