projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c4025e
)
Fix from vodz so that complex init commands actually work
author
Eric Andersen
<andersen@codepoet.org>
Wed, 3 Jul 2002 05:44:18 +0000
(
05:44
-0000)
committer
Eric Andersen
<andersen@codepoet.org>
Wed, 3 Jul 2002 05:44:18 +0000
(
05:44
-0000)
init/init.c
patch
|
blob
|
history
diff --git
a/init/init.c
b/init/init.c
index e4812538d0a79c38cabb7e29841b7c8b619f16dc..8b68a0556a6a4e8f8de367300c5a8f100593cf7b 100644
(file)
--- a/
init/init.c
+++ b/
init/init.c
@@
-579,9
+579,7
@@
static pid_t run(struct init_action *a)
if (strpbrk(a->command, "~`!$^&*()=|\\{}[];\"'<>?") != NULL) {
cmd[0] = SHELL;
cmd[1] = "-c";
- strcpy(buf, "exec ");
- safe_strncpy(buf + sizeof("exec "), a->command,
- sizeof(buf) - sizeof("exec "));
+ snprintf(buf, sizeof(buf), "exec %s", a->command);
cmd[2] = buf;
cmd[3] = NULL;
} else {