[v2] tests: Fix Permission denied on Fedora

Message ID 1514666128-3817-1-git-send-email-masashi.honma@gmail.com
State Accepted
Headers show
Series
  • [v2] tests: Fix Permission denied on Fedora
Related show

Commit Message

Masashi Honma Dec. 30, 2017, 8:35 p.m.
On Fedora 26, start.sh fails with these error messages.

Failed to connect to wpa_supplicant global interface: /tmp/wpas-wlan0  error: Permission denied
Failed to connect to wpa_supplicant global interface: /tmp/wpas-wlan0  error: Permission denied
...

This is because Fedora 26 uses "wheel" group as administrative group.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
 tests/hwsim/start.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jouni Malinen Feb. 17, 2018, 7:17 p.m. | #1
On Sun, Dec 31, 2017 at 05:35:28AM +0900, Masashi Honma wrote:
> On Fedora 26, start.sh fails with these error messages.
> 
> Failed to connect to wpa_supplicant global interface: /tmp/wpas-wlan0  error: Permission denied
> Failed to connect to wpa_supplicant global interface: /tmp/wpas-wlan0  error: Permission denied
> ...
> 
> This is because Fedora 26 uses "wheel" group as administrative group.

Thanks, applied.

Patch

diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh
index fe46212..527ee22 100755
--- a/tests/hwsim/start.sh
+++ b/tests/hwsim/start.sh
@@ -58,6 +58,8 @@  fi
 
 if groups | tr ' ' "\n" | grep -q ^admin$; then
     GROUP=admin
+elif groups | tr ' ' "\n" | grep -q ^wheel$; then
+    GROUP=wheel
 else
     GROUP=adm
 fi