<term><literal>Dict<String,String> <structfield>details</structfield></literal></term>
<listitem>
<para>
-Details for the result or empty if not authorized. Known key/value-pairs include <literal>polkit.temporary_authorization_id</literal> (if the authorization is temporary, this is set to the opaque temporary authorization id), <literal>polkit.retains_authorization_after_challenge</literal> (Set to a non-empty string if the authorization will be retained after authentication (if is_challenge is TRUE)), <literal>polkit.dismissed</literal> (Set to a non-empty string if the authentication dialog was dismissed by the user).
+Details for the result. Known key/value-pairs include <literal>polkit.temporary_authorization_id</literal> (if the authorization is temporary, this is set to the opaque temporary authorization id), <literal>polkit.retains_authorization_after_challenge</literal> (Set to a non-empty string if the authorization will be retained after authentication (if is_challenge is TRUE)), <literal>polkit.dismissed</literal> (Set to a non-empty string if the authentication dialog was dismissed by the user).
</para>
</listitem>
</varlistentry>
gchar *authenticated_identity_str;
gchar *subject_cmdline;
gboolean is_temp;
+ PolkitDetails *details;
priv = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_GET_PRIVATE (authority);
was_dismissed,
authentication_success);
+ details = polkit_details_new ();
+ if (implicit_authorization == POLKIT_IMPLICIT_AUTHORIZATION_AUTHENTICATION_REQUIRED_RETAINED ||
+ implicit_authorization == POLKIT_IMPLICIT_AUTHORIZATION_ADMINISTRATOR_AUTHENTICATION_REQUIRED_RETAINED)
+ polkit_details_insert (details, "polkit.retains_authorization_after_challenge", "true");
+
is_temp = FALSE;
if (authentication_success)
{
- PolkitDetails *details;
-
- details = polkit_details_new ();
-
/* store temporary authorization depending on value of implicit_authorization */
if (implicit_authorization == POLKIT_IMPLICIT_AUTHORIZATION_AUTHENTICATION_REQUIRED_RETAINED ||
implicit_authorization == POLKIT_IMPLICIT_AUTHORIZATION_ADMINISTRATOR_AUTHENTICATION_REQUIRED_RETAINED)
/* we've added a temporary authorization, let the user know */
g_signal_emit_by_name (authority, "changed");
}
-
result = polkit_authorization_result_new (TRUE, FALSE, details);
- g_object_unref (details);
}
else
{
- PolkitDetails *details;
-
/* TODO: maybe return set is_challenge? */
-
- details = polkit_details_new ();
if (was_dismissed)
polkit_details_insert (details, "polkit.dismissed", "true");
result = polkit_authorization_result_new (FALSE, FALSE, details);
- g_object_unref (details);
}
/* Log the event */
/* log_result (authority, action_id, subject, caller, result); */
+ g_object_unref (details);
g_simple_async_result_set_op_res_gpointer (simple,
result,
g_object_unref);