Skip to content

Commit

Permalink
Merge pull request apache#583 from jboss-fuse/sync-with-7.11
Browse files Browse the repository at this point in the history
Sync with 7.11
  • Loading branch information
grgrzybek committed Jan 24, 2023
2 parents 9e3c660 + 9ec4007 commit 7af981b
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ run() {
nodebug=false
while [ "${1}" != "" ]; do
case "${1}" in
'clean')
rm -rf "${KARAF_DATA:?}"
shift
;;
'debug')
debug=true
shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ if not "%KARAF_TITLE%" == "" (
title Karaf
)

rem Check/Set up some easily accessible MIN/MAX params for JVM mem usage
if "%JAVA_MIN_MEM%" == "" (
set JAVA_MIN_MEM=128M
)
if "%JAVA_MAX_MEM%" == "" (
set JAVA_MAX_MEM=512M
)

goto BEGIN

:warn
Expand Down Expand Up @@ -266,7 +274,15 @@ if not exist "%JAVA_HOME%\bin\server\jvm.dll" (
echo For more details see http://java.sun.com/products/hotspot/whitepaper.html#client
)
)
set DEFAULT_JAVA_OPTS=-XX:+UnlockDiagnosticVMOptions
set DEFAULT_JAVA_OPTS=-Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM% -Dcom.sun.management.jmxremote -XX:+UnlockDiagnosticVMOptions

rem Check some easily accessible MIN/MAX params for JVM mem usage
if not "%JAVA_PERM_MEM%" == "" (
set DEFAULT_JAVA_OPTS=%DEFAULT_JAVA_OPTS% -XX:PermSize=%JAVA_PERM_MEM%
)
if not "%JAVA_MAX_PERM_MEM%" == "" (
set DEFAULT_JAVA_OPTS=%DEFAULT_JAVA_OPTS% -XX:MaxPermSize=%JAVA_MAX_PERM_MEM%
)

set JAVA_OPTS=%DEFAULT_JAVA_OPTS% %JAVA_OPTS%

Expand Down Expand Up @@ -342,6 +358,7 @@ if "%KARAF_PROFILER%" == "" goto :RUN
if "%1" == "run" goto :EXECUTE_RUN
if "%1" == "daemon" goto :EXECUTE_DAEMON
if "%1" == "client" goto :EXECUTE_CLIENT
if "%1" == "clean" goto :EXECUTE_CLEAN
if "%1" == "debug" goto :EXECUTE_DEBUG
if "%1" == "debugs" goto :EXECUTE_DEBUGS
goto :EXECUTE
Expand Down Expand Up @@ -389,6 +406,11 @@ if "%KARAF_PROFILER%" == "" goto :RUN
shift
goto :RUN_LOOP

:EXECUTE_CLEAN
pushd "%KARAF_DATA%" && (rmdir /S /Q "%KARAF_DATA%" 2>nul & popd)
shift
goto :RUN_LOOP

:EXECUTE_DEBUG
if "%JAVA_DEBUG_OPTS%" == "" set JAVA_DEBUG_OPTS=%DEFAULT_JAVA_DEBUG_OPTS%
set JAVA_OPTS=%JAVA_DEBUG_OPTS% %JAVA_OPTS%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ jre-9= \
java.lang.module, \
java.net.spi, \
javax.accessibility, \
javax.activation;version="1.2", \
javax.activity, \
javax.annotation;version="1.0", \
javax.annotation;version="1.3", \
Expand Down Expand Up @@ -743,7 +744,7 @@ jre-9= \
com.sun.security.sasl, \
com.sun.security.sasl.digest, \
com.sun.security.sasl.ntlm, \
com.sun.security.sasl.util
com.sun.security.sasl.util

