1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-09 01:18:19 +03:00

core/manager: close all cmsg fds where none is expected

This commit is contained in:
Mike Yuan 2024-09-02 23:43:53 +02:00
parent 3ad7f79023
commit e8b9767f51
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3

View File

@ -4942,6 +4942,8 @@ static int manager_dispatch_handoff_timestamp_fd(sd_event_source *source, int fd
if (n < 0) if (n < 0)
return log_error_errno(n, "Failed to receive handoff timestamp message: %m"); return log_error_errno(n, "Failed to receive handoff timestamp message: %m");
cmsg_close_all(&msghdr);
if (msghdr.msg_flags & MSG_TRUNC) { if (msghdr.msg_flags & MSG_TRUNC) {
log_warning("Got truncated handoff timestamp message, ignoring."); log_warning("Got truncated handoff timestamp message, ignoring.");
return 0; return 0;