diff mbox series

tests: Fix Permission denied on Fedora

Message ID 1514590253-5477-1-git-send-email-masashi.honma@gmail.com
State Changes Requested
Headers show
Series tests: Fix Permission denied on Fedora | expand

Commit Message

Masashi Honma Dec. 29, 2017, 11:30 p.m. UTC
Th wpa_cli and hostapd_cli looks fails on Fedora without sudo.

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

Comments

Jouni Malinen Dec. 30, 2017, 3:28 p.m. UTC | #1
On Sat, Dec 30, 2017 at 08:30:53AM +0900, Masashi Honma wrote:
> Th wpa_cli and hostapd_cli looks fails on Fedora without sudo.

Why is that the case? Is there no admin or adm group for the user (see
p2p0.conf GROUP=admin and start.sh updating that if needed)? What allows
the specific user to run sudo? Is that yet another group that start.sh
should change the group into?

> -	if $WPACLI -g /tmp/wpas-wlan$i ping | grep -q PONG; then
> +	if sudo $WPACLI -g /tmp/wpas-wlan$i ping | grep -q PONG; then

This could obviously be done to force the control interface connection
to work, but the goal of that GROUP=admin is to avoid this type of need
in the first place.
Masashi Honma Dec. 30, 2017, 8:31 p.m. UTC | #2
On 2017/12/31 00:28, Jouni Malinen wrote:
> On Sat, Dec 30, 2017 at 08:30:53AM +0900, Masashi Honma wrote:
> Why is that the case? Is there no admin or adm group for the user (see
> p2p0.conf GROUP=admin and start.sh updating that if needed)? What allows
> the specific user to run sudo? Is that yet another group that start.sh
> should change the group into?

Thanks, I did not recognize about admin group.
As you say, this is caused because Fedora using "wheel" group as
administrative group. So I will send updated patch.

Masashi Honma.
diff mbox series

Patch

diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh
index fe46212..4d2d055 100755
--- a/tests/hwsim/start.sh
+++ b/tests/hwsim/start.sh
@@ -196,7 +196,7 @@  for i in 0 1 2 3 4 5 6 7 8 9; do
 done
 for i in 0 1 2; do
     for j in `seq 1 10`; do
-	if $WPACLI -g /tmp/wpas-wlan$i ping | grep -q PONG; then
+	if sudo $WPACLI -g /tmp/wpas-wlan$i ping | grep -q PONG; then
 	    break
 	fi
 	if [ $j = "10" ]; then
@@ -208,7 +208,7 @@  for i in 0 1 2; do
 done
 
 for j in `seq 1 10`; do
-    if $WPACLI -g /var/run/hostapd-global ping | grep -q PONG; then
+    if sudo $WPACLI -g /var/run/hostapd-global ping | grep -q PONG; then
 	break
     fi
     if [ $j = "10" ]; then
@@ -219,7 +219,7 @@  for j in `seq 1 10`; do
 done
 
 for j in `seq 1 10`; do
-    if $HAPDCLI -i as ping | grep -q PONG; then
+    if sudo $HAPDCLI -i as ping | grep -q PONG; then
 	break
     fi
     if [ $j = "10" ]; then