Re: [SailfishDevel] Elevating process privileges?

2014-08-07 Thread Jonni Rainisto
hi,

When you enable developer mode you have 'devel-su' command available.

Harbour store doesn't allow apps that run as root. But openrepo's does (you can 
set suid bit in rpm and use standard c++ calls to to gain&drop privileges.

Br, Jonni

From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] 
on behalf of Michał Radwański [enedil.isil...@gmail.com]
Sent: Thursday, August 07, 2014 10:41 AM
To: devel@lists.sailfishos.org
Subject: [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-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Elevating process privileges?

2014-08-07 Thread sfietkonstantin
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.

Regards,
Lucien

- Mail original -
De: "Michał Radwański" 
À: devel@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-unsubscr...@lists.sailfishos.org
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] Elevating process privileges?

2014-08-07 Thread Michał Radwański
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-unsubscr...@lists.sailfishos.org