Commit 02cebdb0 authored by David Zeuthen's avatar David Zeuthen
Browse files

Deprecated PolkitBackendActionLookup



Instead, pass the untranslated message as polkit.message and set the
gettext domain on polkit.gettext_domain. For printf()-style messages,
occurences of the form $(name_of_key) in the translated version of
polkit.message are expanded with the value of the property
name_of_key. See the pkexec(1) mechanism for an example of how to use
this.

Additionally, the property polkit.icon_name can be set to the
icon. Note that not all authentication agents use this - in
particular, gnome-shell does not.

It is no longer possible to set the details to be shown in the
authentication dialog. It was never a good idea to hide information
there anyway. Instead, the mechanism should format a meaningful
message.
Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent 76792acc
......@@ -152,13 +152,21 @@
<programlisting>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../src/examples/org.freedesktop.policykit.examples.pkexec.policy"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
<para>
and drop it in
the <filename>/usr/share/polkit-1/actions</filename> directory
under a suitable name (e.g. matching the namespace of the
action). Note that in addition to specifying the program, the
and drop it in the
<filename>/usr/share/polkit-1/actions</filename> directory under
a suitable name (e.g. matching the namespace of the action).
Note that in addition to specifying the program, the
authentication message, description, icon and defaults can be
specified. For example, for the action defined above, the following
authentication dialog will be shown:
specified. Note that occurences of the strings
<literal>$(user)</literal>, <literal>$(program)</literal> and
<literal>$(command_line)</literal> in the message will be
replaced with respectively the user (of the form "Real Name
(username)" or just "username" if there is no real name for the
username), the binary to execute (a fully-qualified path,
e.g. "<literal>/usr/bin/pk-example-frobnicate</literal>") and
the command-line, e.g. "<literal>pk-example-frobnicate foo
bar</literal>". For example, for the action defined above, the
following authentication dialog will be shown:
</para>
<mediaobject id="pkexec-frobnicate">
<imageobject>
......
......@@ -87,9 +87,13 @@ The themed icon describing the action or the empty string if no icon is set.
<term><literal>IN Dict&lt;String,String&gt; <parameter>details</parameter></literal>:</term>
<listitem>
<para>
Details about the authentication request. This is a dictionary of key/value pairs where both key and value are strings. These strings are translated into the locale passed when registering the authentication agent using <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent">RegisterAuthenticationAgent()</link>.
Keys starting with <literal>polkit.</literal> are reserved for internal use and should never be displayed in the UI.
Known key/value-pairs include <literal>polkit.caller-pid</literal> (the process id of the mechanism making the authorization check) and <literal>polkit.subject-pid</literal> (the process id of the subject the check is for).
Details about the authentication request. This is a dictionary
of key/value pairs where both key and value are strings.
Known key/value-pairs include
<literal>polkit.caller-pid</literal> (the process id of the
mechanism making the authorization check) and
<literal>polkit.subject-pid</literal> (the process id of the
subject the check is for).
</para>
</listitem>
</varlistentry>
......
......@@ -571,7 +571,26 @@ CheckAuthorization (IN <link linkend="eggdbus-struct-Subject">Subject</link>
OUT <link linkend="eggdbus-struct-AuthorizationResult">AuthorizationResult</link> result)
</programlisting>
<para>
<para>Checks if <parameter>subject</parameter> is authorized to perform the action with identifier <parameter>action_id</parameter>.</para><para>If <parameter>cancellation_id</parameter> is non-empty and already in use for the caller, the <link linkend="eggdbus-constant-Error.org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique">org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique</link> error is returned.</para><para>Note that <link linkend="eggdbus-constant-CheckAuthorizationFlags.AllowUserInteraction">CheckAuthorizationFlags.AllowUserInteraction</link> SHOULD be passed ONLY if the event that triggered the authorization check is stemming from an user action, e.g. the user pressing a button or attaching a device.</para>
<para>
Checks if <parameter>subject</parameter> is authorized to
perform the action with identifier
<parameter>action_id</parameter>
</para>
<para>
If <parameter>cancellation_id</parameter> is non-empty and
already in use for the caller, the <link
linkend="eggdbus-constant-Error.org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique">org.freedesktop.PolicyKit1.Error.CancellationIdNotUnique</link>
error is returned.
</para>
<para>
Note that <link
linkend="eggdbus-constant-CheckAuthorizationFlags.AllowUserInteraction">CheckAuthorizationFlags.AllowUserInteraction</link>
SHOULD be passed ONLY if the event that triggered the
authorization check is stemming from an user action, e.g. the
user pressing a button or attaching a device.
</para>
<para>
</para>
</para>
<variablelist role="params">
<varlistentry>
......@@ -594,15 +613,27 @@ Identifier for the action that <parameter>subject</parameter> is attempting to d
<term><literal>IN Dict&lt;String,String&gt; <parameter>details</parameter></literal>:</term>
<listitem>
<para>
Details describing the action. Keys starting with <literal>polkit.</literal> are reserved for internal use and cannot be used.
Details describing the action. Keys starting with <literal>polkit.</literal> are can only be set if defined in this document.
</para>
<para>
Known keys include <literal>polkit.message</literal> and
<literal>polkit.message.gettext-domain</literal> that can be
used to override the message shown to the user (the user might
be running an authentication agent in another locale than the
calling process so that's why both the message and gettext
domain is needed.
<literal>polkit.gettext_domain</literal> that can be used to
override the message shown to the user. This latter is needed
because the user could be running an authentication agent in
another locale than the calling process.
</para>
<para>
The (translated version of) <literal>polkit.message</literal>
may include references to other keys that are expanded with
their respective values. For example if the key
<literal>device_file</literal> has the value
<literal>/dev/sda</literal> then the message
"<literal>Authenticate to format $(device_file)</literal>" is
expanded to "<literal>Authenticate to format
/dev/sda</literal>".
</para>
<para>
The key <literal>polkit.icon_name</literal> is used to override the icon shown in the authentication dialog.
</para>
<para>
If non-empty, then the request will fail with
......
......@@ -123,14 +123,5 @@
</para>
</formalpara>
<formalpara>
<title>POLKIT_BACKEND_ACTION_LOOKUP_EXTENSION_POINT_NAME</title>
<para>
Allows a mechanism to customize the contents of authentication
dialogs. Implementations of this extension point must
implement the #PolkitBackendActionLookup interface.
</para>
</formalpara>
</chapter>
</part>
......@@ -94,7 +94,6 @@
<xi:include href="xml/polkitbackendauthority.xml"/>
<xi:include href="xml/polkitbackendinteractiveauthority.xml"/>
<xi:include href="xml/polkitbackendlocalauthority.xml"/>
<xi:include href="xml/polkitbackendactionlookup.xml"/>
</part>
<part id="ref-authentication-agent-api">
......
......@@ -4,4 +4,4 @@
actions/org.freedesktop.policykit.policy.in
src/examples/org.freedesktop.policykit.examples.pkexec.policy.in
src/polkitbackend/polkitbackendlocalauthority.c
src/programs/pkexec-action-lookup.c
src/programs/pkexec.c
......@@ -8,86 +8,58 @@ msgid ""
msgstr ""
"Project-Id-Version: DeviceKit-disks\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-15 13:45-0400\n"
"PO-Revision-Date: 2009-05-12 17:01-0400\n"
"POT-Creation-Date: 2011-03-03 13:03-0500\n"
"PO-Revision-Date: 2011-03-03 13:05-0500\n"
"Last-Translator: David Zeuthen <davidz@redhat.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../actions/org.freedesktop.policykit.policy.in.h:1
msgid "Authentication is required to grant authorizations to other users"
msgstr "Autorisering er påkrævet for at autorisere andre brugere"
msgid "Authentication is required to configure lock down policy"
msgstr "Autorisering er påkrævet for at konfigurer lock down"
#: ../actions/org.freedesktop.policykit.policy.in.h:2
msgid ""
"Authentication is required to modify the defaults for implicit authorizations"
msgstr "Autorisering er påkrævet for ændre implicit autorisering"
#: ../actions/org.freedesktop.policykit.policy.in.h:3
msgid "Authentication is required to read authorizations of other users"
msgstr "Autorisering er påkrævet for at læse andre brugers autoriseringer"
#: ../actions/org.freedesktop.policykit.policy.in.h:4
msgid "Authentication is required to revoke authorizations other users"
msgstr ""
"Autorisering er påkrævet for at fjerne en autosering fra en anden bruger"
#: ../actions/org.freedesktop.policykit.policy.in.h:5
msgid "Authentication is required to run a program as another user"
msgstr "Autorisering er påkrævet for at afvikle et program som en anden bruger"
#: ../actions/org.freedesktop.policykit.policy.in.h:6
msgid "Grant authorizations to other users"
msgstr "Autoriser en anden bruger"
#: ../actions/org.freedesktop.policykit.policy.in.h:7
msgid "Modify defaults for implicit authorizations"
msgstr "Konfigurer implicit autorisering"
#: ../actions/org.freedesktop.policykit.policy.in.h:8
msgid "Read authorizations of other users"
msgstr "Læs andre brugers autoriseringer"
#: ../actions/org.freedesktop.policykit.policy.in.h:9
msgid "Revoke authorizations from other users"
msgstr "Fjern autorisering fra en anden bruger"
#: ../actions/org.freedesktop.policykit.policy.in.h:3
msgid "Configure lock down for an action"
msgstr "Konfigurer lock down for en action"
#: ../actions/org.freedesktop.policykit.policy.in.h:10
#: ../actions/org.freedesktop.policykit.policy.in.h:4
msgid "Run programs as another user"
msgstr "Kør et program som en anden bruger"
#: ../src/examples/org.freedesktop.policykit.examples.pkexec.policy.in.h:1
msgid ""
"Authentication is required to run the PolicyKit example program Frobnicate"
msgstr "Autorisering er påkrævet for at afvikle PolicyKit eksemplet Frobnicate"
"Authentication is required to run the PolicyKit example program Frobnicate "
"(user=$(user), program=$(program), command_line=$(command_line))"
msgstr ""
"Autorisering er påkrævet for at afvikle PolicyKit eksemplet Frobnicate (user="
"$(user), program=$(program), command_line=$(command_line))"
#: ../src/examples/org.freedesktop.policykit.examples.pkexec.policy.in.h:2
msgid "Run the PolicyKit example program Frobnicate"
msgstr "Kør PolicyKit eksemplet Frobnicate"
#. Translator: %s is a fully qualified path to the executable
#: ../src/programs/pkexec-action-lookup.c:110
#, c-format
msgid "Authentication is needed to run `%s' as the super user"
msgstr "Autorisering er påkrævet for at afvikle `%s' som super bruger"
#. Translator: %s is a fully qualified path to the executable
#: ../src/programs/pkexec-action-lookup.c:115
#, c-format
msgid "Authentication is needed to run `%s' as another user"
msgstr "Autorisering er påkrævet for at afvikle `%s' som en anden bruger"
#: ../src/programs/pkexec-action-lookup.c:159
msgid "Command"
msgstr "Program"
#: ../src/programs/pkexec-action-lookup.c:168
msgid "Super User (root)"
msgstr "Super Bruger (root)"
#: ../src/programs/pkexec-action-lookup.c:170
msgid "Run As"
msgstr "Bruger"
#. Translators: message shown when trying to run a program as root. Do not
#. * translate the $(program) fragment - it will be expanded to the path
#. * of the program e.g. /bin/bash.
#.
#: ../src/programs/pkexec.c:666
msgid "Authentication is needed to run `$(program)' as the super user"
msgstr "Autorisering er påkrævet for at afvikle `$(program)' som super bruger"
#. Translators: message shown when trying to run a program as another user.
#. * Do not translate the $(program) or $(user) fragments - the former will
#. * be expanded to the path of the program e.g. "/bin/bash" and the latter
#. * to the user e.g. "John Doe (johndoe)" or "johndoe".
#.
#: ../src/programs/pkexec.c:676
msgid "Authentication is needed to run `$(program)' as user $(user)"
msgstr ""
"Autorisering er påkrævet for at afvikle `$(program)' som bruger $(user)"
......@@ -9,7 +9,7 @@
<action id="org.freedesktop.policykit.example.pkexec.run-frobnicate">
<_description>Run the PolicyKit example program Frobnicate</_description>
<_message>Authentication is required to run the PolicyKit example program Frobnicate</_message>
<_message>Authentication is required to run the PolicyKit example program Frobnicate (user=$(user), program=$(program), command_line=$(command_line))</_message>
<icon_name>audio-x-generic</icon_name> <!-- just an example -->
<defaults>
<allow_any>no</allow_any>
......
......@@ -846,9 +846,7 @@ check_authorization_cb (GDBusProxy *proxy,
* @authority: A #PolkitAuthority.
* @subject: A #PolkitSubject.
* @action_id: The action to check for.
* @details: (allow-none): Details about the action or %NULL. Keys
* starting with <literal>polkit.</literal> are reserved for internal
* use and cannot be used.
* @details: (allow-none): Details about the action or %NULL.
* @flags: A set of #PolkitCheckAuthorizationFlags.
* @cancellable: (allow-none): A #GCancellable or %NULL.
* @callback: A #GAsyncReadyCallback to call when the request is satisfied.
......@@ -871,11 +869,9 @@ check_authorization_cb (GDBusProxy *proxy,
* the operation.
*
* Known keys in @details include <literal>polkit.message</literal>
* and <literal>polkit.message.gettext-domain</literal> that can be
* used to override the message shown to the user (the user might be
* running an authentication agent in another locale than the calling
* process so that's why both the message and gettext domain is
* needed).
* and <literal>polkit.gettext_domain</literal> that can be used to
* override the message shown to the user. See the documentation for
* the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">D-Bus method</link> for more details.
*
* If @details is non-empty then the request will fail with
* #POLKIT_ERROR_FAILED unless the process doing the check itsef is
......@@ -972,9 +968,7 @@ polkit_authority_check_authorization_finish (PolkitAuthority *authority
* @authority: A #PolkitAuthority.
* @subject: A #PolkitSubject.
* @action_id: The action to check for.
* @details: (allow-none): Details about the action or %NULL. Keys
* starting with <literal>polkit.</literal> are reserved for internal
* use and cannot be used.
* @details: (allow-none): Details about the action or %NULL.
* @flags: A set of #PolkitCheckAuthorizationFlags.
* @cancellable: (allow-none): A #GCancellable or %NULL.
* @error: (allow-none): Return location for error or %NULL.
......@@ -996,8 +990,10 @@ polkit_authority_check_authorization_finish (PolkitAuthority *authority
* operation to complete because it involves waiting for the user to
* authenticate.
*
* See polkit_authority_check_authorization_sync() for how @details is
* handled.
* Known keys in @details include <literal>polkit.message</literal>
* and <literal>polkit.gettext_domain</literal> that can be used to
* override the message shown to the user. See the documentation for
* the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">D-Bus method</link> for more details.
*
* Returns: (transfer full): A #PolkitAuthorizationResult or %NULL if @error is set. Free with g_object_unref().
*/
......
......@@ -23,6 +23,9 @@
#include <errno.h>
#include <pwd.h>
#include <string.h>
#define _POLKIT_BACKEND_ACTION_LOOKUP_NO_DEPRECATED_WARNING
#include <polkit/polkit.h>
#include <polkit/polkitprivate.h>
#include "polkitbackendactionlookup.h"
......
......@@ -88,6 +88,7 @@ struct _PolkitBackendActionLookupIface
PolkitActionDescription *action_description);
};
#ifdef _POLKIT_BACKEND_ACTION_LOOKUP_NO_DEPRECATED_WARNING
GType polkit_backend_action_lookup_get_type (void) G_GNUC_CONST;
gchar *polkit_backend_action_lookup_get_message (PolkitBackendActionLookup *lookup,
const gchar *action_id,
......@@ -101,6 +102,21 @@ PolkitDetails *polkit_backend_action_lookup_get_details (PolkitBackendActionLo
const gchar *action_id,
PolkitDetails *details,
PolkitActionDescription *action_description);
#else
GType polkit_backend_action_lookup_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED_FOR (use_PolkitDetails_instead);
gchar *polkit_backend_action_lookup_get_message (PolkitBackendActionLookup *lookup,
const gchar *action_id,
PolkitDetails *details,
PolkitActionDescription *action_description) G_GNUC_DEPRECATED_FOR (use_PolkitDetails_instead);
gchar *polkit_backend_action_lookup_get_icon_name (PolkitBackendActionLookup *lookup,
const gchar *action_id,
PolkitDetails *details,
PolkitActionDescription *action_description) G_GNUC_DEPRECATED_FOR (use_PolkitDetails_instead);
PolkitDetails *polkit_backend_action_lookup_get_details (PolkitBackendActionLookup *lookup,
const gchar *action_id,
PolkitDetails *details,
PolkitActionDescription *action_description) G_GNUC_DEPRECATED_FOR (use_PolkitDetails_instead);
#endif
G_END_DECLS
......
......@@ -30,7 +30,6 @@
#include <polkit/polkitprivate.h>
#include "polkitbackendauthority.h"
#include "polkitbackendactionlookup.h"
#include "polkitbackendlocalauthority.h"
#include "polkitbackendprivate.h"
......@@ -1291,7 +1290,6 @@ PolkitBackendAuthority *
polkit_backend_authority_get (void)
{
static GIOExtensionPoint *ep = NULL;
static GIOExtensionPoint *ep_action_lookup = NULL;
static volatile GType local_authority_type = G_TYPE_INVALID;
GList *modules;
GList *authority_implementations;
......@@ -1305,11 +1303,6 @@ polkit_backend_authority_get (void)
ep = g_io_extension_point_register (POLKIT_BACKEND_AUTHORITY_EXTENSION_POINT_NAME);
g_io_extension_point_set_required_type (ep, POLKIT_BACKEND_TYPE_AUTHORITY);
}
if (ep_action_lookup == NULL)
{
ep_action_lookup = g_io_extension_point_register (POLKIT_BACKEND_ACTION_LOOKUP_EXTENSION_POINT_NAME);
g_io_extension_point_set_required_type (ep_action_lookup, POLKIT_BACKEND_TYPE_ACTION_LOOKUP);
}
/* make sure local types are registered */
if (local_authority_type == G_TYPE_INVALID)
......
......@@ -32,7 +32,6 @@
#include "polkitbackendactionpool.h"
#include "polkitbackendsessionmonitor.h"
#include "polkitbackendconfigsource.h"
#include "polkitbackendactionlookup.h"
#include <polkit/polkitprivate.h>
......@@ -1693,35 +1692,81 @@ authentication_agent_begin_cb (GDBusProxy *proxy,
authentication_session_free (session);
}
static GList *
get_action_lookup_list (void)
static void
append_property (GString *dest,
PolkitDetails *details,
const gchar *key,
PolkitBackendInteractiveAuthority *authority,
const gchar *message,
const gchar *action_id)
{
GList *extensions;
GList *l;
GIOExtensionPoint *action_lookup_ep;
static GList *action_lookup_list = NULL;
static gboolean have_looked_up_extensions = FALSE;
const gchar *value;
if (have_looked_up_extensions)
goto out;
value = polkit_details_lookup (details, key);
if (value != NULL)
{
g_string_append (dest, value);
}
else
{
polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
"Error substituting value for property $(%s) when preparing message `%s' for action-id %s",
key,
message,
action_id);
g_string_append (dest, "$(");
g_string_append (dest, key);
g_string_append (dest, ")");
}
}
static gchar *
expand_properties (const gchar *message,
PolkitDetails *details,
PolkitBackendInteractiveAuthority *authority,
const gchar *action_id)
{
GString *ret;
GString *var;
guint n;
gboolean in_resolve;
action_lookup_ep = g_io_extension_point_lookup (POLKIT_BACKEND_ACTION_LOOKUP_EXTENSION_POINT_NAME);
g_assert (action_lookup_ep != NULL);
ret = g_string_new (NULL);
var = g_string_new (NULL);
extensions = g_io_extension_point_get_extensions (action_lookup_ep);
for (l = extensions; l != NULL; l = l->next)
in_resolve = FALSE;
for (n = 0; message[n] != '\0'; n++)
{
GIOExtension *extension = l->data;
PolkitBackendActionLookup *lookup;
lookup = g_object_new (g_io_extension_get_type (extension), NULL);
action_lookup_list = g_list_prepend (action_lookup_list, lookup);
gint c = message[n];
if (c == '$' && message[n+1] == '(')
{
in_resolve = TRUE;
n += 1;
}
else
{
if (in_resolve)
{
if (c == ')')
{
append_property (ret, details, var->str, authority, message, action_id);
g_string_set_size (var, 0);
in_resolve = FALSE;
}
else
{
g_string_append_c (var, c);
}
}
else
{
g_string_append_c (ret, c);
}
}
}
action_lookup_list = g_list_reverse (action_lookup_list);
g_string_free (var, TRUE);
out:
have_looked_up_extensions = TRUE;
return action_lookup_list;
return g_string_free (ret, FALSE);
}
static void
......@@ -1738,12 +1783,12 @@ get_localized_data_for_challenge (PolkitBackendInteractiveAuthority *authority,
{
PolkitBackendInteractiveAuthorityPrivate *priv;
PolkitActionDescription *action_desc;
GList *action_lookup_list;
GList *l;
gchar *message;
gchar *icon_name;
PolkitDetails *localized_details;
const gchar *message_to_use;
const gchar *gettext_domain;
gchar *s;
priv = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_GET_PRIVATE (authority);
......@@ -1762,52 +1807,21 @@ get_localized_data_for_challenge (PolkitBackendInteractiveAuthority *authority,
if (action_desc == NULL)
goto out;
/* Set LANG and locale so gettext() + friends work when running the code in the extensions */
/* Set LANG and locale so g_dgettext() + friends work below */
if (setlocale (LC_ALL, locale) == NULL)
{
g_printerr ("Invalid locale '%s'\n", locale);
}
g_setenv ("LANG", locale, TRUE);
gettext_domain = polkit_details_lookup (details, "polkit.gettext_domain");
message_to_use = polkit_details_lookup (details, "polkit.message");
if (message_to_use != NULL)
{
const gchar *gettext_domain;
gettext_domain = polkit_details_lookup (details, "polkit.message.gettext-domain");
message = g_strdup (g_dgettext (gettext_domain, message_to_use));
/* g_print ("locale=%s, domain=%s, msg=`%s' -> `%s'\n", locale, gettext_domain, message_to_use, message); */
}
/* call into extension points to get localized auth dialog data - the list is sorted by priority */
action_lookup_list = get_action_lookup_list ();
for (l = action_lookup_list; l != NULL; l = l->next)
{
PolkitBackendActionLookup *lookup = POLKIT_BACKEND_ACTION_LOOKUP (l->data);
if (message != NULL && icon_name != NULL && localized_details != NULL)
break;
if (message == NULL)
message = polkit_backend_action_lookup_get_message (lookup,
action_id,
details,
action_desc);
if (icon_name == NULL)
icon_name = polkit_backend_action_lookup_get_icon_name (lookup,
action_id,
details,
action_desc);
if (localized_details == NULL)
localized_details = polkit_backend_action_lookup_get_details (lookup,
action_id,
details,
action_desc);
}
/* Back to C! */
setlocale (LC_ALL, "C");
g_setenv ("LANG", "C", TRUE);
icon_name = g_strdup (polkit_details_lookup (details, "polkit.icon_name"));
/* fall back to action description */
if (message == NULL)
......@@ -1819,6 +1833,15 @@ get_localized_data_for_challenge (PolkitBackendInteractiveAuthority *authority,
icon_name = g_strdup (polkit_action_description_get_icon_name (action_desc));
}
/* replace $(property) with values */
s = message;
message = expand_properties (message, details, authority, action_id);
g_free (s);
/* Back to C! */
setlocale (LC_ALL, "C");
g_setenv ("LANG", "C", TRUE);
out:
if (message == NULL)
message = g_strdup ("");
......@@ -1956,6 +1979,8 @@ authentication_agent_initiate_challenge (AuthenticationAgent *agent,
agent->active_sessions = g_list_prepend (agent->active_sessions, session);
if (localized_details == NULL)
localized_details = polkit_details_new ();
add_pid (localized_details, caller, "polkit.caller-pid");
add_pid (localized_details, subject, "polkit.subject-pid");
......
......@@ -32,7 +32,6 @@
#include "polkitbackendconfigsource.h"
#include "polkitbackendlocalauthority.h"
#include "polkitbackendlocalauthorizationstore.h"
#include "polkitbackendactionlookup.h"
#include <polkit/polkitprivate.h>
......
......@@ -34,28 +34,6 @@ pkexec_LDADD = \
$(top_builddir)/src/polkitagent/libpolkit-agent-1.la \
$(NULL)
polkitmodulesdir = $(libdir)/polkit-1/extensions
polkitmodules_LTLIBRARIES = libpkexec-action-lookup.la
libpkexec_action_lookup_la_SOURCES = \