libvirt/src/logging
Michal Privoznik a57195e79e log_cleaner: Detect rotated filenames properly
When removing rotated log files, their name is matched against a
regex (@log_regex) and if they contain '.N' suffix the 'N' is
then parsed into an integer. Well, due to a bug in
virLogCleanerParseFilename() this is not how the code works. If
the suffix isn't found then g_match_info_fetch() returns an empty
string instead of NULL which then makes str2int parsing fail.
Just check for this case before parsing the string.

Based on the original patch sent by David.

Reported-by: David Negreira <david.negreira@canonical.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-05-31 08:34:29 +02:00
..
log_cleaner.c log_cleaner: Detect rotated filenames properly 2024-05-31 08:34:29 +02:00
log_cleaner.h
log_daemon_config.c
log_daemon_config.h
log_daemon_dispatch.c logging: Update format strings in translated messages 2023-04-01 11:40:33 +02:00
log_daemon_dispatch.h
log_daemon.c logging: Update format strings in translated messages 2023-04-01 11:40:33 +02:00
log_daemon.h
log_handler.c logging: Update format strings in translated messages 2023-04-01 11:40:33 +02:00
log_handler.h
log_manager.c lib: use struct zero initializer instead of memset 2023-08-03 16:41:19 +02:00
log_manager.h
log_protocol.x
meson.build meson: drop explicit python interpreter 2024-01-22 09:14:29 +00:00
test_virtlogd.aug.in
virtlogd-admin.socket.in systemd: Improve and unify unit descriptions 2023-10-02 10:41:07 +02:00
virtlogd.aug
virtlogd.conf
virtlogd.init.in
virtlogd.service.extra.in systemd: Set service_extra_in/socket_extra_in everywhere 2023-10-25 12:19:32 +02:00
virtlogd.service.in logging: lockdown the systemd service configuration 2023-11-01 11:34:06 +00:00
virtlogd.socket.extra.in systemd: Set service_extra_in/socket_extra_in everywhere 2023-10-25 12:19:32 +02:00
virtlogd.socket.in systemd: Improve and unify unit descriptions 2023-10-02 10:41:07 +02:00