Ticket #242 (closed defect: fixed)
neod does not have the requred rights to turn on/off wifi
| Reported by: | prahal | Owned by: | ppronchery |
|---|---|---|---|
| Priority: | urgent | Milestone: | rev5 |
| Component: | neod | Version: | trunk |
| Severity: | blocker | Keywords: | |
| Cc: |
Description
(neod:4283): WARNING : Error performing ioctl: Operation not permitted
the openmoko-panel-wifi applet is not disappearing on h1 settings wifi off though it is if neod is running as root (and h1settings too).
Attachments
Change History
comment:1 Changed 2 years ago by prahal
- Summary changed from neod does nto ahve the requred rights to turn on/off wifi to neod does not have the requred rights to turn on/off wifi
Changed 2 years ago by prahal
-
attachment
neod_dynamicwifiinterface_and_useoftempdaemontotogglewifi.diff
added
neod use of tempdaemon
Changed 2 years ago by prahal
-
attachment
tempdaemon_0.1-1.tar.gz
added
temdaemon itself (warning one have to start the daemon by hand : /usr/bin/tempdaemon
comment:2 Changed 2 years ago by prahal
This tempdaemon is an easely extendable which intent is to provide the critical root functions (toggle wifi right now) until another already mature framework is included int he distribution
(thus it aims at rev5 not after).
Note that one have to /etc/init.d/dbus reload (missing postinst rule) and also start the daemon by hand as far as I have tested (activation, ie automatic load does not seem to work, this could eb workaround by starting the daemon at init rc2).
There is also a call in neod to this daemon that fix this bug.
I believe there are other needs for this (g_spawning root commands, disabling gps, etc). Though I am looking after comments before integrating anything more on this side.
comment:3 Changed 2 years ago by prahal
Ok found out the dbus activation issue :
I missed a line in :
/usr/share/dbus-1/system-services/org.prahal.TempDaemon?.service
User=root
and there is an issue with the binary of dbus:
ls /usr/lib/dbus-1.0/dbus-daemon-launch-helper -l
-rwsr-xr-- 1 root powerdev 40008 Jun 26 05:30 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
group powerdev instead of messagebus.
Cannot tell if it is a dbus setup script or local issue. Please confirm the latter.
comment:4 in reply to: ↑ description Changed 2 years ago by ppronchery
Replying to prahal:
the openmoko-panel-wifi applet is not disappearing on h1 settings wifi off though it is if neod is running as root (and h1settings too).
My own feeling is that h1settings should then be using sudo to turn the wireless interface on and off. We can't really afford to run one more daemon on the device...
comment:5 Changed 2 years ago by jblondon
h1settings does nothing on it own except setting gconf keys. So the sudo stuff must be done in neod (which is trivial btw)
comment:6 Changed 2 years ago by ppronchery
- Status changed from new to accepted
- Owner changed from jblondon to ppronchery
- Milestone set to rev5
Root cause for #219, considered important to the rev5 release.
comment:7 Changed 2 years ago by prahal
sudo is not my taste but still it does not help. ioctl cannot be sudo'ized. Thus neod itself must be run throught sudo . Or a program which run the ioctl and run the program as sudo ... Note that I have used dbus-activation to start this tempdaemon. One can shutdown the daemon as soon as the dbus method is completed (this I need to learn how to). Thus in the end it would be the same as running a program as root (sudo).
