NetworkManager/clients/cli
Thomas Haller c6c15c2c25 cli: use async method D-Bus for nmcli networking on|off
Previously, we would call the synchronous nm_client_networking_set_enabled()
method. There were 3 problems:

1) nmcli ignored the return value, that means, if the request failed with
  access denied it would just silently pretend that it succeeded.

2) nmcli first called nmc_start_polkit_agent_start_try(), but when
  invoking the synchronous method, the main context is busy and a
  polkit request cannot possibly be handled.

3) nm_client_networking_set_enabled() is deprecated.

Fix all of these, by calling the D-Bus method directly.

Policykit authentication requests are only handled partly. There
seems to be an unrelated race/bug. Now it works sometimes.
2020-03-23 09:37:53 +01:00
..
agent.c clients: polkit-agent: implement polkit agent without using libpolkit 2019-12-24 10:13:51 +01:00
agent.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
common.c cli: don't use GIOChannel to watch plain file descriptor for nmc_readline_helper() 2020-01-13 15:46:04 +01:00
common.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
connections.c nmcli: remove interface length check in nmcli 2020-02-17 15:27:35 +01:00
connections.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
devices.c cli: fix nmcli device wifi with no Wi-Fi devices available 2020-03-20 10:38:09 +01:00
devices.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
general.c cli: use async method D-Bus for nmcli networking on|off 2020-03-23 09:37:53 +01:00
general.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
meson.build clients: polkit-agent: implement polkit agent without using libpolkit 2019-12-24 10:13:51 +01:00
nmcli-completion cli: make nmcli do its own command completion 2017-02-13 16:32:15 +01:00
nmcli.c cli: honor NO_COLOR environment variable to prevent automatic ASCII colors 2019-10-08 12:18:20 +02:00
nmcli.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
polkit-agent.c clients: polkit-agent: implement polkit agent without using libpolkit 2019-12-24 10:13:51 +01:00
polkit-agent.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
settings.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
settings.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
utils.c cli: fix out of bounds access in _print_fill() 2020-03-16 13:44:12 +01:00
utils.h cli: expose device D-Bus path 2019-12-10 17:57:10 +01:00