NetworkManager/src/nmcli
Thomas Haller 6e96d71731
all: use nm_random_*() instead of g_random_*()
g_random_*() is based on GRand, which is not a CSPRNG. Instead, rely on
kernel to give us good random numbers, which is what nm_random_*() does.

Note that nm_random_*() calls getrandom() (or reads /dev/urandom), which
most likely is slower than GRand. It doesn't matter for our uses though.

It is cumbersome to review all uses of g_rand_*() whether their usage of
a non-cryptographically secure generator is appropriate. Instead, just
always use an appropriate function, thereby avoiding this question. Even
glib documentation refers to reading "/dev/urandom" as alternative. Which
is what nm_random_*() does. These days, it seems unnecessary to not use
the best random generator available, unless it's not fast enough or you
need a stable/seedable stream of random numbers.

In particular in nmcli, we used g_random_int_range() to generate
passwords. That is not appropriate. Sure, it's *only* for the hotspot,
but still.
2023-01-30 10:51:13 +01:00
..
agent.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
common.c clang-format: reformat code with clang-format 15.0.4-1.fc37 2022-11-23 09:17:21 +01:00
common.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
connections.c nmcli/style: fix clang-format style 2023-01-27 08:32:39 +01:00
connections.h nmcli/connections: export nmc_connection_check_deprecated() 2022-05-12 14:37:18 +02:00
devices.c all: use nm_random_*() instead of g_random_*() 2023-01-30 10:51:13 +01:00
devices.h cli: move from "clients/cli/" to "src/nmcli/" 2021-03-15 17:10:54 +01:00
gen-metadata-nm-settings-nmcli.c nmcli: rename "generate-docs-nm-settings-nmcli" to "gen-metadata-nm-settings-nmcli" 2022-10-31 09:11:30 +01:00
gen-metadata-nm-settings-nmcli.xml.in all: add support for ovs-dpdk n-rxq-desc and n-txq-desc 2023-01-17 08:45:04 +01:00
general.c nmcli/monitor: always print running status on monitor startup 2022-11-13 15:24:19 +01:00
meson.build nmcli: rename "generate-docs-nm-settings-nmcli" to "gen-metadata-nm-settings-nmcli" 2022-10-31 09:11:30 +01: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: fix various "-Wcast-align=strict" warnings 2022-12-09 09:15:56 +01: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!