[launchd-changes] [23288] trunk/launchd/src
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jul 2 09:29:12 PDT 2007
Revision: 23288
http://trac.macosforge.org/projects/launchd/changeset/23288
Author: zarzycki at apple.com
Date: 2007-07-02 09:29:12 -0700 (Mon, 02 Jul 2007)
Log Message:
-----------
<rdar://problem/5284661> Per-user agents run in root security context
Modified Paths:
--------------
trunk/launchd/src/Makefile.am
trunk/launchd/src/Makefile.in
trunk/launchd/src/launchctl.c
Modified: trunk/launchd/src/Makefile.am
===================================================================
--- trunk/launchd/src/Makefile.am 2007-06-29 20:24:46 UTC (rev 23287)
+++ trunk/launchd/src/Makefile.am 2007-07-02 16:29:12 UTC (rev 23288)
@@ -40,7 +40,7 @@
sysconf_DATA = hostconfig rc.common rc.netboot
launchctl_CFLAGS = $(AM_CFLAGS) -I/System/Library/Frameworks/System.framework/PrivateHeaders
-launchctl_LDFLAGS = -framework CoreFoundation -framework IOKit -weak_library /usr/lib/libedit.dylib
+launchctl_LDFLAGS = -framework CoreFoundation -framework IOKit -framework Security -weak_library /usr/lib/libedit.dylib
SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS)
SystemStarter_LDFLAGS = -framework CoreFoundation -framework IOKit
Modified: trunk/launchd/src/Makefile.in
===================================================================
--- trunk/launchd/src/Makefile.in 2007-06-29 20:24:46 UTC (rev 23287)
+++ trunk/launchd/src/Makefile.in 2007-07-02 16:29:12 UTC (rev 23288)
@@ -246,7 +246,7 @@
@LIBS_ONLY_TRUE at liblaunch_profile_a_SOURCES = liblaunch.c libvproc.c libbootstrap.c protocol_vprocUser.c __version.c
@LIBS_ONLY_FALSE at sysconf_DATA = hostconfig rc.common rc.netboot
@LIBS_ONLY_FALSE at launchctl_CFLAGS = $(AM_CFLAGS) -I/System/Library/Frameworks/System.framework/PrivateHeaders
- at LIBS_ONLY_FALSE@launchctl_LDFLAGS = -framework CoreFoundation -framework IOKit -weak_library /usr/lib/libedit.dylib
+ at LIBS_ONLY_FALSE@launchctl_LDFLAGS = -framework CoreFoundation -framework IOKit -framework Security -weak_library /usr/lib/libedit.dylib
@LIBS_ONLY_FALSE at SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS)
@LIBS_ONLY_FALSE at SystemStarter_LDFLAGS = -framework CoreFoundation -framework IOKit
@LIBS_ONLY_FALSE at SystemStarter_SOURCES = StartupItems.c IPC.c SystemStarter.c
Modified: trunk/launchd/src/launchctl.c
===================================================================
--- trunk/launchd/src/launchctl.c 2007-06-29 20:24:46 UTC (rev 23287)
+++ trunk/launchd/src/launchctl.c 2007-07-02 16:29:12 UTC (rev 23288)
@@ -22,6 +22,8 @@
#include <CoreFoundation/CoreFoundation.h>
#include <CoreFoundation/CFPriv.h>
+#include <Security/Security.h>
+#include <Security/AuthSession.h>
#include <IOKit/IOKitLib.h>
#include <NSSystemDirectories.h>
#include <mach/mach.h>
@@ -1553,6 +1555,10 @@
the_argc += 1;
}
+ if (strcasecmp(session_type, "Background") == 0) {
+ assumes(SessionCreate(sessionKeepCurrentBootstrap, 0) == 0);
+ }
+
assumes(load_and_unload_cmd(the_argc, load_launchd_items) == 0);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070702/fa584ec7/attachment.html
More information about the launchd-changes
mailing list