diff options
| author | Sjoerd Simons <sjoerd@luon.net> | 2013-10-25 21:20:58 +0200 |
|---|---|---|
| committer | Sjoerd Simons <sjoerd@luon.net> | 2013-10-25 21:20:58 +0200 |
| commit | a4256940da049f91bbbea5e53e469a59ea9c10f7 (patch) | |
| tree | 2211c102aea3a33f34f960f48c8b8a55daccd97b /src/settings/nm-agent-manager.c | |
| parent | 8d275584fc94f398f0a7c990dcd057533d9a5856 (diff) | |
Imported Upstream version 0.9.8.8 upstream/0.9.8.8
Diffstat (limited to 'src/settings/nm-agent-manager.c')
| -rw-r--r-- | src/settings/nm-agent-manager.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c index d9199f51..531fabc5 100644 --- a/src/settings/nm-agent-manager.c +++ b/src/settings/nm-agent-manager.c @@ -262,10 +262,11 @@ impl_agent_manager_register (NMAgentManager *self, goto done; } - if (!nm_session_monitor_uid_has_session (priv->session_monitor, - sender_uid, - NULL, - &local)) { + if ( 0 != sender_uid + && !nm_session_monitor_uid_has_session (priv->session_monitor, + sender_uid, + NULL, + &local)) { error = g_error_new_literal (NM_AGENT_MANAGER_ERROR, NM_AGENT_MANAGER_ERROR_SESSION_NOT_FOUND, local && local->message ? local->message : "Session not found"); @@ -552,15 +553,12 @@ request_add_agent (Request *req, * or that the permissions is empty (ie, visible by everyone). */ agent_uid = nm_secret_agent_get_owner_uid (agent); - if (0 != agent_uid) { - if (!nm_auth_uid_in_acl (req->connection, session_monitor, agent_uid, NULL)) { - nm_log_dbg (LOGD_AGENTS, "(%s) agent ignored for secrets request %p/%s (not in ACL)", - nm_secret_agent_get_description (agent), - req, req->setting_name); - /* Connection not visible to this agent's user */ - return; - } - /* Caller is allowed to manipulate this connection */ + if (!nm_auth_uid_in_acl (req->connection, session_monitor, agent_uid, NULL)) { + nm_log_dbg (LOGD_AGENTS, "(%s) agent ignored for secrets request %p/%s (not in ACL)", + nm_secret_agent_get_description (agent), + req, req->setting_name); + /* Connection not visible to this agent's user */ + return; } /* If the request should filter agents by UID, do that now */ |