[SailfishDevel] Elevating process privileges?

sfietkonstantin at free.fr sfietkonstantin at free.fr
Thu Aug 7 07:47:58 UTC 2014

Hi Michal,

Depending on what you want to do, there are several ways. Using sudo or su might be quite clumsy, especially su, where you need to have the user entering the root password. sudo can be used if you add in /etc/sudoers.d/ and install sudo, that requires mer-tools repo to be enabled IIRC.

The best way to gain privileges is (in my opinion), to write a system daemon that will be invoked via DBus and runs as root. It do not mess with sudo etc, and works rather well for many cases. Example of code in https://github.com/sailfishos-patches/patchmanager/tree/master/src/daemon.


----- Mail original -----
De: "Michał Radwański" <enedil.isildur at gmail.com>
À: devel at lists.sailfishos.org
Envoyé: Jeudi 7 Août 2014 09:41:19
Objet: [SailfishDevel] Elevating process privileges?

Hi all! 
Is Jolla user able to run processes that require root account? I mean something like 'nemo' is in `/etc/sudoers`. And if it is possible, how to gain privileges from C++? Is it like in Android, where I have to execute `su` command? 

Best regards, 

Michał Radwański a.k.a enedil 
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org

More information about the Devel mailing list