Commit 5e22ce5f authored by Zeeshan Ali's avatar Zeeshan Ali

service: Allow absence of agent if agent white-list empty

If no agent is white-listed in the configuration, there is no point in
requiring an agent.

Fixes #74.
parent ddb123d8
......@@ -497,14 +497,23 @@ handle_pending_auth (gpointer user_data)
uid = gclue_client_info_get_user_id (priv->client_info);
if (priv->agent_proxy == NULL) {
g_dbus_method_invocation_return_error (data->invocation,
G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"'%s' disallowed, no agent "
"for UID %u",
data->desktop_id,
uid);
start_data_free (data);
GClueConfig *config = gclue_config_get_singleton ();
if (gclue_config_get_num_allowed_agents (config) == 0) {
/* If there are no white-listed agents, there is no
* point in requiring an agent */
complete_start (data);
} else {
g_dbus_method_invocation_return_error
(data->invocation,
G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"'%s' disallowed, no agent "
"for UID %u",
data->desktop_id,
uid);
start_data_free (data);
}
} else {
handle_post_agent_check_auth (data);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment