Open vtcifer opened 2 years ago
Thanks for the report.
Using chmod would still allow the config file to be read for a brief moment, so that might be a bit less than ideal.
I've updated dhcpcd's wpa_supplicant hook to run it with a umask of 0077, which makes sure that wpa_supplicant.conf is always saved with 600. This update should be public once I've done a bit more testing to make sure it doesn't cause other issues.
Updated version of dhcpcd has gone up.
The wpa_cli wrapper that raspi-config uses uses to setup access to wireless networks leaves
/etc/wpa_supplicant/wpa_supplicant.conf
file world readable:While fixing wpa_cli to not leave this file with passwords in it world readable is certainly out of scope for here, addressing the fact that it happens isn't. Fixing permissions to 600 after executing is likely needed here (as is done in other places when raspi-confg / wpa_cli isn't used, for example the rpi-imager has code that deals specifically with changing the permissions on this file, see link below).
https://github.com/raspberrypi/rpi-imager/blob/9d4665dbcac67d54c7c7e62690979580ce4c7349/src/OptionsPopup.qml#L723-L732