Geoclue provider requires root permissions

Michael Leibowitz michael.leibowitz at intel.com
Thu Mar 31 08:52:48 PDT 2011


On Thu, 2011-03-31 at 08:36 -0700, Leonid Yurchenko wrote:
> On 03/31/2011 05:01 PM, Bastien Nocera wrote:
> > On Thu, 2011-03-31 at 16:39 +0300, Leonid Yurchenko wrote:
> >> Hi all.
> >>
> >> (is you saw this already - sorry for repeating mail, but previous seems
> >> to be stuck somewhere)
> >>
> >> I'm writing a geoclue provider that requires root permissions. In
> >> particular it requires access to wifi driver via wireless tools
> >> (initiate a scan). All is working perfectly when I start client
> >> application with sudo. But obviously I want a regular user to be able to
> >> use this provider without sudoing. How can I achieve this?
> > Why does it need that? I would expect connman, or NetworkManager to be
> > able to provide you with the details of nearby APs. In fact, that's
> > already how the skyhook provider works.
> 
> Hi, Bastien. Thanks for your answer.
> 
> As far as I know, both connman and NetworkManager are unable to initiate 
> a scan. They are passively collecting available access points. That 
> isn't enough for my case, I need to get freshest APs, and initiate a 
> wifi scan (that's easily done with wireless_tools, but requires superuser).

The connman manager has a method called RequestScan()
http://git.kernel.org/?p=network/connman/connman.git;a=blob;f=doc/manager-api.txt;h=332f6cdaf400e6427e490cbeb62511a3bf6a1184;hb=HEAD

> Isn't it possible to dbus service to be automatically launched by demand 
> with root privileges?

On the System bus, sure.  On the session bus, it's a bad idea.  You
could have a setuid helper or something, but I think what you are trying
to do is done by the connection managers, so you might as well use them.

Cheers

-- 
Michael Leibowitz <michael.leibowitz at intel.com>



More information about the GeoClue mailing list