commit | 796446718d6a90754b9217989c4fbb4070686142 | [log] [tgz] |
---|---|---|
author | Eric Andersen <andersen@codepoet.org> | Wed Jul 03 05:44:18 2002 +0000 |
committer | Eric Andersen <andersen@codepoet.org> | Wed Jul 03 05:44:18 2002 +0000 |
tree | 68f35075855dc08c3e4b9f2f3ce84ffcd61ea67e | |
parent | 8c4025e7082b2440bda844089e1aa2a3504ed6d7 [diff] |
Fix from vodz so that complex init commands actually work
diff --git a/init/init.c b/init/init.c index e481253..8b68a05 100644 --- a/init/init.c +++ b/init/init.c
@@ -579,9 +579,7 @@ 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 {