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

Richard Moore rich at kde.org
Sun Sep 18 21:56:13 CEST 2016


On 18 September 2016 at 18:23, Roland Hughes <roland at logikalsolutions.com>
wrote:

> >>
>
> Hi,
>
> Is it possible to use Qt-based applications on OS X that run with elevated
> privileges (= as root), in general and if they need to connect to the
> user's session dbus?
>
> ---
>
> Typically you need to look at QApplication documentation. There is
> something you have to set in that class BEFORE you instantiate it. If that
> is not set Qt will block priv elevations. On Linux which, OS x is just the
> cheaper less capable BSD, you can then use "capabilities" (forget the
> correct name) library which allows a user app to temporarily elevate its
> privs for certain things.
>
>
​What you're thinking of is the suid protection. It doesn't affect just
running things as root.

Rich.
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160918/94a2b3d1/attachment.html>


More information about the Interest mailing list