On Thu, 2011-03-31 at 18:36 +0300, 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). > > Isn't it possible to dbus service to be automatically launched by demand > with root privileges?
There's a good reason why it requires super-user. I would rather you used either connman or NetworkManager to poke at the network. They already know when they last scanned, how long a scan is expected to take, and this sort of thing. Trying to work around that is likely to cause more problems than it solves. _______________________________________________ GeoClue mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/geoclue
