undefect. CWE-407 — 63 sites patched across 27 ecosystems
Authors: russell@unturf.com · brackishbert@gmail.com · foxhop.net · TimeHexOn.com Patches, unit tests, benchmarks, whitepaper, and outreach briefs. Public domain — no copyright claimed. Use freely.
This commit is contained in:
commit
0a580b313d
70422 changed files with 17213626 additions and 0 deletions
44
make/modules/jdk.jpackage/Gensrc.gmk
Normal file
44
make/modules/jdk.jpackage/Gensrc.gmk
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
|
||||
include GensrcCommon.gmk
|
||||
|
||||
################################################################################
|
||||
# Copy the entitlements file for the java launcher to jpackage as a resource.
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
ENTITLEMENTS_SRC_FILE := $(TOPDIR)/make/data/macosxsigning/java.plist
|
||||
ENTITLEMENTS_TARGET_FILE := \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/jdk/jpackage/internal/resources/entitlements.plist
|
||||
|
||||
$(ENTITLEMENTS_TARGET_FILE): $(ENTITLEMENTS_SRC_FILE)
|
||||
$(call install-file)
|
||||
|
||||
TARGETS += $(ENTITLEMENTS_TARGET_FILE)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
36
make/modules/jdk.jpackage/Java.gmk
Normal file
36
make/modules/jdk.jpackage/Java.gmk
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#
|
||||
# Copyright (c) 2020, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
|
||||
DISABLED_WARNINGS_java += dangling-doc-comments
|
||||
|
||||
COPY += .gif .png .txt .spec .script .prerm .preinst \
|
||||
.postrm .postinst .list .sh .desktop .copyright .control .plist .template \
|
||||
.icns .scpt .wxs .wxl .wxi .wxf .ico .bmp .tiff .service .xsl .js
|
||||
|
||||
CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
30
make/modules/jdk.jpackage/Jmod.gmk
Normal file
30
make/modules/jdk.jpackage/Jmod.gmk
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
|
||||
JMOD_FLAGS_main_class := --main-class jdk.jpackage.main.Main
|
||||
|
||||
################################################################################
|
||||
38
make/modules/jdk.jpackage/Launcher.gmk
Normal file
38
make/modules/jdk.jpackage/Launcher.gmk
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
|
||||
include LauncherCommon.gmk
|
||||
|
||||
################################################################################
|
||||
## Build jpackage
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jpackage, \
|
||||
MAIN_CLASS := jdk.jpackage.main.Main, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
190
make/modules/jdk.jpackage/Lib.gmk
Normal file
190
make/modules/jdk.jpackage/Lib.gmk
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
#
|
||||
# Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
|
||||
include LibCommon.gmk
|
||||
|
||||
JPACKAGE_OUTPUT_DIR := \
|
||||
$(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources
|
||||
|
||||
JPACKAGE_CFLAGS_windows := -DUNICODE -D_UNICODE
|
||||
JPACKAGE_CXXFLAGS_windows := -EHsc $(JPACKAGE_CFLAGS_windows)
|
||||
|
||||
################################################################################
|
||||
## Build jpackageapplauncher
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
JPACKAGEAPPLAUNCHER_LINK_TYPE := C
|
||||
JPACKAGEAPPLAUNCHER_INCLUDE_FILES := %.c
|
||||
else
|
||||
JPACKAGEAPPLAUNCHER_LINK_TYPE := C++
|
||||
endif
|
||||
|
||||
# Output app launcher executable in resources dir, and symbols in the object dir
|
||||
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGEAPPLAUNCHER, \
|
||||
NAME := jpackageapplauncher, \
|
||||
LINK_TYPE := $(JPACKAGEAPPLAUNCHER_LINK_TYPE), \
|
||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \
|
||||
ONLY_EXPORTED := true, \
|
||||
SRC := applauncher, \
|
||||
EXTRA_SRC := common, \
|
||||
INCLUDE_FILES := $(JPACKAGEAPPLAUNCHER_INCLUDE_FILES), \
|
||||
OPTIMIZATION := SIZE, \
|
||||
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_LinuxPackage.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_Log.cpp := unused-const-variable, \
|
||||
CFLAGS_FILTER_OUT := -MD, \
|
||||
CXXFLAGS_FILTER_OUT := -MD, \
|
||||
CFLAGS_windows := -MT $(JPACKAGE_CFLAGS_windows), \
|
||||
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
|
||||
LD_SET_ORIGIN := false, \
|
||||
LDFLAGS_macosx := -rpath @executable_path/../Frameworks/ \
|
||||
-rpath @executable_path/../PlugIns/, \
|
||||
LIBS_macosx := -framework Cocoa, \
|
||||
LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
|
||||
LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
|
||||
MANIFEST := $(JAVA_MANIFEST), \
|
||||
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS) \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_JPACKAGEAPPLAUNCHER)
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
##############################################################################
|
||||
## Build libjpackageapplauncheraux
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBJPACKAGEAPPLAUNCHERAUX, \
|
||||
NAME := jpackageapplauncheraux, \
|
||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||
SYMBOLS_DIR := \
|
||||
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjpackageapplauncheraux, \
|
||||
ONLY_EXPORTED := true, \
|
||||
SRC := libapplauncher, \
|
||||
EXTRA_SRC := \
|
||||
applauncher \
|
||||
common, \
|
||||
EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \
|
||||
LINK_TYPE := C++, \
|
||||
OPTIMIZATION := SIZE, \
|
||||
DISABLED_WARNINGS_gcc_Log.cpp := unused-const-variable, \
|
||||
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
|
||||
LD_SET_ORIGIN := false, \
|
||||
LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJPACKAGEAPPLAUNCHERAUX)
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
##############################################################################
|
||||
## Build libjpackage
|
||||
##############################################################################
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBJPACKAGE, \
|
||||
NAME := jpackage, \
|
||||
OPTIMIZATION := LOW, \
|
||||
EXTRA_SRC := common, \
|
||||
CXXFLAGS_windows := $(JPACKAGE_CXXFLAGS_windows), \
|
||||
LDFLAGS := $(LDFLAGS_CXX_JDK), \
|
||||
LIBS_windows := advapi32.lib msi.lib ole32.lib shell32.lib shlwapi.lib \
|
||||
user32.lib, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJPACKAGE)
|
||||
|
||||
##############################################################################
|
||||
## Build libmsica
|
||||
##############################################################################
|
||||
|
||||
# Build MSI custom action library
|
||||
# Output library in resources dir, and symbols in the object dir
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBMSICA, \
|
||||
NAME := msica, \
|
||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmsica, \
|
||||
ONLY_EXPORTED := true, \
|
||||
OPTIMIZATION := LOW, \
|
||||
EXTRA_SRC := common, \
|
||||
CXXFLAGS_FILTER_OUT := -MD, \
|
||||
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
|
||||
LDFLAGS := $(LDFLAGS_CXX_JDK), \
|
||||
LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBMSICA)
|
||||
|
||||
##############################################################################
|
||||
## Build msiwrapper
|
||||
##############################################################################
|
||||
|
||||
# Build exe installer wrapper for msi installer
|
||||
$(eval $(call SetupJdkExecutable, BUILD_MSIWRAPPER, \
|
||||
NAME := msiwrapper, \
|
||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/msiwrapper, \
|
||||
ONLY_EXPORTED := true, \
|
||||
EXTRA_SRC := common, \
|
||||
CXXFLAGS_FILTER_OUT := -MD, \
|
||||
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
|
||||
LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_MSIWRAPPER)
|
||||
|
||||
##############################################################################
|
||||
## Build jpackageapplauncherw
|
||||
##############################################################################
|
||||
|
||||
# Build non-console version of launcher
|
||||
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGEAPPLAUNCHERW, \
|
||||
NAME := jpackageapplauncherw, \
|
||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||
SYMBOLS_DIR := \
|
||||
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
|
||||
ONLY_EXPORTED := true, \
|
||||
SRC := applauncher, \
|
||||
EXTRA_SRC := common, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS_FILTER_OUT := -MD, \
|
||||
CXXFLAGS_FILTER_OUT := -MD, \
|
||||
CFLAGS := -DJP_LAUNCHERW, \
|
||||
CXXFLAGS := -DJP_LAUNCHERW, \
|
||||
CFLAGS_windows := -MT $(JPACKAGE_CFLAGS_windows), \
|
||||
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
|
||||
LD_SET_ORIGIN := false, \
|
||||
LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
|
||||
MANIFEST := $(JAVA_MANIFEST), \
|
||||
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS) \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_JPACKAGEAPPLAUNCHERW)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
Loading…
Add table
Add a link
Reference in a new issue