|
|
2f8dfd1 |
diff -up ./client/cjdroute2.c.genconf ./client/cjdroute2.c
|
|
|
9b2cd28 |
--- ./client/cjdroute2.c.genconf 2019-05-02 04:02:32.000000000 -0400
|
|
|
9b2cd28 |
+++ ./client/cjdroute2.c 2019-05-08 12:14:53.146838389 -0400
|
|
|
9b2cd28 |
@@ -336,7 +336,7 @@ static int genconf(struct Random* rand,
|
|
|
2f8dfd1 |
" // and ETHInterface will be unable to hot-add new interfaces\n"
|
|
|
2f8dfd1 |
" // Use { \"setuser\": 0 } to disable.\n"
|
|
|
2f8dfd1 |
" // Default: enabled with keepNetAdmin\n"
|
|
|
2f8dfd1 |
- " { \"setuser\": \"nobody\", \"keepNetAdmin\": 1 },\n"
|
|
|
2f8dfd1 |
+ " { \"setuser\": \"cjdns\", \"keepNetAdmin\": 1 },\n"
|
|
|
2f8dfd1 |
"\n"
|
|
|
2f8dfd1 |
" // Chroot changes the filesystem root directory which cjdns sees, blocking it\n"
|
|
|
2f8dfd1 |
" // from accessing files outside of the chroot sandbox, if the user does not\n"
|
|
|
9b2cd28 |
@@ -348,7 +348,7 @@ static int genconf(struct Random* rand,
|
|
|
2f8dfd1 |
}
|
|
|
2f8dfd1 |
else {
|
|
|
2f8dfd1 |
printf(" // Default: enabled (using \"/var/run\")\n"
|
|
|
2f8dfd1 |
- " { \"chroot\": \"/var/run/\" },\n");
|
|
|
2f8dfd1 |
+ " { \"chroot\": \"/var/empty/cjdns\" },\n");
|
|
|
2f8dfd1 |
}
|
|
|
2f8dfd1 |
printf("\n"
|
|
|
2f8dfd1 |
" // Nofiles is a deprecated security feature which prevents cjdns from opening\n"
|
|
|
9b2cd28 |
@@ -695,11 +695,12 @@ int main(int argc, char** argv)
|
|
|
73d0c78 |
char corePipeName[64] = "client-core-";
|
|
|
73d0c78 |
Random_base32(rand, (uint8_t*)corePipeName+CString_strlen(corePipeName), 31);
|
|
|
9b2cd28 |
String* pipePath = Dict_getStringC(config, "pipe");
|
|
|
1883f3d |
+ String* path = String_CONST(Pipe_PATH);
|
|
|
73d0c78 |
if (!pipePath) {
|
|
|
73d0c78 |
- pipePath = String_CONST(Pipe_PATH);
|
|
|
1883f3d |
+ pipePath = path;
|
|
|
85e430e |
}
|
|
|
85e430e |
if (!Defined(win32) && access(pipePath->bytes, W_OK)) {
|
|
|
85e430e |
- Except_throw(eh, "Can't have writable permission to pipe directory.");
|
|
|
85e430e |
+ Except_throw(eh, "Pipe directory not writable: [%s]",pipePath->bytes);
|
|
|
85e430e |
}
|
|
|
85e430e |
Assert_ifParanoid(EventBase_eventCount(eventBase) == 0);
|
|
|
85e430e |
struct Pipe* corePipe = Pipe_named(pipePath->bytes, corePipeName, eventBase,
|