]> TLD Linux GIT Repositories - packages/zabbix.git/blob - tld.patch
- drop config path enforcement in PHP
[packages/zabbix.git] / tld.patch
1 diff -ur zabbix-5.0.7.orig/conf/zabbix_agentd.conf zabbix-5.0.7/conf/zabbix_agentd.conf
2 --- zabbix-5.0.7.orig/conf/zabbix_agentd.conf   2020-12-21 10:38:31.000000000 +0100
3 +++ zabbix-5.0.7/conf/zabbix_agentd.conf        2021-01-03 22:16:31.046106105 +0100
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.0.7.orig/conf/zabbix_proxy.conf zabbix-5.0.7/conf/zabbix_proxy.conf
40 --- zabbix-5.0.7.orig/conf/zabbix_proxy.conf    2020-12-21 10:38:31.000000000 +0100
41 +++ zabbix-5.0.7/conf/zabbix_proxy.conf 2021-01-03 22:17:05.509106105 +0100
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 @@ -578,15 +578,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.0.7.orig/conf/zabbix_server.conf zabbix-5.0.7/conf/zabbix_server.conf
78 --- zabbix-5.0.7.orig/conf/zabbix_server.conf   2020-12-21 10:38:31.000000000 +0100
79 +++ zabbix-5.0.7/conf/zabbix_server.conf        2021-01-03 22:17:13.072106105 +0100
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 @@ -612,15 +612,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.0.7.orig/src/zabbix_agent/zabbix_agentd.c zabbix-5.0.7/src/zabbix_agent/zabbix_agentd.c
116 --- zabbix-5.0.7.orig/src/zabbix_agent/zabbix_agentd.c  2020-12-21 10:38:31.000000000 +0100
117 +++ zabbix-5.0.7/src/zabbix_agent/zabbix_agentd.c       2021-01-03 22:04:59.483106105 +0100
118 @@ -598,7 +598,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.0.7.orig/src/zabbix_java/lib/logback.xml zabbix-5.0.7/src/zabbix_java/lib/logback.xml
128 --- zabbix-5.0.7.orig/src/zabbix_java/lib/logback.xml   2020-12-14 11:27:17.000000000 +0100
129 +++ zabbix-5.0.7/src/zabbix_java/lib/logback.xml        2021-01-03 22:03:05.902106105 +0100
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.0.7.orig/src/zabbix_java/settings.sh zabbix-5.0.7/src/zabbix_java/settings.sh
144 --- zabbix-5.0.7.orig/src/zabbix_java/settings.sh       2020-12-14 11:27:17.000000000 +0100
145 +++ zabbix-5.0.7/src/zabbix_java/settings.sh    2021-01-03 22:03:05.902106105 +0100
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.0.7.orig/src/zabbix_proxy/proxy.c zabbix-5.0.7/src/zabbix_proxy/proxy.c
156 --- zabbix-5.0.7.orig/src/zabbix_proxy/proxy.c  2020-12-21 10:38:31.000000000 +0100
157 +++ zabbix-5.0.7/src/zabbix_proxy/proxy.c       2021-01-03 22:08:43.899106105 +0100
158 @@ -474,7 +474,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.0.7.orig/src/zabbix_server/server.c zabbix-5.0.7/src/zabbix_server/server.c
168 --- zabbix-5.0.7.orig/src/zabbix_server/server.c        2020-12-21 10:38:31.000000000 +0100
169 +++ zabbix-5.0.7/src/zabbix_server/server.c     2021-01-03 22:08:56.453106105 +0100
170 @@ -482,7 +482,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);