secret-agent: fix detection of disapearing secret-agent

System Internals / NetworkManager - Thomas Haller [redhat.com] - 25 August 2015 09:37 UTC

The signal "notify:g-name-owner" is only emitted for well-known names, but not for unique connection names (":1.x") such as the secret agent's connection. Also, it will not be emited for private connections.

That meant that when the client disconnected without explicitly unregistering, the NMSecretAgent was not cleaned up and leaked indefinitely. As only one instance of secret agent with a certain 'identifier/uid' pair can register, this bug also prevented the client from registering until restart of NetworkManager.

Fixes: df6706813a698e7a697739b0940bd8f528713aab

9b35d29 secret-agent: fix detection of disapearing secret-agent
src/nm-bus-manager.c | 37 +++++++++++--
src/nm-bus-manager.h | 5 +-
src/settings/nm-secret-agent.c | 119 +++++++++++++++++++++++++++++++++-------
3 files changed, 133 insertions(+), 28 deletions(-)

Upstream: cgit.freedesktop.org


  • Share