settings: port NMAgentManager, etc, to use NMAuthSubject
Rather than explicitly passing around a UID and a flag saying whether or not it's relevant. (This also fixes a bug where the wrong UID was being recorded in nm-settings-connection.c::auth_start(), which caused problems such as agent-owned secrets not getting saved because of a perceived UID mismatch.)
This commit is contained in:
@@ -105,7 +105,6 @@ nm_act_request_get_secrets (NMActRequest *self,
|
||||
GetSecretsInfo *info;
|
||||
guint32 call_id;
|
||||
NMConnection *connection;
|
||||
gboolean user_requested;
|
||||
const char *hints[2] = { hint, NULL };
|
||||
|
||||
g_return_val_if_fail (self, 0);
|
||||
@@ -118,14 +117,12 @@ nm_act_request_get_secrets (NMActRequest *self,
|
||||
info->callback = callback;
|
||||
info->callback_data = callback_data;
|
||||
|
||||
user_requested = nm_active_connection_get_user_requested (NM_ACTIVE_CONNECTION (self));
|
||||
if (user_requested)
|
||||
if (nm_active_connection_get_user_requested (NM_ACTIVE_CONNECTION (self)))
|
||||
flags |= NM_SETTINGS_GET_SECRETS_FLAG_USER_REQUESTED;
|
||||
|
||||
connection = nm_active_connection_get_connection (NM_ACTIVE_CONNECTION (self));
|
||||
call_id = nm_settings_connection_get_secrets (NM_SETTINGS_CONNECTION (connection),
|
||||
user_requested,
|
||||
nm_active_connection_get_user_uid (NM_ACTIVE_CONNECTION (self)),
|
||||
nm_active_connection_get_subject (NM_ACTIVE_CONNECTION (self)),
|
||||
setting_name,
|
||||
flags,
|
||||
hints,
|
||||
|
Reference in New Issue
Block a user