]> Zhao Yanbai Git Server - minix.git/commitdiff
RS: do not zero process name for boot processes
authorDavid van Moolenbroek <david@minix3.org>
Thu, 6 Dec 2012 13:24:30 +0000 (13:24 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 6 Dec 2012 13:24:30 +0000 (13:24 +0000)
This bug was preventing services with IPC restrictions from being
started before the boot processes are edited from /etc/rc.

servers/rs/main.c

index a4c070b43472930a205d9cd67cda7db2272a2b76..bc77b0aaf41db319b5454bfb63bd045a97e3b2d2 100644 (file)
@@ -304,11 +304,8 @@ static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
       rpub->dev_style = boot_image_dev->dev_style;    /* device style */
       rpub->dev_style2 = boot_image_dev->dev_style2;  /* device style 2 */
 
-      /* Get process name. */
-      strcpy(rpub->proc_name, ip->proc_name);
-
-      /* Build command settings. */
-      rp->r_cmd[0]= '\0';
+      /* Build command settings. This will also set the process name. */
+      strlcpy(rp->r_cmd, ip->proc_name, sizeof(rp->r_cmd));
       rp->r_script[0]= '\0';
       build_cmd_dep(rp);