mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 14:40:21 +01:00
ifcfg-rh: fail nms_ifcfg_rh_writer_write_connection() without filename/dir
No actual caller should use the API without providing either a filename or the directory name. I don't think this can actually happen, hence fail and assert in that case.
This commit is contained in:
parent
1fa105eaef
commit
db13b93563
1 changed files with 7 additions and 2 deletions
|
|
@ -3279,8 +3279,13 @@ do_write_construct(NMConnection * connection,
|
|||
return FALSE;
|
||||
}
|
||||
ifcfg_name = ifcfg_name_free;
|
||||
} else
|
||||
ifcfg_name = "/tmp/ifcfg-dummy";
|
||||
} else {
|
||||
g_set_error(error,
|
||||
NM_SETTINGS_ERROR,
|
||||
NM_SETTINGS_ERROR_FAILED,
|
||||
"No file name given for storing profile to ifcfg-rh");
|
||||
g_return_val_if_reached(FALSE);
|
||||
}
|
||||
|
||||
ifcfg = svCreateFile(ifcfg_name);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue