PERFORCE change 19361 for review

Brian Feldman green at freebsd.org
Wed Oct 16 00:09:55 GMT 2002


http://perforce.freebsd.org/chv.cgi?CH=19361

Change 19361 by green at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list