dbus2 / zbus-old

Rust D-Bus crate.
https://gitlab.freedesktop.org/dbus/zbus
Other
49 stars 13 forks source link

Cloning of Message should own the FDs #274

Closed zeenix closed 1 year ago

zeenix commented 2 years ago

In GitLab by @elmarco on Apr 29, 2022, 18:34

In https://gitlab.freedesktop.org/dbus/zbus/-/merge_requests/255

commit 8f61f6c422ea06d929cc4be2d9c2381ffcc7fb94 introduced Message cloning, but the Message clone doesn't own the FDs. This can lead to quite bad results.

zeenix commented 2 years ago

What makes you think it doesn't? I see it inside an Arc and the clone is implemented through the usual derive. I think it's just that I didn't remember to update the comment about this. Re-open if I'm mistaken.

zeenix commented 2 years ago

In GitLab by @elmarco on May 2, 2022, 13:00

right, I guess I was confused by the Clone for Fds. I'll send a patch to remove it, shouldn't be needed anymore. another day we will revisit the FDs handling, probably when the std OwnedFd are stable...