[Interest] Qt, running as root (sudo/setuid), DBus and OS X

Thiago Macieira thiago.macieira at intel.com
Fri Sep 23 04:06:44 CEST 2016


On sexta-feira, 23 de setembro de 2016 01:06:31 PDT René J. V. Bertin wrote:
> Ch'Gans wrote:
> >> It's not possible to connect to another user's session bus.
> > 
> > I'm not trying to say that this is what René should do, I'm just
> > saying that it is technically possible, for the sake of correctness.
> 
> My first attempts to get a privileged service to work involved exporting my
> launchd session bus socket to root, via launchctl. That worked; I think
> that's sufficient proof that root at least can connect to a lesser user's
> session bus, on OS X.

Probably because dbus-daemon hasn't implemented obtaining the peer's UID on 
macOS. The moment it does, you won't be able to.

If you want to connect to a user's session bus, setuid to that user first.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list