Hi all

When fiddling around trying to replace networkmanager with wpa_gui from wpa_supplicant, I came across a problem in /lib/services/wpa from blfs-bootscripts-20160415.

As wpa_gui does not use dbus/polkit for access rights, but plain unix group write permissions on the socket, I put in my /etc/sysconfig/wpa_supplicant-wifi0.conf the following line:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

When starting wpa_supplicant and dhcpcd manually, I could then use wpa_gui as normal user with wheel group membership to manage my access points and all was well.

But when I set it all up proper in lfs, it wouldn't work anymore. The reason is that the blfs service file explicitely sets the ctrl_interface on the commandline, overriding the setting in the config file. Sadly, the man page of wpasupplicant describes no method to provide the group information on the command line.

The following diff fixes the wpa service script, allowing wpa_gui (and wpa_cli) to be used as a regular user.


--- blfs-bootscripts-20160415/blfs/services/wpa 2016-01-08 22:55:44.000000000 +0100
+++ /lib/services/wpa   2016-08-04 20:28:01.851863891 +0200
@@ -40,7 +40,7 @@
       mkdir -p /run/wpa_supplicant

       /sbin/wpa_supplicant -q -B -Dnl80211,wext -P${PIDFILE} \
-          -C/run/wpa_supplicant -c${CFGFILE} -i$1 ${WPA_ARGS}
+          -c${CFGFILE} -i$1 ${WPA_ARGS}

       if [ "$?" != "0" ]; then
         log_failure_msg2



It might also be an idea to mention this on the wpasupplicant page, that in order to manage access points,

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

can be used in the config.


Cheers
Tim

--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to