[PATCH 0/2] Fix clobbered wpa conf file symlinks

Andrew Beltrano anbeltra at microsoft.com
Wed Apr 7 00:44:56 BST 2021

wpa_supplicant conf file updates do not account for the case where the file is a 
symlink. The use of rename() for atomic-like updates discards the symlink in 
this case. This patch-set fixes the issue by ensuring the link target is
replaced instead of the symbolic link file itself.

Andrew Beltrano (2):
  Add helper function to read file link targets.
  Use wpa conf file link target for writing.

 src/utils/common.c           | 29 +++++++++++++++++++++++++++++
 src/utils/common.h           |  2 ++
 wpa_supplicant/config_file.c | 15 +++++++++++++--
 3 files changed, 44 insertions(+), 2 deletions(-)


More information about the Hostap mailing list