[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Server fails to start up because it messes with MT
From: |
Timothy Brownawell |
Subject: |
Re: [Monotone-devel] Server fails to start up because it messes with MT directory |
Date: |
Sat, 7 May 2005 00:25:16 -0500 |
On 02 May 2005 14:36:41 +0200, Peter Simons <address@hidden> wrote:
> Hi,
>
> I've run into the following problem: I start my monotone
> Netsync server using a separate user id: 'monoserv'. When I
> do so while being in a current working directory which is a
> monotone repository though, I get this error message:
>
> monotone: fatal: std::exception:
> boost::filesystem::is_directory: "/root/MT":
> Permission denied
>
> That's what I got while being in ~root, obviously.
>
> Now, I start the process with
>
> --norc --rcfile=/full/path/to/permissions.lua
>
> flags, so IMHO it shouldn't access the local MT directory!
>
> Did I miss something, or is this a bug?
It's trying to read MT/options. Since anything in this file can be put
on the command line (so it's not critical to be able to read this),
here's a patch to turn this into a warning. If there are no
objections, I'll merge it in a couple days.
Tim
#
# patch "app_state.cc"
# from [da30ae47064dd3743fd31e7ce99dcb9c7fdf7813]
# to [428b3e3ec88e16568de00a00f1b79fb3fe4bb983]
#
--- app_state.cc
+++ app_state.cc
@@ -356,13 +356,19 @@
{
local_path o_path;
get_options_path(o_path);
-
- if (file_exists(o_path))
+ try
{
- data dat;
- read_data(o_path, dat);
- read_options_map(dat, options);
+ if (file_exists(o_path))
+ {
+ data dat;
+ read_data(o_path, dat);
+ read_options_map(dat, options);
+ }
}
+ catch(std::exception & e)
+ {
+ W(F("Failed to read options file %s") % o_path);
+ }
}
void