]> TLD Linux GIT Repositories - packages/zabbix.git/blob - tld.patch
- updated to 5.4.3
[packages/zabbix.git] / tld.patch
1 diff -ur zabbix-5.4.3.orig/conf/zabbix_agentd.conf zabbix-5.4.3/conf/zabbix_agentd.conf
2 --- zabbix-5.4.3.orig/conf/zabbix_agentd.conf   2021-07-19 16:04:10.000000000 +0200
3 +++ zabbix-5.4.3/conf/zabbix_agentd.conf        2021-07-26 15:14:02.107383385 +0200
4 @@ -8,7 +8,7 @@
5  #
6  # Mandatory: no
7  # Default:
8 -# PidFile=/tmp/zabbix_agentd.pid
9 +# PidFile=/var/run/zabbix/zabbix_agentd.pid
10  
11  ### Option: LogType
12  #      Specifies where log messages are written to:
13 @@ -27,7 +27,7 @@
14  # Default:
15  # LogFile=
16  
17 -LogFile=/tmp/zabbix_agentd.log
18 +LogFile=/var/log/zabbix/zabbix_agentd.log
19  
20  ### Option: LogFileSize
21  #      Maximum size of log file in MB.
22 @@ -296,15 +296,12 @@
23  
24  ### Option: Include
25  #      You may include individual files or all files in a directory in the configuration file.
26 -#      Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
27  #
28  # Mandatory: no
29  # Default:
30  # Include=
31  
32 -# Include=/usr/local/etc/zabbix_agentd.userparams.conf
33 -# Include=/usr/local/etc/zabbix_agentd.conf.d/
34 -# Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf
35 +Include=/etc/zabbix/zabbix_agentd.conf.d/*.conf
36  
37  ####### USER-DEFINED MONITORED PARAMETERS #######
38  
39 diff -ur zabbix-5.4.3.orig/conf/zabbix_proxy.conf zabbix-5.4.3/conf/zabbix_proxy.conf
40 --- zabbix-5.4.3.orig/conf/zabbix_proxy.conf    2021-07-19 16:04:10.000000000 +0200
41 +++ zabbix-5.4.3/conf/zabbix_proxy.conf 2021-07-26 15:14:02.107383385 +0200
42 @@ -88,7 +88,7 @@
43  # Default:
44  # LogFile=
45  
46 -LogFile=/tmp/zabbix_proxy.log
47 +LogFile=/var/log/zabbix/zabbix_proxy.log
48  
49  ### Option: LogFileSize
50  #      Maximum size of log file in MB.
51 @@ -136,7 +136,7 @@
52  #
53  # Mandatory: no
54  # Default:
55 -# PidFile=/tmp/zabbix_proxy.pid
56 +# PidFile=/var/run/zabbix/zabbix_proxy.pid
57  
58  ### Option: SocketDir
59  #      IPC socket directory.
60 @@ -595,15 +595,12 @@
61  
62  ### Option: Include
63  #      You may include individual files or all files in a directory in the configuration file.
64 -#      Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
65  #
66  # Mandatory: no
67  # Default:
68  # Include=
69  
70 -# Include=/usr/local/etc/zabbix_proxy.general.conf
71 -# Include=/usr/local/etc/zabbix_proxy.conf.d/
72 -# Include=/usr/local/etc/zabbix_proxy.conf.d/*.conf
73 +Include=/etc/zabbix/zabbix_proxy.conf.d/*.conf
74  
75  ### Option: SSLCertLocation
76  #      Location of SSL client certificates.
77 diff -ur zabbix-5.4.3.orig/conf/zabbix_server.conf zabbix-5.4.3/conf/zabbix_server.conf
78 --- zabbix-5.4.3.orig/conf/zabbix_server.conf   2021-07-19 16:04:10.000000000 +0200
79 +++ zabbix-5.4.3/conf/zabbix_server.conf        2021-07-26 15:14:02.108383385 +0200
80 @@ -35,7 +35,7 @@
81  # Default:
82  # LogFile=
83  
84 -LogFile=/tmp/zabbix_server.log
85 +LogFile=/var/log/zabbix/zabbix_server.log
86  
87  ### Option: LogFileSize
88  #      Maximum size of log file in MB.
89 @@ -65,7 +65,7 @@
90  #
91  # Mandatory: no
92  # Default:
93 -# PidFile=/tmp/zabbix_server.pid
94 +# PidFile=/var/run/zabbix/zabbix_server.pid
95  
96  ### Option: SocketDir
97  #      IPC socket directory.
98 @@ -645,15 +645,12 @@
99  
100  ### Option: Include
101  #      You may include individual files or all files in a directory in the configuration file.
102 -#      Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
103  #
104  # Mandatory: no
105  # Default:
106  # Include=
107  
108 -# Include=/usr/local/etc/zabbix_server.general.conf
109 -# Include=/usr/local/etc/zabbix_server.conf.d/
110 -# Include=/usr/local/etc/zabbix_server.conf.d/*.conf
111 +Include=/etc/zabbix/zabbix_server.conf.d/*.conf
112  
113  ### Option: SSLCertLocation
114  #      Location of SSL client certificates.
115 diff -ur zabbix-5.4.3.orig/src/zabbix_agent/zabbix_agentd.c zabbix-5.4.3/src/zabbix_agent/zabbix_agentd.c
116 --- zabbix-5.4.3.orig/src/zabbix_agent/zabbix_agentd.c  2021-07-19 16:04:10.000000000 +0200
117 +++ zabbix-5.4.3/src/zabbix_agent/zabbix_agentd.c       2021-07-26 15:14:02.108383385 +0200
118 @@ -605,7 +605,7 @@
119                 CONFIG_LOAD_MODULE_PATH = zbx_strdup(CONFIG_LOAD_MODULE_PATH, DEFAULT_LOAD_MODULE_PATH);
120  
121         if (NULL == CONFIG_PID_FILE)
122 -               CONFIG_PID_FILE = (char *)"/tmp/zabbix_agentd.pid";
123 +               CONFIG_PID_FILE = (char *)"/var/run/zabbix/zabbix_agentd.pid";
124  #endif
125         if (NULL == CONFIG_LOG_TYPE_STR)
126                 CONFIG_LOG_TYPE_STR = zbx_strdup(CONFIG_LOG_TYPE_STR, ZBX_OPTION_LOGTYPE_FILE);
127 diff -ur zabbix-5.4.3.orig/src/zabbix_java/lib/logback.xml zabbix-5.4.3/src/zabbix_java/lib/logback.xml
128 --- zabbix-5.4.3.orig/src/zabbix_java/lib/logback.xml   2021-03-29 10:33:08.000000000 +0200
129 +++ zabbix-5.4.3/src/zabbix_java/lib/logback.xml        2021-07-26 15:14:02.108383385 +0200
130 @@ -2,10 +2,10 @@
131  
132         <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
133  
134 -               <file>/tmp/zabbix_java.log</file>
135 +               <file>/var/log/zabbix/zabbix_java.log</file>
136  
137                 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
138 -                       <fileNamePattern>/tmp/zabbix_java.log.%i</fileNamePattern>
139 +                       <fileNamePattern>/var/log/zabbix/zabbix_java.log.%i</fileNamePattern>
140                         <minIndex>1</minIndex>
141                         <maxIndex>3</maxIndex>
142                 </rollingPolicy>
143 diff -ur zabbix-5.4.3.orig/src/zabbix_java/settings.sh zabbix-5.4.3/src/zabbix_java/settings.sh
144 --- zabbix-5.4.3.orig/src/zabbix_java/settings.sh       2021-03-29 10:33:08.000000000 +0200
145 +++ zabbix-5.4.3/src/zabbix_java/settings.sh    2021-07-26 15:14:02.109383385 +0200
146 @@ -24,7 +24,7 @@
147  # Default:
148  # PID_FILE=
149  
150 -PID_FILE="/tmp/zabbix_java.pid"
151 +PID_FILE="/var/run/zabbix/zabbix_java.pid"
152  
153  ### Option: zabbix.startPollers
154  #      Number of worker threads to start.
155 diff -ur zabbix-5.4.3.orig/src/zabbix_proxy/proxy.c zabbix-5.4.3/src/zabbix_proxy/proxy.c
156 --- zabbix-5.4.3.orig/src/zabbix_proxy/proxy.c  2021-07-19 16:04:10.000000000 +0200
157 +++ zabbix-5.4.3/src/zabbix_proxy/proxy.c       2021-07-26 15:14:02.109383385 +0200
158 @@ -495,7 +495,7 @@
159                 CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
160  
161         if (NULL == CONFIG_PID_FILE)
162 -               CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_proxy.pid");
163 +               CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_proxy.pid");
164  
165         if (NULL == CONFIG_TMPDIR)
166                 CONFIG_TMPDIR = zbx_strdup(CONFIG_TMPDIR, "/tmp");
167 diff -ur zabbix-5.4.3.orig/src/zabbix_server/server.c zabbix-5.4.3/src/zabbix_server/server.c
168 --- zabbix-5.4.3.orig/src/zabbix_server/server.c        2021-07-19 16:04:11.000000000 +0200
169 +++ zabbix-5.4.3/src/zabbix_server/server.c     2021-07-26 15:14:02.110383385 +0200
170 @@ -520,7 +520,7 @@
171                 CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
172  
173         if (NULL == CONFIG_PID_FILE)
174 -               CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_server.pid");
175 +               CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_server.pid");
176  
177         if (NULL == CONFIG_ALERT_SCRIPTS_PATH)
178                 CONFIG_ALERT_SCRIPTS_PATH = zbx_strdup(CONFIG_ALERT_SCRIPTS_PATH, DEFAULT_ALERT_SCRIPTS_PATH);
179 diff -ur zabbix-5.4.3.orig/ui/include/classes/core/CConfigFile.php zabbix-5.4.3/ui/include/classes/core/CConfigFile.php
180 --- zabbix-5.4.3.orig/ui/include/classes/core/CConfigFile.php   2021-07-19 16:04:11.000000000 +0200
181 +++ zabbix-5.4.3/ui/include/classes/core/CConfigFile.php        2021-07-26 15:14:02.110383385 +0200
182 @@ -25,7 +25,7 @@
183         const CONFIG_ERROR = 2;
184         const CONFIG_VAULT_ERROR = 3;
185  
186 -       const CONFIG_FILE_PATH = '/conf/zabbix.conf.php';
187 +       const CONFIG_FILE_PATH = '/etc/zabbix/web/zabbix.conf.php';
188  
189         private static $supported_db_types = [
190                 ZBX_DB_MYSQL => true,
191 diff -ur zabbix-5.4.3.orig/ui/include/classes/core/ZBase.php zabbix-5.4.3/ui/include/classes/core/ZBase.php
192 --- zabbix-5.4.3.orig/ui/include/classes/core/ZBase.php 2021-07-19 16:04:11.000000000 +0200
193 +++ zabbix-5.4.3/ui/include/classes/core/ZBase.php      2021-07-26 15:14:02.110383385 +0200
194 @@ -373,7 +373,7 @@
195          * @throws Exception
196          */
197         protected function setMaintenanceMode() {
198 -               require_once 'conf/maintenance.inc.php';
199 +               require_once '/etc/zabbix/web/maintenance.inc.php';
200  
201                 if (defined('ZBX_DENY_GUI_ACCESS')) {
202                         if (!isset($ZBX_GUI_ACCESS_IP_RANGE) || !in_array(CWebUser::getIp(), $ZBX_GUI_ACCESS_IP_RANGE)) {
203 @@ -386,7 +386,7 @@
204          * Load zabbix config file.
205          */
206         protected function loadConfigFile() {
207 -               $configFile = $this->getRootDir().CConfigFile::CONFIG_FILE_PATH;
208 +               $configFile = CConfigFile::CONFIG_FILE_PATH;
209                 $config = new CConfigFile($configFile);
210                 $this->config = $config->load();
211         }
212 diff -ur zabbix-5.4.3.orig/ui/include/classes/setup/CSetupWizard.php zabbix-5.4.3/ui/include/classes/setup/CSetupWizard.php
213 --- zabbix-5.4.3.orig/ui/include/classes/setup/CSetupWizard.php 2021-07-19 16:04:11.000000000 +0200
214 +++ zabbix-5.4.3/ui/include/classes/setup/CSetupWizard.php      2021-07-26 15:14:02.111383385 +0200
215 @@ -618,7 +618,7 @@
216  
217                 $this->setConfig('ZBX_CONFIG_FILE_CORRECT', true);
218  
219 -               $config_file_name = APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH;
220 +               $config_file_name = CConfigFile::CONFIG_FILE_PATH;
221                 $config = new CConfigFile($config_file_name);
222                 $config->config = [
223                         'DB' => [
224 @@ -970,7 +970,7 @@
225                                 // make zabbix.conf.php downloadable
226                                 header('Content-Type: application/x-httpd-php');
227                                 header('Content-Disposition: attachment; filename="'.basename(CConfigFile::CONFIG_FILE_PATH).'"');
228 -                               $config = new CConfigFile(APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH);
229 +                               $config = new CConfigFile(CConfigFile::CONFIG_FILE_PATH);
230                                 $config->config = [
231                                         'DB' => [
232                                                 'TYPE' => $this->getConfig('DB_TYPE'),