[launchd-changes] [22965] trunk/launchd/src
source_changes at macosforge.org
source_changes at macosforge.org
Mon Dec 4 09:26:23 PST 2006
Revision: 22965
http://trac.macosforge.org/projects/launchd/changeset/22965
Author: zarzycki at apple.com
Date: 2006-12-04 09:26:23 -0800 (Mon, 04 Dec 2006)
Log Message:
-----------
<rdar://problem/4857610> 9A318: /etc/launchd.conf forces all servers into user session
Modified Paths:
--------------
trunk/launchd/src/launchctl.c
trunk/launchd/src/launchd.c
Modified: trunk/launchd/src/launchctl.c
===================================================================
--- trunk/launchd/src/launchctl.c 2006-12-04 17:24:22 UTC (rev 22964)
+++ trunk/launchd/src/launchctl.c 2006-12-04 17:26:23 UTC (rev 22965)
@@ -1180,6 +1180,11 @@
int hnmib[] = { CTL_KERN, KERN_HOSTNAME };
struct group *tfp_gr;
+ if (getuid() != 0) {
+ fprintf(stderr, "%s: Only root can run the 'bootstrap' sub-command right now.\n", getprogname());
+ return 1;
+ }
+
if (assumes((tfp_gr = getgrnam("procview")) != NULL)) {
int tfp_r_mib[3] = { CTL_KERN, KERN_TFP, KERN_TFP_READ_GROUP };
gid_t tfp_r_gid = tfp_gr->gr_gid;
Modified: trunk/launchd/src/launchd.c
===================================================================
--- trunk/launchd/src/launchd.c 2006-12-04 17:24:22 UTC (rev 22964)
+++ trunk/launchd/src/launchd.c 2006-12-04 17:26:23 UTC (rev 22965)
@@ -106,7 +106,7 @@
static job_t rlcj = NULL;
static jmp_buf doom_doom_doom;
static void *crash_addr;
-static const char *launchctl_bootstrap_tool[] = { "/bin/launchctl", "bootstrap", NULL };
+static const char *launchctl_bootstrap_tool[] = { "/bin/launchctl", /* "bootstrap", */ NULL };
sigset_t blocked_signals = 0;
bool shutdown_in_progress = false;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20061204/1a21daa4/attachment.html
More information about the launchd-changes
mailing list