Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2002 17:09:55 -0700 (PDT)
From:      Brian Feldman <green@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 19361 for review
Message-ID:  <200210160009.g9G09tFh084911@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=19361

Change 19361 by green@green_laptop_2 on 2002/10/15 17:09:05

	Execute the runcom scripts directly, instead of as an argument
	to /bin/sh, so that TE may transition based on them.

Affected files ...

.. //depot/projects/trustedbsd/mac/etc/Makefile#20 edit
.. //depot/projects/trustedbsd/mac/sbin/init/init.c#5 edit

Differences ...

==== //depot/projects/trustedbsd/mac/etc/Makefile#20 (text+ko) ====

@@ -12,8 +12,8 @@
 	inetd.conf login.access login.conf \
 	mac.conf motd modems netconfig networks newsyslog.conf \
 	phones printcap profile protocols \
-	rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \
-	rc.network rc.network6 rc.pccard rc.sendmail rc.serial rc.shutdown \
+	rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \
+	rc.network rc.network6 rc.pccard rc.sendmail rc.serial \
 	rc.subr rc.syscons rc.sysctl remote rpc services \
 	shells sysctl.conf syslog.conf usbd.conf \
 	etc.${MACHINE_ARCH}/disktab \
@@ -37,7 +37,7 @@
 .endif
 
 # -rwxr-xr-x root:wheel, for the new cron root:wheel
-BIN2=	netstart pccard_ether rc.suspend rc.resume
+BIN2=	netstart pccard_ether rc.suspend rc.resume rc rc.shutdown
 
 DEFAULTS= rc.conf pccard.conf periodic.conf
 

==== //depot/projects/trustedbsd/mac/sbin/init/init.c#5 (text+ko) ====

@@ -737,6 +737,8 @@
 #ifdef LOGIN_CAP
 		setprocresources(RESOURCE_RC);
 #endif
+		execv(_PATH_RUNCOM, argv + 1);
+		warning("can't exec %s: %m", _PATH_RUNCOM);
 		execv(_PATH_BSHELL, argv);
 		stall("can't exec %s for %s: %m", _PATH_BSHELL, _PATH_RUNCOM);
 		_exit(1);	/* force single user mode */
@@ -1497,6 +1499,8 @@
 #ifdef LOGIN_CAP
 		setprocresources(RESOURCE_RC);
 #endif
+		execv(_PATH_RUNCOM, argv + 1);
+		warning("can't exec %s: %m", _PATH_RUNDOWN);
 		execv(_PATH_BSHELL, argv);
 		warning("can't exec %s for %s: %m", _PATH_BSHELL, _PATH_RUNDOWN);
 		_exit(1);	/* force single user mode */

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210160009.g9G09tFh084911>