mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 06:50:10 +01: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 Fixes:4c4f59674a('2007-10-23 Dan Williams <dcbw@redhat.com>') (cherry picked from commit18c76388f0)
This commit is contained in:
parent
a25c577556
commit
a90a7b2d5f
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