All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Improve d-bus error message on iwctl
@ 2022-04-13  9:34 Jimin Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Jimin Kim @ 2022-04-13  9:34 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]


Hi,

On 4/2/22 01:41, James Prestwood wrote:
> Hi,
>
>>>
>> Ok. Then how about changing the message to "Check yourself exists on 
>> netdev usergroup". I know this error is able to happen with other 
>> reason. But this error can showed by newbie or users who is not 
>> friendly with linux. And also, d-bus error message is not friendly 
>> for normal users. So Adding additional information on error messageis 
>> need.
>>
>
> Yes something like "check that user is in the netdev group" would be 
> better. We'll have to see what others think. Whether we take this 
> option or just choose to add something to the wiki (and I'll go ahead 
> and do this anyways).

  I've thought about that and d-bus error message is not user-friendly 
and this error can showed with normal using and figured out this caused 
by broken change commit. And also if error is not showed by this reason, 
this will be important issue. Thats why I didn't remove previous dbus 
error message.

  Wiki is good place to locate information. But many users don't know 
iwd wiki exists because this program has pre-installed to many linux 
distros. So I think show this short information is required.

> I've also CC'd the list back in, make sure you reply all so others can 
> see the coversation.
>
>>
>> Jimin Kim.
>>
>>
>
This is the new patch.

Jimin Kim.


---
  client/dbus-proxy.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/client/dbus-proxy.c b/client/dbus-proxy.c
index 0373a3df..8cad3ece 100644
--- a/client/dbus-proxy.c
+++ b/client/dbus-proxy.c
@@ -722,6 +722,7 @@ static void get_managed_objects_callback(struct 
l_dbus_message *message,
      if (dbus_message_has_error(message)) {
          display_error("Failed to retrieve IWD dbus objects, "
                              "quitting...\n");
+        display("Check yourself exists on netdev usergroup.\n");

          goto error;
      }
-- 
2.35.1



[-- Attachment #2: attachment.htm --]
[-- Type: text/html, Size: 4155 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Improve d-bus error message on iwctl
@ 2022-04-01 16:41 James Prestwood
  0 siblings, 0 replies; 4+ messages in thread
From: James Prestwood @ 2022-04-01 16:41 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

Hi,
> > 
> Ok. Then how about changing the message to "Check yourself exists on
> netdev usergroup". I know this error is able to happen with other
> reason. But this error can showed by newbie or users who is not
> friendly with linux. And also, d-bus error message is not friendly
> for normal users. So Adding additional information on error messageis
> need.

Yes something like "check that user is in the netdev group" would be
better. We'll have to see what others think. Whether we take this
option or just choose to add something to the wiki (and I'll go ahead
and do this anyways).

I've also CC'd the list back in, make sure you reply all so others can
see the coversation.

> 
> Jimin Kim.
> 



[-- Attachment #2: attachment.htm --]
[-- Type: text/html, Size: 1368 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Improve d-bus error message on iwctl
@ 2022-03-31 15:56 James Prestwood
  0 siblings, 0 replies; 4+ messages in thread
From: James Prestwood @ 2022-03-31 15:56 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]

Hi,

On Thu, 2022-03-31 at 17:10 +0900, Dayo wrote:
> I got error of 
> Rejected send message, 2 matched rules; type="method_call",
> sender=":1.137" (uid=1000 pid=14325 comm="client/iwctl")
> interface="org.freedesktop.DBus.ObjectManager"
> member="GetManagedObjects" error name="(unset)" requested_reply="0"
> destination="net.connman.iwd" (uid=0 pid=354 comm="/usr/lib/iwd/iwd")
> in execution of iwctl without sudo. But when I tried to search that,
> It has low information in google but I solve the issue as executing
> with sudo. So this is very small change but this will improve this
> software.
> 
> ps. I get issue in linux kernel 5.16 and later, including 5.17.x

This is actually result of removing  'at_console' from the dbus
configuration which we did a couple releases ago. The fix here is to
add your user to the netdev group if you don't want to run with root.
I'm not sure we want this debug print as-is for a few reasons. First
being that it should explain the netdev group requirement rather than
'root permission'. And second that this could be an error for any
number of reasons, not necissarily because of permissions.

https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=010b0e27f98442ad9366ecdcb09601f92334c293

> 
> 
> ---
>  client/dbus-proxy.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/client/dbus-proxy.c b/client/dbus-proxy.c
> index 0373a3df..8cad3ece 100644
> --- a/client/dbus-proxy.c
> +++ b/client/dbus-proxy.c
> @@ -722,6 +722,7 @@ static void get_managed_objects_callback(struct
> l_dbus_message *message,
>      if (dbus_message_has_error(message)) {
>          display_error("Failed to retrieve IWD dbus objects, "
>                              "quitting...\n");
> +        display("Execute iwctl with root permission is the one way
> to solve this issue.\n");
>  
>          goto error;
>      }
> _______________________________________________
> iwd mailing list -- iwd(a)lists.01.org
> To unsubscribe send an email to iwd-leave(a)lists.01.org


[-- Attachment #2: attachment.htm --]
[-- Type: text/html, Size: 3318 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Improve d-bus error message on iwctl
@ 2022-03-31  8:10 Dayo
  0 siblings, 0 replies; 4+ messages in thread
From: Dayo @ 2022-03-31  8:10 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: attachment.htm --]
[-- Type: text/html, Size: 2034 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-13  9:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13  9:34 [PATCH] Improve d-bus error message on iwctl Jimin Kim
  -- strict thread matches above, loose matches on Subject: below --
2022-04-01 16:41 James Prestwood
2022-03-31 15:56 James Prestwood
2022-03-31  8:10 Dayo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.