From: Jo-Philipp Wich Date: Mon, 20 Jan 2014 18:06:28 +0000 (+0000) Subject: state.c: pass ubus commandline is writable buffer to service_start_early() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=311eb167fce73dbc97c7d9dfcc43a59b5695a8f7;p=project%2Fprocd.git state.c: pass ubus commandline is writable buffer to service_start_early() The service_start_early() function uses strtok() on the command line argument, therfore we cannot pass it constant string literals directly. Fixes OpenWrt bug #14832 Signed-off-by: Jo-Philipp Wich --- diff --git a/state.c b/state.c index 9f3033b..e5f0015 100644 --- a/state.c +++ b/state.c @@ -37,6 +37,7 @@ static int reboot_event; static void state_enter(void) { + char ubus_cmd[] = "/sbin/ubusd"; switch (state) { case STATE_EARLY: @@ -54,7 +55,7 @@ static void state_enter(void) LOG("- init -\n"); service_init(); - service_start_early("ubus", "/sbin/ubusd"); + service_start_early("ubus", ubus_cmd); procd_inittab(); procd_inittab_run("respawn");