Skip to content

Commit

Permalink
Fix access denied error during log rotation (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 authored Apr 26, 2024
1 parent f890be1 commit 46b1e8f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packaging_scripts/assemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ function enable_performance_analyzer() {
cp "distribution/packages/src/common/wazuh-indexer-performance-analyzer.service" "${TMP_DIR}"/usr/lib/systemd/system
}

# ====
# Fix https://github.com/wazuh/wazuh-indexer/issues/205
# ====
function fix_log_rotation() {
{
echo 'grant {'
echo ' permission java.lang.RuntimePermission "accessUserInformation";'
echo '};'
} >> "${1}/opensearch-performance-analyzer/opensearch_security.policy"
}

# ====
# Move performance-analyzer-rca to its final location
# ====
Expand Down Expand Up @@ -245,6 +256,7 @@ function assemble_tar() {

# Install plugins
install_plugins
fix_log_rotation ${PATH_CONF}
# Swap configuration files
add_configuration_files
remove_unneeded_files
Expand Down Expand Up @@ -284,6 +296,7 @@ function assemble_rpm() {

# Install plugins
install_plugins
fix_log_rotation ${PATH_CONF}
enable_performance_analyzer_rca ${src_path}
# Swap configuration files
add_configuration_files
Expand Down Expand Up @@ -337,6 +350,7 @@ function assemble_deb() {

# Install plugins
install_plugins
fix_log_rotation ${PATH_CONF}
enable_performance_analyzer_rca ${src_path}
# Swap configuration files
add_configuration_files
Expand Down

0 comments on commit 46b1e8f

Please sign in to comment.