From 20f6f7a43b2943768ffdd709a5882896547c861b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 4 Dec 2020 13:00:19 +0100 Subject: [PATCH] can only change config as root, avoid warnings in install-log --- doc/rpm-build/post_install.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/rpm-build/post_install.php b/doc/rpm-build/post_install.php index 1eb9c6afb4..f8c873cf1c 100755 --- a/doc/rpm-build/post_install.php +++ b/doc/rpm-build/post_install.php @@ -805,6 +805,9 @@ function _ucr_secret($name) */ function check_fix_php_apc_ini() { + // can only change config as root + if (function_exists('posix_getuid') && posix_geteuid()) return; + if (extension_loaded('apc') || extension_loaded('apcu')) { $shm_size = ini_get('apc.shm_size'); @@ -853,6 +856,9 @@ function check_fix_open_basedir_certs() { global $config; + // can only change config as root + if (function_exists('posix_getuid') && posix_geteuid()) return; + if (extension_loaded('openssl') && function_exists('openssl_get_cert_locations') && ($locations = openssl_get_cert_locations()) && file_exists($default_cert_dir = $locations['default_cert_dir']))