chiark / gitweb /
sd-bus: socket - only transmit auxillary FDs once (#6603)
authorTom Gundersen <teg@jklm.no>
Wed, 30 Aug 2017 11:09:03 +0000 (13:09 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 Aug 2017 11:09:03 +0000 (13:09 +0200)
commit2707d0c3e8aed9319733c3675d4296f4c8c691f0
treed577b3cb75d26d66c985da9dfdd045dc687c0652
parent8b5107d7b777ac105347c7a3c5ad4aa33505b7f2
sd-bus: socket - only transmit auxillary FDs once (#6603)

If a message is too large to fit into the output buffer, it will be
transmitted to the kernel in several chunks. However, the FDs must
only ever be transmitted once or they will bereceived by the remote
end repeatedly.

The D-Bus specification disallows several sets of FDs attached to
one message, however, the reference implementation of D-Bus will
not reject such a message, rather it will reassign the duplicate
FDs to subsequent FD-carrying messages.

This attaches the FD array only to the first byte of the message.
src/libelogind/sd-bus/bus-socket.c