fix scope of Pipe_PATH String_CONST in cjdroute2.c
This commit is contained in:
parent
85e430e00f
commit
73d0c78415
@ -1,6 +1,6 @@
|
|||||||
diff -up ./client/cjdroute2.c.genconf ./client/cjdroute2.c
|
diff -up ./client/cjdroute2.c.genconf ./client/cjdroute2.c
|
||||||
--- ./client/cjdroute2.c.genconf 2018-04-18 03:35:41.000000000 -0400
|
--- ./client/cjdroute2.c.genconf 2018-04-18 03:35:41.000000000 -0400
|
||||||
+++ ./client/cjdroute2.c 2019-05-03 10:45:23.397556542 -0400
|
+++ ./client/cjdroute2.c 2019-05-03 15:01:41.178368417 -0400
|
||||||
@@ -334,7 +334,7 @@ static int genconf(struct Random* rand,
|
@@ -334,7 +334,7 @@ static int genconf(struct Random* rand,
|
||||||
" // and ETHInterface will be unable to hot-add new interfaces\n"
|
" // and ETHInterface will be unable to hot-add new interfaces\n"
|
||||||
" // Use { \"setuser\": 0 } to disable.\n"
|
" // Use { \"setuser\": 0 } to disable.\n"
|
||||||
@ -19,8 +19,15 @@ diff -up ./client/cjdroute2.c.genconf ./client/cjdroute2.c
|
|||||||
}
|
}
|
||||||
printf("\n"
|
printf("\n"
|
||||||
" // Nofiles is a deprecated security feature which prevents cjdns from opening\n"
|
" // Nofiles is a deprecated security feature which prevents cjdns from opening\n"
|
||||||
@@ -651,7 +651,7 @@ int main(int argc, char** argv)
|
@@ -647,11 +647,13 @@ int main(int argc, char** argv)
|
||||||
pipePath = String_CONST(Pipe_PATH);
|
char corePipeName[64] = "client-core-";
|
||||||
|
Random_base32(rand, (uint8_t*)corePipeName+CString_strlen(corePipeName), 31);
|
||||||
|
String* pipePath = Dict_getStringC(&config, "pipe");
|
||||||
|
+ String path;
|
||||||
|
if (!pipePath) {
|
||||||
|
- pipePath = String_CONST(Pipe_PATH);
|
||||||
|
+ path = *String_CONST(Pipe_PATH);
|
||||||
|
+ pipePath = &path;
|
||||||
}
|
}
|
||||||
if (!Defined(win32) && access(pipePath->bytes, W_OK)) {
|
if (!Defined(win32) && access(pipePath->bytes, W_OK)) {
|
||||||
- Except_throw(eh, "Can't have writable permission to pipe directory.");
|
- Except_throw(eh, "Can't have writable permission to pipe directory.");
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
# Option to disable SECCOMP: confusing backward logic
|
# Option to disable SECCOMP: confusing backward logic
|
||||||
# Needed to run on openvz and other container systems
|
# Needed to run on openvz and other container systems
|
||||||
%bcond_without seccomp
|
%bcond_without seccomp
|
||||||
# Option to use embedded libuv-0.11.19
|
# Option to use system libuv instead of bundled libuv-0.11.19
|
||||||
%bcond_without libuv
|
%bcond_with libuv
|
||||||
|
|
||||||
%if %{with embedded}
|
%if %{with embedded}
|
||||||
%global use_embedded 1
|
%global use_embedded 1
|
||||||
|
Loading…
Reference in New Issue
Block a user