jre-10 = ${jre-9}
jre-11 = ${jre-10}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ com.atomikos.icatch.log_base_dir=${karaf.data}/atomikos
<bundle>mvn:javax.persistence/javax.persistence-api/${javax.persistence.version}</bundle>
<bundle>mvn:org.javassist/javassist/${javassist.version}</bundle>
<bundle>mvn:net.bytebuddy/byte-buddy/${bytebuddy.version}</bundle>
<bundle>mvn:org.jboss.spec.javax.transaction/jboss-transaction-api_1.2_spec/1.1.1.Final</bundle>
<bundle>mvn:org.jboss/jandex/${jandex.version}</bundle>
<bundle>mvn:com.fasterxml/classmate/${classmate.version}</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/${dom4j.bundle.version}</bundle>
Expand Down
2 changes: 1 addition & 1 deletion assemblies/features/spring/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

<feature name="spring-web" description="Spring 5.3.x Web support" version="${spring53.version}">
<feature version="[${spring53.version},5.4)">spring</feature>
<bundle dependency="true">mvn:javax.servlet/javax.servlet-api/3.1.0</bundle>
<feature>http</feature>
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/${spring53.version}</bundle>
<bundle start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/${spring53.version}</bundle>
</feature>
Expand Down
18 changes: 12 additions & 6 deletions assemblies/features/standard/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ update = admin, manager
#
# This configuration file defines the ACLs for commands in the shell subshell
#
nano = admin, manager, viewer
exec = admin, manager, viewer
new = admin, manager, viewer
nano = admin
exec = admin
new = admin
info = admin, manager, viewer
java = admin, manager, viewer
java = admin
date = admin, manager, viewer
if = ssh,admin,manager,viewer
complete = ssh,admin,manager,viewer
Expand Down Expand Up @@ -374,9 +374,9 @@ disableEofExit = false

#
# Override allowed SSH HMAC algorithms.
# Default: hmac-sha2-512,hmac-sha2-256
# Default: hmac-sha2-512,hmac-sha2-256,hmac-sha1
#
# macs = hmac-sha2-512,hmac-sha2-256
# macs = hmac-sha2-512,hmac-sha2-256,hmac-sha1

#
# Override allowed SSH key exchange algorithms.
Expand Down Expand Up @@ -715,6 +715,7 @@ tree-show = admin, manager, viewer
</feature>

<feature name="config" description="Provide OSGi ConfigAdmin support" version="${project.version}">
<bundle start-level="30">mvn:org.apache.karaf.config/org.apache.karaf.config.core/${project.version}</bundle>
<conditional>
<condition>management</condition>
<config name="jmx.acl.org.apache.karaf.config">
Expand Down Expand Up @@ -1018,6 +1019,10 @@ encryption.encoding = ${env:ORG_APACHE_KARAF_JAAS_ENCRYPTION_ENCODING:-hexadecim
<feature>jaas-boot</feature>
<bundle start-level="30">mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.config/${project.version}</bundle>
<bundle start-level="30">mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.modules/${project.version}</bundle>
<conditional>
<condition>aries-blueprint</condition>
<bundle start-level="30">mvn:org.apache.karaf.jaas.blueprint/org.apache.karaf.jaas.blueprint.config/${project.version}</bundle>
</conditional>
<conditional>
<condition>shell</condition>
<config name="org.apache.karaf.command.acl.jaas">
Expand Down Expand Up @@ -2602,6 +2607,7 @@ jul.layout.type = simple

<feature name="standard" description="Wrap feature describing all features part of a standard distribution" version="${project.version}">
<feature>pax-url-wrap</feature>
<feature>aries-blueprint</feature>
<feature>shell</feature>
<feature>shell-compat</feature>
<feature>feature</feature>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public class ShellCommandSecurityTest extends SshCommandTestBase {
@Test
public void testShellCommandSecurityViaSsh() throws Exception {
String version = System.getProperty("java.specification.version");
if (!version.contains(".") && Integer.parseInt(version) >= 17) {
return;
}
String vieweruser = "view" + System.nanoTime() + "_" + counter++;

addViewer(vieweruser);
Expand Down

0 comments on commit 7af981b

Please sign in to comment.