NetworkManager/src/nmcli
Beniamino Galvani 40897db056 nmcli: fix crash in "nmcli device monitor"
Fix the following crash:

  $ nmcli device monitor a
  Error: Device 'a' not found.
  Segmentation fault (core dumped)

Found by coverity:

  1. NetworkManager-1.41.3/src/nmcli/devices.c:0: scope_hint: In function 'do_devices_monitor'
  2. NetworkManager-1.41.3/src/nmcli/devices.c:2932:28: warning[-Wanalyzer-null-dereference]: dereference of NULL 'devices'
     2930|       }
     2931|
     2932|->     for (i = 0; i < devices->len; i++)
     2933|           device_watch(nmc, g_ptr_array_index(devices, i));
     2934|

Fixes: 2074b28976 ('nmcli/devices: return GPtrArray instead of GSList from get_device_list()')
2022-10-19 16:11:55 +02:00
..
agent.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
common.c nmcli: allow selecting profiles by partial UUID 2022-09-28 13:27:14 +02:00
common.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
connections.c cli: fix translation string for error message in set_property() 2022-10-11 09:43:26 +02:00
connections.h nmcli/connections: export nmc_connection_check_deprecated() 2022-05-12 14:37:18 +02:00
devices.c nmcli: fix crash in "nmcli device monitor" 2022-10-19 16:11:55 +02:00
devices.h cli: move from "clients/cli/" to "src/nmcli/" 2021-03-15 17:10:54 +01:00
general.c style: fix code formatting 2022-10-17 17:40:40 +02:00
generate-docs-nm-settings-nmcli.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
generate-docs-nm-settings-nmcli.xml.in tools: preserve newlines and indentation in "generate-docs-nm-property-infos.py" 2022-10-06 13:40:29 +02:00
meson.build build/meson: use "rename" directive for installing nmcli bash completion 2022-05-13 16:15:18 +02:00
nmcli-completion nmcli-completion: fix support for embedded quote characters 2022-08-04 08:59:01 +02:00
nmcli.c nmcli: add --offline option for "add" and "modify" 2022-04-19 14:12:42 +02:00
nmcli.h cli: reformat file to look better 2022-06-16 11:02:20 +02:00
polkit-agent.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
polkit-agent.h cli: move from "clients/cli/" to "src/nmcli/" 2021-03-15 17:10:54 +01:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00
settings.c nmcli: fix typo 'exiting' -> 'existing' 2022-10-12 15:41:48 +02:00
settings.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
utils.c all: use nm_g_array_{index,first,last,index_p}() instead of g_array_index() 2022-09-15 12:39:07 +02:00
utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00

nmcli

The command line user interface of NetworkManager. It uses the D-Bus API of NetworkManager (via libnm).

See:

  • man 1 nmcli ([www])
  • man 7 nmcli-examples ([www])
  • man 5 nm-settings-nmcli ([www])

Try also with bash-completion!