Files
mcde/lib
lotherkandClaude Sonnet 5.5 c7b9bcd0ae McdeSys: a Wi-Fi name that starts with "-" is no argument for nmcli (t0081)
The Linux mcde_sys_wifi_join passes the network name to
"nmcli device wifi connect NAME ...".  The name of an access point is what the
neighbour's device broadcasts.  Measured with nmcli 1.56.1:
  nmcli device wifi connect --ask password PW ifname IF
  -> "Error: invalid extra argument 'PW'" -- the name was taken as the option
  --ask (a name of -x, --help or - is taken as a name; no effect).
"--" in front is no remedy: nmcli takes the "--" for the name ("invalid extra
argument 'Home'" for a normal name).  The password is safe: it is the argument
of the keyword "password" whatever it starts with.

So the Linux branch refuses a name that starts with "-" (mcde_sys_wifi_ssid_arg_ok
in net.c, with the old 1..32 byte rule); the NetBSD branch does not call nmcli.
A legitimate network called "-something" cannot be joined from System Settings
on Linux; the message is the old one ("The network name cannot be used").
test_netinput: 11 more checks; make check 6 of 6; with the dash rule removed the
test fails (checked with a mutant).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 04:56:03 +00:00
..