]> git.ipfire.org Git - thirdparty/hostap.git/commit
Reduce debug logging of configuration file details in wpa_supplicant
authorJouni Malinen <jouni.malinen@oss.qualcomm.com>
Thu, 9 Oct 2025 10:03:39 +0000 (13:03 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 9 Oct 2025 13:55:12 +0000 (16:55 +0300)
commitd20454f15a8d76575f29ac25d16ff02aa1c11c0f
tree55516acbf539a6514dd55b45a8802894429acd32
parentebada15ffe66abc98a62b52b1d1ce8e3bfec9a49
Reduce debug logging of configuration file details in wpa_supplicant

Avoid printing some of the details about parsing failures and invalid
data read from a configuration file when parsing it for normal
wpa_supplicant operation. This helps in reducing risk for leaking
information about files that the wpa_supplicant process itself might be
able to read, but the process requesting a new interface to be added
(e.g., though a control interface operation) might not have privileges
to read.

This does not remove all the prints in all cases, but reduces debug
prints significantly for cases where the specified configuration file is
does not use the same syntax as a valid wpa_supplicant configuration
file would.

The previously available level of detailed parsing information is
available for debugging purposes by running wpa_supplicant separately
for this without requesting any actual operation to be started. This can
be done, e.g., with the following command:
wpa_supplicant -c /tmp/test.conf -d

In addition to the debug information printed to stdout, the return code
from the process indicates whether the full configuration file was
parsed successfully.

It is also possible to explicitly request the parsing details to be
included in the debug log from normal operation by adding -y to the
command line. This is meant only for systems here the debug log is not
exposed to users that do not have access to the same set of files as the
wpa_supplicant process has.

Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
12 files changed:
wpa_supplicant/config.c
wpa_supplicant/config.h
wpa_supplicant/config_file.c
wpa_supplicant/config_none.c
wpa_supplicant/config_winreg.c
wpa_supplicant/ctrl_iface.c
wpa_supplicant/dbus/dbus_new_handlers.c
wpa_supplicant/eapol_test.c
wpa_supplicant/main.c
wpa_supplicant/preauth_test.c
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant_i.h