[launchd-changes] [23107] trunk/launchd/src/launchctl.c

source_changes at macosforge.org source_changes at macosforge.org
Fri Feb 23 14:57:42 PST 2007


Revision: 23107
          http://trac.macosforge.org/projects/launchd/changeset/23107
Author:   zarzycki at apple.com
Date:     2007-02-23 14:57:41 -0800 (Fri, 23 Feb 2007)

Log Message:
-----------
Move some code to a better place.

Modified Paths:
--------------
    trunk/launchd/src/launchctl.c

Modified: trunk/launchd/src/launchctl.c
===================================================================
--- trunk/launchd/src/launchctl.c	2007-02-23 22:02:02 UTC (rev 23106)
+++ trunk/launchd/src/launchctl.c	2007-02-23 22:57:41 UTC (rev 23107)
@@ -205,8 +205,6 @@
 {
 	char *l;
 
-	do_sysversion_sysctl();
-
 	istty = isatty(STDIN_FILENO);
 
 	argc--, argv++;
@@ -1243,6 +1241,8 @@
 	int hnmib[] = { CTL_KERN, KERN_HOSTNAME };
 	struct group *tfp_gr;
 
+	do_sysversion_sysctl();
+
 	do_single_user_mode(sflag);
 
 	assumes(gettimeofday(&tvs, NULL) != -1);
@@ -2717,9 +2717,6 @@
 
 	/* <rdar://problem/4477682> ER: launchd should set kern.osversion very early in boot */
 
-	if (getuid() != 0)
-		return;
-
 	if (sysctl(mib, 2, buf, &bufsz, NULL, 0) == -1) {
 		fprintf(stderr, "sysctl(): %s\n", strerror(errno));
 		return;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070223/859eca5d/attachment.html


More information about the launchd-changes mailing list