Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-admin/rsyslog/files/8-stable: README.gentoo rsyslog.initd rsyslog.conf 50-default.conf rsyslog.confd rsyslog.logrotate
Date: Tue, 30 Sep 2014 13:09:44
Message-Id: 20140930130939.1E5B3696A@oystercatcher.gentoo.org
1 polynomial-c 14/09/30 13:09:39
2
3 Added: README.gentoo rsyslog.initd rsyslog.conf
4 50-default.conf rsyslog.confd rsyslog.logrotate
5 Log:
6 Security bump (bug #524058). Removed old. Remote syslog PRI vulnerability (CVE-2014-3634)
7
8 (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
9
10 Revision Changes Path
11 1.1 app-admin/rsyslog/files/8-stable/README.gentoo
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/README.gentoo?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/README.gentoo?rev=1.1&content-type=text/plain
15
16 Index: README.gentoo
17 ===================================================================
18 Introduction
19 ============
20
21 Since rsyslog version 7.6 we are shipping a new default Gentoo
22 configuration. See bug #501982 to learn more about what we were trying to
23 achieve by rewriting the entire configuration.
24
25
26 Important changes
27 =================
28
29 1. "/var/log/syslog" log file is now deprecated
30
31 Beginning with rsyslog-7.6, the "/var/log/syslog" log file will no
32 longer being written per default. We are considering this file as
33 deprecated/obsolet for the typical user/system.
34 The content from this log file is still availble through other
35 (dedicated) log files, see
36
37 - /var/log/cron.log
38 - /var/log/daemon.log
39 - /var/log/mail.log
40 - /var/log/messages
41
42 If you really need the old "/var/log/syslog" log file, all you have to
43 do is uncommenting the corresponding configuration directive in
44 "/etc/rsyslog.d/50-default.conf".
45
46 If you do so, don't forget to re-enable log rotation in
47 "/etc/logrotate.d/rsyslog", too.
48
49
50 2. An additional input socket in "/var/empty/dev/log" (default chroot
51 location) will be created per default
52
53 See bug #490744 for further details.
54
55
56
57 1.1 app-admin/rsyslog/files/8-stable/rsyslog.initd
58
59 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.initd?rev=1.1&view=markup
60 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.initd?rev=1.1&content-type=text/plain
61
62 Index: rsyslog.initd
63 ===================================================================
64 #!/sbin/runscript
65 # Copyright 1999-2014 Gentoo Foundation
66 # Distributed under the terms of the GNU General Public License v2
67 # $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.initd,v 1.1 2014/09/30 13:09:39 polynomial-c Exp $
68
69 RSYSLOG_CONFIGFILE=${RSYSLOG_CONFIGFILE:-"/etc/rsyslog.conf"}
70 RSYSLOG_PIDFILE=${RSYSLOG_PIDFILE:-"/run/rsyslogd.pid"}
71
72 command="/usr/sbin/rsyslogd"
73 command_args="${RSYSLOG_OPTS} -f ${RSYSLOG_CONFIGFILE} -i ${RSYSLOG_PIDFILE}"
74 start_stop_daemon_args="${RSYSLOG_SSDARGS}"
75 pidfile="${RSYSLOG_PIDFILE}"
76 retry="${RSYSLOG_TERMTIMEOUT}"
77
78 required_files="${RSYSLOG_CONFIGFILE}"
79
80 description="RSYSLOG is the rocket-fast system for log processing (syslog replacement)."
81
82 extra_commands="configtest"
83 extra_started_commands="rotate"
84
85 description_configtest="Run rsyslogd's internal config check."
86
87 description_rotate="Sends rsyslogd a signal to re-open its log files."
88
89 depend() {
90 need clock hostname localmount
91 provide logger
92 }
93
94 start_pre() {
95 if [ "${RC_CMD}" != "restart" ]; then
96 configtest || return 1
97 fi
98 }
99
100 stop_pre() {
101 if [ "${RC_CMD}" = "restart" ]; then
102 configtest || return 1
103 fi
104 }
105
106 stop_post() {
107 rm -f ${RSYSLOG_PIDFILE}
108 }
109
110 configtest() {
111 # This will currently only detect fatal errors
112 # See https://github.com/rsyslog/rsyslog/issues/79
113
114 local _test_command="${command} -N 999 -f ${RSYSLOG_CONFIGFILE}"
115 local _retval=0
116
117 ebegin "Checking rsyslogd's configuration"
118 ${_test_command} >/dev/null 2>&1
119 _retval=$?
120
121 if [ ${_retval} -ne 0 ]; then
122 ${_test_command}
123 fi
124
125 eend ${_retval} "failed, please correct errors above"
126 }
127
128 rotate() {
129 ebegin "Re-opening rsyslogd logs"
130 start-stop-daemon --signal SIGHUP --pidfile "${RSYSLOG_PIDFILE}"
131 eend $?
132 }
133
134
135
136 1.1 app-admin/rsyslog/files/8-stable/rsyslog.conf
137
138 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.conf?rev=1.1&view=markup
139 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.conf?rev=1.1&content-type=text/plain
140
141 Index: rsyslog.conf
142 ===================================================================
143 # /etc/rsyslog.conf
144 #
145 # This configuration is based on RainerScript, the new recommended syntax
146 # for RSYSLOG. See http://www.rsyslog.com/doc/rainerscript.html for further
147 # details.
148 #
149 # But if you don't want to learn something new at moment, don't worry: The
150 # legacy syntax is still supported.
151 #
152 # You may want to use the new RSYSLOG configuration builder to create your
153 # own more advanced configuration: http://www.rsyslog.com/rsyslog-configuration-builder/
154
155 # Check config syntax on startup and abort if unclean (default: off)
156 #$AbortOnUncleanConfig on
157
158
159 ###############
160 ### MODULES ###
161 ###############
162
163 # Read syslog messages from default Unix socket /dev/log (e.g. via logger command)
164 module(load="imuxsock")
165
166 # Read messages from the kernel log and submits them to the syslog engine
167 module(load="imklog")
168
169 # Inject "--MARK--" messages every $Interval (seconds)
170 #module(load="immark" Interval="600")
171
172 # Read syslog messages from UDP
173 #module(load="imudp")
174 #input(type="imudp" port="514")
175
176 # Read syslog messages from TCP
177 #module(load="imtcp")
178 #input(type="imtcp" port="514")
179
180
181 #########################
182 ### GLOBAL DIRECTIVES ###
183 #########################
184
185 # Where to place spool and state files
186 $WorkDirectory /var/spool/rsyslog
187
188 # Reduce repeating messages (default: off)
189 #$RepeatedMsgReduction on
190
191 # Set defaults for every output file
192 $Umask 0022
193
194 module(
195 load="builtin:omfile"
196 Template="RSYSLOG_TraditionalFileFormat"
197 FileCreateMode="0644"
198 DirCreateMode="0755"
199 )
200
201
202 # Include all conf files in /etc/rsyslog.d/
203 $IncludeConfig /etc/rsyslog.d/*.conf
204
205
206
207 1.1 app-admin/rsyslog/files/8-stable/50-default.conf
208
209 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/50-default.conf?rev=1.1&view=markup
210 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/50-default.conf?rev=1.1&content-type=text/plain
211
212 Index: 50-default.conf
213 ===================================================================
214 #######################
215 ### DEFAULT ACTIONS ###
216 #######################
217
218 auth,authpriv.* action(
219 type="omfile"
220 File="/var/log/auth.log"
221 FileCreateMode="0600"
222 FileOwner="root"
223 FileGroup="adm"
224 Sync="off"
225 )
226
227 cron.* action(
228 type="omfile"
229 File="/var/log/cron.log"
230 FileOwner="root"
231 FileGroup="adm"
232 )
233
234 daemon.* action(
235 type="omfile"
236 File="/var/log/daemon.log"
237 FileOwner="root"
238 FileGroup="adm"
239 )
240
241 kern.* action(
242 type="omfile"
243 File="/var/log/kern.log"
244 FileOwner="root"
245 FileGroup="adm"
246 )
247
248 lpr.* action(
249 type="omfile"
250 File="/var/log/lpr.log"
251 FileOwner="root"
252 FileGroup="adm"
253 )
254
255 mail.* action(
256 type="omfile"
257 File="/var/log/mail.log"
258 FileOwner="root"
259 FileGroup="adm"
260 )
261
262 news.* action(
263 type="omfile"
264 File="/var/log/news.log"
265 FileOwner="root"
266 FileGroup="adm"
267 )
268
269 user.* action(
270 type="omfile"
271 File="/var/log/user.log"
272 FileOwner="root"
273 FileGroup="adm"
274 )
275
276 *.=debug;auth,authpriv,news,mail.none action(
277 type="omfile"
278 File="/var/log/debug.log"
279 FileOwner="root"
280 FileGroup="adm"
281 )
282
283 *.info;auth,authpriv,cron,daemon,lpr,mail,news.none action(
284 type="omfile"
285 File="/var/log/messages"
286 FileOwner="root"
287 FileGroup="adm"
288 )
289
290 # Uncomment the following directive to re-enable the
291 # deprecated "/var/log/syslog" log file (don't forget to re-enable log
292 # rotation in "/etc/logrotate.d/rsyslog" if you do that!)
293 #*.*;auth,authpriv.none action(
294 # type="omfile"
295 # File="/var/log/syslog"
296 # FileOwner="root"
297 # FileGroup="adm"
298 #)
299
300 *.emerg action(
301 type="omusrmsg"
302 Users="*"
303 action.execOnlyOnceEveryInterval="10"
304 )
305
306 # Create an additional socket for the default chroot location
307 # (used by net-misc/openssh[hpn], see https://bugs.gentoo.org/490744)
308 input(type="imuxsock" Socket="/var/empty/dev/log")
309
310
311
312 1.1 app-admin/rsyslog/files/8-stable/rsyslog.confd
313
314 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.confd?rev=1.1&view=markup
315 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.confd?rev=1.1&content-type=text/plain
316
317 Index: rsyslog.confd
318 ===================================================================
319 # /etc/conf.d/rsyslog
320
321 # Configuration file
322 RSYSLOG_CONFIGFILE="/etc/rsyslog.conf"
323
324 # PID file
325 # If you should ever change this, remember to update
326 # "/etc/logrotate.d/rsyslog", too.
327 RSYSLOG_PIDFILE="/run/rsyslogd.pid"
328
329 # You can use this configuration option to pass additional options to the
330 # start-stop-daemon, see start-stop-daemon(8) for more details.
331 # Per default we wait 1000ms after we have started the service to ensure
332 # that the daemon is really up and running.
333 RSYSLOG_SSDARGS="--wait 1000"
334
335 # The termination timeout (start-stop-daemon parameter "retry") ensures
336 # that the service will be terminated within a given time (60 + 5 seconds
337 # per default) when you are stopping the service.
338 # You need to increase the value when you are working with a large queue.
339 # See http://www.rsyslog.com/doc/queues.html for further information.
340 RSYSLOG_TERMTIMEOUT="TERM/60/KILL/5"
341
342
343 # Options to rsyslogd
344 # See rsyslogd(8) for more details
345 # Notes:
346 # * Do not specify another PIDFILE but use the variable above to change the location
347 # * Do not specify another CONFIGFILE but use the variable above to change the location
348 RSYSLOG_OPTS=""
349
350
351
352 1.1 app-admin/rsyslog/files/8-stable/rsyslog.logrotate
353
354 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.logrotate?rev=1.1&view=markup
355 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.logrotate?rev=1.1&content-type=text/plain
356
357 Index: rsyslog.logrotate
358 ===================================================================
359 # Uncomment the following directive if you have re-enabled
360 # "/var/log/syslog" in "/etc/rsyslog.d/50-default.conf"
361 #/var/log/syslog
362 #{
363 # rotate 7
364 # daily
365 # missingok
366 # notifempty
367 # delaycompress
368 # compress
369 # postrotate
370 # test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null
371 # endscript
372 #}
373
374 /var/log/auth.log
375 /var/log/cron.log
376 /var/log/daemon.log
377 /var/log/kern.log
378 /var/log/lpr.log
379 /var/log/mail.log
380 /var/log/news.log
381 /var/log/user.log
382 /var/log/debug.log
383 /var/log/messages
384 {
385 rotate 4
386 weekly
387 missingok
388 notifempty
389 compress
390 delaycompress
391 sharedscripts
392 postrotate
393 test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null
394 endscript
395 }