diff -NurpP --minimal linux-2.6.11.7-vs1.9.5.x4/kernel/vserver/helper.c linux-2.6.11.7-vs1.9.5.x5/kernel/vserver/helper.c --- linux-2.6.11.7-vs1.9.5.x4/kernel/vserver/helper.c 2005-04-11 19:19:41 +0200 +++ linux-2.6.11.7-vs1.9.5.x5/kernel/vserver/helper.c 2005-04-13 23:15:57 +0200 @@ -31,18 +31,16 @@ char vshelper_path[255] = "/sbin/vshelpe * argv [0] = vshelper_path; * argv [1] = action: "restart", "halt", "poweroff", ... * argv [2] = context identifier - * argv [3] = additional argument (restart2) * * envp [*] = type-specific parameters */ long vs_reboot(unsigned int cmd, void * arg) { - char id_buf[8], cmd_buf[32]; - char uid_buf[32], pid_buf[32]; - char buffer[256]; + char id_buf[8], cmd_buf[16]; + char uid_buf[16], pid_buf[16]; - char *argv[] = {vshelper_path, NULL, id_buf, NULL, 0}; + char *argv[] = {vshelper_path, NULL, id_buf, 0}; char *envp[] = {"HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", uid_buf, pid_buf, cmd_buf, 0}; @@ -70,20 +68,16 @@ long vs_reboot(unsigned int cmd, void * argv[1] = "swsusp"; break; - case LINUX_REBOOT_CMD_RESTART2: - if (strncpy_from_user(&buffer[0], (char *)arg, sizeof(buffer) - 1) < 0) - return -EFAULT; - argv[3] = buffer; default: argv[1] = "restart2"; break; } /* maybe we should wait ? */ - if (call_usermodehelper(*argv, argv, envp, 0)) { + if (call_usermodehelper(*argv, argv, envp, 1)) { printk( KERN_WARNING - "vs_reboot(): failed to exec (%s %s %s %s)\n", - vshelper_path, argv[1], argv[2], argv[3]); + "vs_reboot(): failed to exec (%s %s %s)\n", + vshelper_path, argv[1], argv[2]); return -EPERM; } return 0;