7193201: [OS X] The development launcher should be signed and given task_for_pid privileges
Reviewed-by: sspitsyn, nloodin, mgronlun, coleenp
This commit is contained in:
parent
c188598ddd
commit
e91b6584eb
@ -41,6 +41,8 @@ LAUNCHERFLAGS := $(ARCHFLAG) \
|
||||
-DLAUNCHER_TYPE=\"gamma\" \
|
||||
-DLINK_INTO_$(LINK_INTO) \
|
||||
$(TARGET_DEFINES)
|
||||
# Give the launcher task_for_pid() privileges so that it can be used to run JStack, JInfo, et al.
|
||||
LFLAGS_LAUNCHER += -sectcreate __TEXT __info_plist $(GAMMADIR)/src/os/bsd/launcher/Info-privileged.plist
|
||||
|
||||
ifeq ($(LINK_INTO),AOUT)
|
||||
LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
|
||||
@ -101,6 +103,9 @@ $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
|
||||
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
|
||||
$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
|
||||
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
|
||||
# Sign the launcher with the development certificate (if present) so that it can be used
|
||||
# to run JStack, JInfo, et al.
|
||||
$(QUIETLY) -codesign -s openjdk_codesign $@
|
||||
|
||||
$(LAUNCHER): $(LAUNCHER_SCRIPT)
|
||||
|
||||
|
18
hotspot/src/os/bsd/launcher/Info-privileged.plist
Normal file
18
hotspot/src/os/bsd/launcher/Info-privileged.plist
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>net.java.openjdk.cmd</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>OpenJDK Command</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>SecTaskAccess</key>
|
||||
<string>allowed</string>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue
Block a user