This PR adds the ability for the logging pages to hand the Miniserv access and error logs, and the Webmin actions log, to logrotate instead of having Miniserv periodically delete them. The generated section uses copy-truncate rotation, since Miniserv only reopens its error log when the file disappears.
The option only appears when the Log File Rotation module is available and configured correctly.
Add a Logging page to the Usermin Configuration module for the access-log settings, guarded by a new "log" ACL.
Also, Webmin and Usermin logging pages add new an "Error log destination" choice on systemd systems. Selecting the journal sets errorlog=- and installs a local StandardError=journal drop-in, leaving the packaged unit untouched.
https://forum.virtualmin.com/t/miniserv-webserver-log-growing-too-big-should-be-rotated/136562/10?u=ilia
ⓘ Do not return a short name from /etc/hostname when the full name is requested; resolve it with hostname -f first, honoring the no_hostname_f option, and otherwise fall back to the existing file-based logic.
Also check for /run/systemd/system instead of reading /proc/1/comm as it's much cheaper.
Fixes#2054
ⓘ Only the .htaccess path was checked against the allowed directories. The users and groups file paths could be absolute and were saved unchecked, then written to later.
V2
ⓘ The password file path was taken from the request without any check, so it could point at any file on the system, which was then read or written.
It is now checked against the allowed directories, the same way it already is when the path is first set.
W1 and V4
This small PR fixes deletion of bridges with arbitrary names, like vmbr0, by honoring the boot config bridge flag instead of relying only on name patterns.
It also makes the Debian config parser treat any interface with bridge_ports as a bridge, which previously caused bridge options to be lost on re-save.
This PR fixes the Users and Groups module to honor the "Unix users who can be edited" ACL when editing group members.
Before, the group edit form listed all system users in the members chooser and accepted any user on save, regardless of the ACL.
Now only editable users are offered, and adding or removing a non-editable user is rejected.
Fixes#2464
ⓘ Allow passing several patch URLs or files at once, e.g. webmin patch url1 url2 url3. Patches are applied in the given order, stopping at the first failure, and Webmin is reloaded only once after all of them are applied.
ⓘ GNU patch keeps a .orig copy of the original file whenever a hunk applies with fuzz or offset, which is common when patching an installed release with a commit from the master branch. Pass --no-backup-if-mismatch, since backups are not needed.
ⓘ When GNU patch is not installed, git apply was run inside the module directory, and if the Webmin root itself was a git repository, git resolved paths relative to that root and silently skipped the patched files.
Limit repository discovery to the current directory and allow reduced context, similar to the default fuzz used by patch, so slightly drifted context lines no longer cause a rejection.