mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-13 14:08:30 +02:00
settings: propagate certificate blob write failure in keyfile writer
When nm_utils_file_set_contents() fails to write a certificate blob to
disk, cert_writer() only logged a warning and silently continued. The
overall write operation would "succeed", producing a keyfile missing the
certificate entry entirely. This could lead to a broken 802.1X
connection profile that fails authentication at runtime.
Propagate the error via g_set_error() so that nm_keyfile_write() returns
failure and the profile write is properly aborted.
Fixes: ecca85066d ('keyfile: write certificates and keys in a human-readable manner')
This commit is contained in:
parent
4f41381c22
commit
061d32a02e
1 changed files with 3 additions and 1 deletions
|
|
@ -143,7 +143,9 @@ cert_writer(NMConnection *connection,
|
|||
vtable->setting_key,
|
||||
strrchr(new_path, '/') + 1);
|
||||
} else {
|
||||
nm_log_warn(LOGD_SETTINGS,
|
||||
g_set_error(error,
|
||||
NM_SETTINGS_ERROR,
|
||||
NM_SETTINGS_ERROR_FAILED,
|
||||
"keyfile: %s.%s: failed to write certificate to file %s: %s",
|
||||
setting_name,
|
||||
vtable->setting_key,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue