[SailfishDevel] Setting/escalating app privileges ?

Niels Christian Ørgaard ncothang at gmail.com
Sat May 31 13:15:44 UTC 2014


Hi all,

Is there a way to either set, or escalate, a SailfishOS app's privileges,
at first runtime or at installation?

Am looking to use 2 shell commands, iwlist and iwpriv, in my apps, but they
require root (or similar) access-rights.
(cannot quite figure out why iwlist should require root access ...)

Have googled around, looked at QML and QT5 documentation, and best results
have been discussions about an absence of configurable permissions; there
may be a way via QT, but my brief search didn't reveal anything.

I could write a quick root-password requester for my apps, asking for
permission every time they need to run either command, but I think that is
a pretty ugly and scary solution.

Am hoping to eventually introduce at least 1 app to Harbour, so I need to
locate a solution that is in line with Jolla's intents.


The 2 apps:

*LightFish - app to control LIFX bulbs*.
Needs to run "iwpriv wlan0 setMCBCFilter 1" upon startup, to ensure it can
catch broadcast messages from LIFX bulbs on the local network, and
preferably "iwpriv wlan0 setMCBCFilter 3" when closing down.
Have talked to LIFX about changing their network protocol, but this is
(naturally) a non-trivial thing to do.
Having a pop-up requesting root-password (or similar) every time this apps
runs would make it too annoying to use, just to set your lighting level;
Even more so, if having a pop-up asking for permissions when just
triggering a colour-change on a lightbulb to indicate an SMS have been
received.

*unnamed app - app to do basic wifi scans*
Would run iwlist wlan0 scan at regular intervals, present results in a
table.
Is simply to help me review local networks, without using my computer.


Any-and-all help are welcome, as I'm at a bit of dead end here.

Regards,
Niels Chr. Ø.
Belgium
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140531/ac23ce5b/attachment.html>


More information about the Devel mailing list