From 73d0c78415d49cc2c363badce84a92bc02fd35f4 Mon Sep 17 00:00:00 2001 From: "Stuart D. Gathman" Date: Fri, 3 May 2019 15:21:34 -0400 Subject: [PATCH] fix scope of Pipe_PATH String_CONST in cjdroute2.c --- cjdns.genconf.patch | 13 ++++++++++--- cjdns.spec | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cjdns.genconf.patch b/cjdns.genconf.patch index d2eed0f..658594c 100644 --- a/cjdns.genconf.patch +++ b/cjdns.genconf.patch @@ -1,6 +1,6 @@ diff -up ./client/cjdroute2.c.genconf ./client/cjdroute2.c --- ./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, " // and ETHInterface will be unable to hot-add new interfaces\n" " // Use { \"setuser\": 0 } to disable.\n" @@ -19,8 +19,15 @@ diff -up ./client/cjdroute2.c.genconf ./client/cjdroute2.c } printf("\n" " // Nofiles is a deprecated security feature which prevents cjdns from opening\n" -@@ -651,7 +651,7 @@ int main(int argc, char** argv) - pipePath = String_CONST(Pipe_PATH); +@@ -647,11 +647,13 @@ int main(int argc, char** argv) + 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)) { - Except_throw(eh, "Can't have writable permission to pipe directory."); diff --git a/cjdns.spec b/cjdns.spec index 5016587..947cd4f 100644 --- a/cjdns.spec +++ b/cjdns.spec @@ -15,8 +15,8 @@ # Option to disable SECCOMP: confusing backward logic # Needed to run on openvz and other container systems %bcond_without seccomp -# Option to use embedded libuv-0.11.19 -%bcond_without libuv +# Option to use system libuv instead of bundled libuv-0.11.19 +%bcond_with libuv %if %{with embedded} %global use_embedded 1