13 Commits

Author SHA1 Message Date
Julian Brost
c42dc1e55a CMake: remove logrotate version detection
This was used to detect the presence of version 3.8.0 which introduced the "su"
config option[^1]. It was releases in 2011, so I'd say it's time that we can
just assume that it's supported.

Additionally, this has a bit of a security impact as it defaults to not using
the "su" option, which means that logrotate will do more than necessary as
root. This happened with our packages as these were built without logrotate
being installed, which caused the version detection to fail. Just assuming the
new version here instead of adding it as a non-obvious build dependency should
be the more robust fix.

[^1]: https://github.com/logrotate/logrotate/blob/r3-8-0/CHANGES#L6-L8
2025-08-19 16:02:18 +02:00
Maximilian Falkenstein
a205fd0887
Fix logrotate "Operation not permitted"
PR 75 (commit afb6346) added support for the 'su' directive of
logrotate. However, when using 'su', we cannot chown to arbitrary file
owners anymore, which means that unless the file has already been
created with the same permissions we'll get an error.
Fix this by not using chown and su together.
2019-03-31 22:16:06 +02:00
Markus Frosch
9fbc40615a Improve path handling in cmake and daemon 2018-08-07 14:10:26 +02:00
Louis Sautier
4970c459ee Re-add the 'su' directive to logrotate if supported
- try to detect a recent logrotate version which supports the 'su'
directive (added in 3.8.0, see
5be96cf182 (diff-e4eb329834da3d36278b1b7d943b3bc9R6))
- if logrotate can't be found, assume an old version is used
- allow the parameter to be forced by the user

fixes #9249

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
2016-03-29 14:59:06 +02:00
Lee Clemens
7bf012ca50 Reload logs after logrotate across distros
Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>

fixes #10935
2016-01-21 10:12:43 +01:00
Gunnar Beutner
4214329bb6 logrotate: Check whether the PID file exists
refs #8808
2015-04-20 11:25:10 +02:00
Michael Friedrich
5baa837c8d Fix logrotate install
refs #8808
2015-04-20 10:11:48 +02:00
Jean-Marcel Flach
a28369593a Fix logrotate configuration
refs #8868 fixes #8808
2015-03-31 12:18:20 +02:00
Tim Hardeck
74751a4e22 Fix logrotate should rotate log files as icinga user
fixes #6477
2014-06-13 09:47:26 +02:00
Gunnar Beutner
7183495d89 Make username in the logrotate config configurable.
Fixes #6295
2014-05-26 09:01:23 +02:00
Gunnar Beutner
95d9b6f221 Fix invalid logrotate option.
Fixes #6265
2014-05-22 12:02:11 +02:00
Gunnar Beutner
2350593ef0 Fix logrotate config.
Fixes #6229
2014-05-22 11:22:30 +02:00
Michael Friedrich
87ba0ea3ab Add logrotate config.
Refs #5448
2014-01-14 17:24:38 +01:00