core: remove unused argument to nm_auth_chain_new()
This commit is contained in:
@@ -106,7 +106,6 @@ pk_authority_get (GError **error)
|
||||
|
||||
static NMAuthChain *
|
||||
_auth_chain_new (DBusGMethodInvocation *context,
|
||||
DBusGProxy *proxy,
|
||||
DBusMessage *message,
|
||||
const char *dbus_sender,
|
||||
gulong user_uid,
|
||||
@@ -115,7 +114,7 @@ _auth_chain_new (DBusGMethodInvocation *context,
|
||||
{
|
||||
NMAuthChain *self;
|
||||
|
||||
g_return_val_if_fail (context || proxy || message || dbus_sender, NULL);
|
||||
g_return_val_if_fail (context || message || dbus_sender, NULL);
|
||||
|
||||
self = g_malloc0 (sizeof (NMAuthChain));
|
||||
self->refcount = 1;
|
||||
@@ -128,9 +127,7 @@ _auth_chain_new (DBusGMethodInvocation *context,
|
||||
self->context = context;
|
||||
self->user_uid = user_uid;
|
||||
|
||||
if (proxy)
|
||||
self->owner = g_strdup (dbus_g_proxy_get_bus_name (proxy));
|
||||
else if (context)
|
||||
if (context)
|
||||
self->owner = dbus_g_method_get_sender (context);
|
||||
else if (message)
|
||||
self->owner = g_strdup (dbus_message_get_sender (message));
|
||||
@@ -149,12 +146,11 @@ _auth_chain_new (DBusGMethodInvocation *context,
|
||||
|
||||
NMAuthChain *
|
||||
nm_auth_chain_new (DBusGMethodInvocation *context,
|
||||
DBusGProxy *proxy,
|
||||
gulong user_uid,
|
||||
NMAuthChainResultFunc done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
return _auth_chain_new (context, proxy, NULL, NULL, user_uid, done_func, user_data);
|
||||
return _auth_chain_new (context, NULL, NULL, user_uid, done_func, user_data);
|
||||
}
|
||||
|
||||
NMAuthChain *
|
||||
@@ -163,7 +159,7 @@ nm_auth_chain_new_raw_message (DBusMessage *message,
|
||||
NMAuthChainResultFunc done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
return _auth_chain_new (NULL, NULL, message, NULL, user_uid, done_func, user_data);
|
||||
return _auth_chain_new (NULL, message, NULL, user_uid, done_func, user_data);
|
||||
}
|
||||
|
||||
NMAuthChain *
|
||||
@@ -172,7 +168,7 @@ nm_auth_chain_new_dbus_sender (const char *dbus_sender,
|
||||
NMAuthChainResultFunc done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
return _auth_chain_new (NULL, NULL, NULL, dbus_sender, user_uid, done_func, user_data);
|
||||
return _auth_chain_new (NULL, NULL, dbus_sender, user_uid, done_func, user_data);
|
||||
}
|
||||
|
||||
gpointer
|
||||
|
@@ -56,7 +56,6 @@ typedef void (*NMAuthChainResultFunc) (NMAuthChain *chain,
|
||||
gpointer user_data);
|
||||
|
||||
NMAuthChain *nm_auth_chain_new (DBusGMethodInvocation *context,
|
||||
DBusGProxy *proxy,
|
||||
gulong user_uid,
|
||||
NMAuthChainResultFunc done_func,
|
||||
gpointer user_data);
|
||||
|
@@ -915,7 +915,6 @@ pending_activation_check_authorized (PendingActivation *pending,
|
||||
* the user a chance to authenticate to gain the permission.
|
||||
*/
|
||||
pending->chain = nm_auth_chain_new (pending->context,
|
||||
NULL,
|
||||
sender_uid,
|
||||
pending_auth_done,
|
||||
pending);
|
||||
@@ -1782,7 +1781,7 @@ device_auth_request_cb (NMDevice *device,
|
||||
}
|
||||
|
||||
/* Validate the request */
|
||||
chain = nm_auth_chain_new (context, NULL, sender_uid, device_auth_done_cb, self);
|
||||
chain = nm_auth_chain_new (context, sender_uid, device_auth_done_cb, self);
|
||||
g_assert (chain);
|
||||
priv->auth_chains = g_slist_append (priv->auth_chains, chain);
|
||||
|
||||
@@ -3242,7 +3241,7 @@ impl_manager_deactivate_connection (NMManager *self,
|
||||
}
|
||||
|
||||
/* Otherwise validate the user request */
|
||||
chain = nm_auth_chain_new (context, NULL, sender_uid, deactivate_net_auth_done_cb, self);
|
||||
chain = nm_auth_chain_new (context, sender_uid, deactivate_net_auth_done_cb, self);
|
||||
g_assert (chain);
|
||||
priv->auth_chains = g_slist_append (priv->auth_chains, chain);
|
||||
|
||||
@@ -3420,7 +3419,7 @@ impl_manager_sleep (NMManager *self,
|
||||
return;
|
||||
}
|
||||
|
||||
chain = nm_auth_chain_new (context, NULL, sender_uid, sleep_auth_done_cb, self);
|
||||
chain = nm_auth_chain_new (context, sender_uid, sleep_auth_done_cb, self);
|
||||
g_assert (chain);
|
||||
priv->auth_chains = g_slist_append (priv->auth_chains, chain);
|
||||
nm_auth_chain_set_data (chain, "sleep", GUINT_TO_POINTER (do_sleep), NULL);
|
||||
@@ -3549,7 +3548,7 @@ impl_manager_enable (NMManager *self,
|
||||
return;
|
||||
}
|
||||
|
||||
chain = nm_auth_chain_new (context, NULL, sender_uid, enable_net_done_cb, self);
|
||||
chain = nm_auth_chain_new (context, sender_uid, enable_net_done_cb, self);
|
||||
g_assert (chain);
|
||||
priv->auth_chains = g_slist_append (priv->auth_chains, chain);
|
||||
|
||||
@@ -3637,7 +3636,7 @@ impl_manager_get_permissions (NMManager *self,
|
||||
dbus_g_method_return_error (context, error);
|
||||
g_error_free (error);
|
||||
} else {
|
||||
chain = nm_auth_chain_new (context, NULL, sender_uid, get_permissions_done_cb, self);
|
||||
chain = nm_auth_chain_new (context, sender_uid, get_permissions_done_cb, self);
|
||||
g_assert (chain);
|
||||
priv->auth_chains = g_slist_append (priv->auth_chains, chain);
|
||||
|
||||
|
@@ -316,7 +316,7 @@ impl_agent_manager_register (NMAgentManager *self,
|
||||
nm_secret_agent_get_description (agent));
|
||||
|
||||
/* Kick off permissions requests for this agent */
|
||||
chain = nm_auth_chain_new (context, NULL, sender_uid, agent_register_permissions_done, self);
|
||||
chain = nm_auth_chain_new (context, sender_uid, agent_register_permissions_done, self);
|
||||
g_assert (chain);
|
||||
priv->chains = g_slist_append (priv->chains, chain);
|
||||
nm_auth_chain_set_data (chain, "agent", agent, g_object_unref);
|
||||
|
@@ -984,7 +984,7 @@ auth_start (NMSettingsConnection *self,
|
||||
}
|
||||
|
||||
if (check_permission) {
|
||||
chain = nm_auth_chain_new (context, NULL, sender_uid, pk_auth_cb, self);
|
||||
chain = nm_auth_chain_new (context, sender_uid, pk_auth_cb, self);
|
||||
g_assert (chain);
|
||||
priv->pending_auths = g_slist_append (priv->pending_auths, chain);
|
||||
|
||||
|
@@ -1169,7 +1169,7 @@ nm_settings_add_connection (NMSettings *self,
|
||||
perm = NM_AUTH_PERMISSION_SETTINGS_MODIFY_SYSTEM;
|
||||
|
||||
/* Otherwise validate the user request */
|
||||
chain = nm_auth_chain_new (context, NULL, caller_uid, pk_add_cb, self);
|
||||
chain = nm_auth_chain_new (context, caller_uid, pk_add_cb, self);
|
||||
g_assert (chain);
|
||||
priv->auths = g_slist_append (priv->auths, chain);
|
||||
nm_auth_chain_add_call (chain, perm, TRUE);
|
||||
@@ -1274,7 +1274,7 @@ impl_settings_save_hostname (NMSettings *self,
|
||||
NM_SETTINGS_ERROR_PERMISSION_DENIED,
|
||||
"Unable to determine request UID.");
|
||||
} else {
|
||||
chain = nm_auth_chain_new (context, NULL, sender_uid, pk_hostname_cb, self);
|
||||
chain = nm_auth_chain_new (context, sender_uid, pk_hostname_cb, self);
|
||||
g_assert (chain);
|
||||
priv->auths = g_slist_append (priv->auths, chain);
|
||||
nm_auth_chain_add_call (chain, NM_AUTH_PERMISSION_SETTINGS_MODIFY_HOSTNAME, TRUE);
|
||||
|
Reference in New Issue
Block a user