mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 08:58:28 +02:00
libnm: Don't crash if service tells us a new key management mode
The NetworkManager service sometimes adds new key management modes. If it does, an older client library (perhaps in a container, or loaded into a pre-existing process before an upgrade) shouldn't crash when talking to a newer NetworkManager service over D-Bus. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/744 Signed-off-by: Simon McVittie <smcv@collabora.com> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/887
This commit is contained in:
parent
7d063726c2
commit
18c76388f0
1 changed files with 3 additions and 2 deletions
|
|
@ -866,8 +866,9 @@ need_secrets(NMSetting *setting)
|
|||
goto no_secrets;
|
||||
}
|
||||
|
||||
g_assert_not_reached();
|
||||
return secrets;
|
||||
/* If we get here, we're an older libnm talking to a newer NetworkManager
|
||||
* service (perhaps from a container or during an upgrade). Assume that
|
||||
* unknown/future key management modes don't need any extra secrets. */
|
||||
|
||||
no_secrets:
|
||||
if (secrets)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue