Commit Graph

25 Commits

Author SHA1 Message Date
Ilia Ross 0660a18276 Add function to make vendor configs editable 2026-08-22 01:17:49 +02:00
Jamie Cameron 02cc3f6a67 Merge pull request #2805 from webmin/fix/opensuse-logrotate-drop-in-discovery-2682
Fix openSUSE logrotate vendor overlay handling
2026-08-13 15:36:43 -07:00
Ilia Ross 5969c33e06 Fix logrotate vendor override write handling 2026-08-11 20:24:38 +02:00
Ilia Ross b7aed03758 Fix to make logrotate vendor overrides work for API callers
https://github.com/webmin/webmin/pull/2805#discussion_r3740632921
2026-08-09 18:18:30 +02:00
Jamie Cameron e9c8746a34 Use standard split_quoted_string function 2026-08-04 11:02:37 -07:00
Ilia Ross 466f499e65 Fix openSUSE logrotate vendor overlay handling
This PR updates the Log File Rotation module for openSUSE Leap 16's split `/usr/etc` and `/etc` configuration model.

- Select the local main configuration when present, otherwise use the vendor configuration.

- Recursively merge vendor and local drop-ins using the same precedence as `logrotate-all`.

- Display vendor configurations while keeping `/usr/etc` read-only.

- Copy vendor files into matching `/etc` overrides before editing or deleting them.

- Preserve empty overrides so deleted vendor rotations remain disabled.

- Use the openSUSE wrapper for scheduled rotation and the effective configuration set for forced rotation.

- Keep behavior unchanged on distributions that do not enable the vendor overlay.

Includes regression coverage for selection, precedence, copy-on-write, deletion, scheduling, backups, and protection against direct vendor writes.

Closes [#2682](https://github.com/webmin/webmin/issues/2682).
2026-08-03 02:36:05 +02:00
Ilia Ross 782332dae7 Fix OpenSUSE logrotate drop-in discovery #2682 2026-08-03 01:39:05 +02:00
Jamie Cameron 94e74c2c66 Fix AI-detected bug 2026-08-01 11:16:03 -07:00
Jamie Cameron aaaa692cbc Clean up code by using my and adding formal params 2026-08-01 11:03:50 -07:00
Jamie Cameron 83abdc8858 Logrotate requires 0644 or 0444 permissions
https://github.com/webmin/webmin/issues/2396
2026-01-13 15:24:54 -08:00
Jamie Cameron 083bde276c Logrotate configs cannot be world writable : https://github.com/webmin/webmin/issues/2396 2025-02-06 18:32:55 -08:00
Jamie Cameron 98259a6128 Test commit 2021-04-11 17:11:59 -07:00
Jamie Cameron a2dc3f7124 Switch all calls to open() to explicitly open for read 2020-03-14 17:20:54 -07:00
Jamie Cameron 10b2aa7f4b Why closedir twice 2018-07-19 22:38:17 -07:00
Jamie Cameron 82bd7501d1 Don't create files with * in the name https://github.com/webmin/webmin/issues/935 2018-07-08 14:26:55 -07:00
Amish 5bec751f17 unescaped left brace in regex is deprecated 2017-07-03 11:41:05 +05:30
Jamie Cameron 8a03fafe08 Supporting add new logrotate config files to a directory 2013-04-21 12:59:13 -07:00
Jamie Cameron 751f442ebb Handle odd logrotate version string 2010-06-19 13:56:16 -07:00
Jamie Cameron 9dbd5db2c9 Fix permissions 2009-07-20 23:42:32 -07:00
Jamie Cameron 32f69727e0 Skip junk files in include dir 2009-04-17 21:22:34 +00:00
Jamie Cameron 5b3c6e91f4 Use new module 2009-03-01 07:57:22 +00:00
Jamie Cameron eb0c96b26e Fix caching of config file 2009-02-05 17:34:59 +00:00
Jamie Cameron 5973e866c7 Allow indent to be specified 2008-10-01 00:06:35 +00:00
Jamie Cameron 67f623d769 Added support for CSW logrotate from Solaris 10 2007-05-03 17:20:39 +00:00
Jamie Cameron fc1c1b243f Initial checkin of Webmin 2007-04-12 20:24:50 +00:00