diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-01-20 19:06:28 +0100 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-01-20 19:06:28 +0100 |
commit | 311eb167fce73dbc97c7d9dfcc43a59b5695a8f7 (patch) | |
tree | f9ccbd81f07b4982225dcd8ad0885153b3eb975b | |
parent | 2dc572df0e3002263c0a49ebbc329ed1b6c42a01 (diff) | |
download | unitd-311eb167fce73dbc97c7d9dfcc43a59b5695a8f7.tar unitd-311eb167fce73dbc97c7d9dfcc43a59b5695a8f7.zip |
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 <jow@openwrt.org>
-rw-r--r-- | state.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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"); |