d-bus head

Joe Shaw joe@assbarn.com
Fri, 31 Oct 2003 13:12:20 -0500


On Thu, 2003-10-30 at 22:56, Havoc Pennington wrote:
> Come on, this stuff is in ancient UNIX; it's in the Stevens book.

I wouldn't say "ancient"... It's not POSIX, it's a (relatively) new
feature in BSD.

> There's a more concise way to do it on Linux but dbus-sysdeps.c does it
> the old verbose way too (in fact I could have sworn you implemented it!

Yeah, but the old verbose way doesn't work on Linux, Mac OS X, or
Solaris, it's rather BSD specific.  (And even then there seem to be
different implementations between Net/Open/FreeBSD which cause
headaches)

The workaround seems to be that a client binds to some unix socket and
the server does a stat() on it, but that's pretty sketchy, since on
certain System V systems you can chown your files to other people.  SVR4
has some ioctls for passing fds around, and those have credentials, but
I don't know much about that.  Maybe it works on Solaris.

Joe