Unix FD Passing
havoc.pennington at gmail.com
Sat Apr 25 06:29:11 PDT 2009
On Fri, Apr 24, 2009 at 7:13 PM, Thiago Macieira <thiago at kde.org> wrote:
> Em Sexta-feira 24 Abril 2009, às 18:55:16, Lennart Poettering escreveu:
>> This also includes simple negotiation for unix fd passing: the auth
>> protocol is extended a bit. Two new commands have been introduced. If
>> a clients can do and wants to do fd passing it will send
>> NEGOTIATE-UNIX-FD after the authentication was sucessful, before
>> sending BEGIN. The server then responds with ERROR if it cannot or
>> doesn't want to do fd passing. Otherwise it will respond with
>> AGREE-UNIX-FD and both sides enable their fd passing code.
> Brilliant solution! Why didn't we think of that before?
We did didn't we? This is what the spec suggests for negotiating extensions:
"In the authentication protocol (see the section called
“Authentication Protocol”) unknown commands result in an ERROR rather
than a disconnect. This enables future extensions to the protocol."
Of course, Lennart is the only person to actually _do_ it ;-) which rocks.
Lennart, spec says "Each line begins with an all-caps ASCII command
name containing only the character range [A-Z_]" so maybe s/-/_/
(sorry for the totally minor comment, I haven't read actual patches
yet, just happen to be looking at that spec bit and above-quoted bit
of your email)
Should we generalize things a bit, so we could have:
NEGOTIATE UNIX_FD FOO BAR
AGREE UNIX_FD BAR
i.e. here FOO was not agreed to. Idea is just one round-trip to get
the complete feature intersection.
More information about the dbus