Skip to content

Commit c5cd17e

Browse files
author
Sebastian Wagner
committed
BUG: fix logrotate ownership options
The packaged configuration for logrotate falsely contained options applying to other programs' log files. This caused wrong ownerships of log files. This issues is corrected, but the ownership of affected log files may need to be changed manually. To find affected files, you may use: ```bash sudo find /var/log/ -user intelmq ! -path \*intelmq\* ``` fixes #2110
1 parent e3cfac7 commit c5cd17e

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ CHANGELOG
5959
### Tools
6060

6161
### Contrib
62+
- logrotate: Move compress and ownership rules to the IntelMQ-blocks to prevent that they apply to other files (PR#2111 by Sebastian Wagner, fixes #2110).
6263

6364
### Known issues
6465

NEWS.md

+8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ The field names for all data added to messages must match a pre-defined format.
2222
The check which ensures this, was ineffective prior to this version and is effective again starting with version 3.1.0.
2323
The [Data format documentation](https://intelmq.readthedocs.io/en/maintenance/dev/data-format.html#rules-for-keys) describes the required format.
2424

25+
### Logrotate
26+
The packaged configuration for logrotate falsely contained options applying to other programs' log files. This caused wrong ownerships of log files.
27+
This issues is corrected, but the ownership of affected log files may need to be changed manually.
28+
To find affected files, you may use:
29+
```bash
30+
sudo find /var/log/ -user intelmq ! -path \*intelmq\*
31+
```
32+
2533
### Configuration
2634

2735
### Libraries

contrib/logrotate/intelmq

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
compress
2-
delaycompress
3-
create 644 intelmq intelmq
4-
51
/opt/intelmq/var/log/*.log {
62
su intelmq intelmq
73
daily
84
maxsize 10M
95
rotate 60
106
notifempty
7+
compress
8+
delaycompress
9+
create 644 intelmq intelmq
1110
sharedscripts
1211
postrotate
1312
sudo -u intelmq /usr/local/bin/intelmqctl --quiet reload
@@ -20,6 +19,9 @@ create 644 intelmq intelmq
2019
maxsize 10M
2120
rotate 60
2221
notifempty
22+
compress
23+
delaycompress
24+
create 644 intelmq intelmq
2325
sharedscripts
2426
postrotate
2527
sudo -u intelmq /usr/local/bin/intelmqctl --quiet reload file-output

debian/patches/fix-logrotate-path.patch

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
Description: Fix paths in logrotate configuration to obey FHS
22
Author: Gernot Schulz <gernot@intevation.de>, Sebastian Wagner <wagner@cert.at>
3-
Last-Update: 2021-03-03
3+
Last-Update: 2021-09-14
44
---
55
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
6-
--- a/contrib/logrotate/intelmq 2021-03-03 11:08:37.811638328 +0100
7-
+++ b/contrib/logrotate/intelmq 2021-03-03 11:09:27.415930805 +0100
8-
@@ -2,7 +2,7 @@
9-
delaycompress
10-
create 644 intelmq intelmq
11-
6+
--- a/contrib/logrotate/intelmq
7+
+++ b/contrib/logrotate/intelmq
8+
@@ -1,4 +1,4 @@
129
-/opt/intelmq/var/log/*.log {
1310
+/var/log/intelmq/*.log {
1411
su intelmq intelmq
1512
daily
1613
maxsize 10M
17-
@@ -10,11 +10,11 @@
18-
notifempty
14+
@@ -9,11 +9,11 @@
15+
create 644 intelmq intelmq
1916
sharedscripts
2017
postrotate
2118
- sudo -u intelmq /usr/local/bin/intelmqctl --quiet reload
@@ -28,8 +25,8 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
2825
su intelmq intelmq
2926
daily
3027
maxsize 10M
31-
@@ -22,6 +22,6 @@
32-
notifempty
28+
@@ -24,6 +24,6 @@
29+
create 644 intelmq intelmq
3330
sharedscripts
3431
postrotate
3532
- sudo -u intelmq /usr/local/bin/intelmqctl --quiet reload file-output

0 commit comments

Comments
 (0)