[Patch] Moving FD passing into the header
mzqohf at 0pointer.de
Wed Jun 23 08:49:51 PDT 2010
On Wed, 23.06.10 08:00, Colin Walters (walters at verbum.org) wrote:
> On Tue, Jun 22, 2010 at 8:49 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
> > And again, and I said it a gazillion of times: nothing stops you from
> > serializing/deserializing the unix fd stuff not as unix fd, but as index
> > into the fd table. Then, things would behave almost identical to what
> > your patches offer, except that methods that carry unix fds are properly
> > typechecked and have complete introspection data. You could support that
> > just fine in GVariant with minimal work.
> This makes me think of a third option here - make the 'h' type be
> DBUS_TYPE_OOB (out of band). It's an integer index into some
> (possibly platform specific) data to be found in the header. In your
> service documentation you'd mention that the 'h' in a particular
> method is a file descriptor, say.
Such an approach would suggest itself if we had more than one type of
OOB data to pass around. But I don't really see that. Looking through
the man pages on Linux only three kinds of data can be sent out-of-band
really so far:
SCM_CREDENTIALS (which we already cover a different way)
SO_TIMESTAMP (which is kinda useless here I think)
And because things are the way they are I'd just support what we know
about and matters, and ignore the rest, that we don't know about.
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the dbus