bug: l2_packet_privsep does not honor the priv_dir driver parameter
ska-devel at skarnet.org
Thu Jun 30 02:56:14 PDT 2016
I'm trying to run wpa_supplicant in privilege separation mode.
I run "wpa_priv -c /myprivdir -- nl80211:wlan0".
Then I run "wpa_supplicant -D privsep -p priv_dir=/myprivdir -i wlan0".
Everything is starting fine, but L2 fails. Debug messages say:
Add interface wlan0 to a new radio N/A
L2: sendmsg(cmd): No such file or directory
L2: Failed to register with wpa_priv
A strace shows that the L2 sendmsg is sent to /var/run/wpa_priv/wlan0
instead of /myprivdir/wlan0. And indeed, in src/l2_packet/l2_packet_privsep.c,
in the l2_packet_init function, I can see that priv_dir is by default
hardcoded to "/var/run/wpa_priv" (which is normal), but there is no reading
of driver_param to replace the default with the user-provided priv_dir value.
I did not provide a patch because I've just started looking at the code
and I'm unsure of the correct way to fix this, so I figured a simple
bug-report would do.
More information about the Hostap