feat: expose unreferenced Unix FDs from replies#432
Conversation
068b7f4 to
e6b034c
Compare
|
@guelfey could you please take a look in your spare time? |
|
So to be honest, I think this is more of an issue in tmp2-abrmd. If I look at the D-Bus specification, it doesn't explicitly disallow this, but it doesn't assign any "semantic meaning" to simply attaching Unix FDs to a message without putting any value of type UNIX_FD into the message body. I find it weird that glib even allows this (I guess it simply operates on a bit of a "lower level"), but even there it's mentioned in the documentation: |
|
I overall agree with you: returning the old behavior for tpm2-abrmd would be a better option, but I don't think changing the API surface back and forth is a good idea either. I believe in other languages you can access Unix FDs without any real problem; otherwise there would have been reports, though I don't have much experience with other languages D-Bus libs. |
I ran into this with tpm2-abrmd. Since tpm2-abrmd 2.4.1,
CreateConnectionreturns only the connection id in the D-Bus reply body and sends the communication FD via the reply's Unix FD list: tpm2-software/tpm2-abrmd@7d5a73dgodbusalready receives those FDs in the Unix transport, but callers cannot access them unless the reply body references them throughh. This change exposes FDs received with method replies viaUnixFDsfield. Existinghdecoding behavior is unchanged.