diff options
author | David Zeuthen <davidz@redhat.com> | 2009-05-13 10:58:04 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2009-05-13 10:58:04 -0400 |
commit | 86008e618476834c040bf7db40bbc887cca2fbb5 (patch) | |
tree | d1bf9e9c6e4d1732c2afcc118d623e22901fcfc7 /src/polkitagent | |
parent | e80ede9e28ef889cd7592b4e6cab3708d63faa22 (diff) | |
download | polkit-86008e618476834c040bf7db40bbc887cca2fbb5.tar.gz |
Only allow privileged apps to check authz and add ActionLookup interface
Also remove the ObtainAuthorization() call and allow apps to pass
details to CheckAuthorization.
Diffstat (limited to 'src/polkitagent')
-rw-r--r-- | src/polkitagent/polkitagentlistener.c | 16 | ||||
-rw-r--r-- | src/polkitagent/polkitagentlistener.h | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/polkitagent/polkitagentlistener.c b/src/polkitagent/polkitagentlistener.c index 23300a3..fb59b68 100644 --- a/src/polkitagent/polkitagentlistener.c +++ b/src/polkitagent/polkitagentlistener.c @@ -104,6 +104,7 @@ server_register (Server *server, local_error = NULL; if (!polkit_authority_register_authentication_agent_sync (server->authority, server->session_id, + g_getenv ("LANG"), server->object_path, NULL, &local_error)) @@ -358,6 +359,9 @@ auth_cb (GObject *source_object, static void handle_begin_authentication (_PolkitAuthenticationAgent *instance, const gchar *action_id, + const gchar *message, + const gchar *icon_name, + EggDBusHashMap *details, const gchar *cookie, EggDBusArraySeq *identities, EggDBusMethodInvocation *method_invocation) @@ -389,6 +393,9 @@ handle_begin_authentication (_PolkitAuthenticationAgent *instance, polkit_agent_listener_initiate_authentication (server->listener, action_id, + message, + icon_name, + details->data, cookie, list, data->cancellable, @@ -447,6 +454,9 @@ polkit_agent_listener_class_init (PolkitAgentListenerClass *klass) * polkit_agent_listener_initiate_authentication: * @listener: A #PolkitAgentListener. * @action_id: The action to authenticate for. + * @message: The message to present to the user. + * @icon_name: A themed icon name representing the action or %NULL. + * @details: A set of key/value string pairs describing the action. * @cookie: The cookie for the authentication request. * @identities: A list of #PolkitIdentity objects that the user can choose to authenticate as. * @cancellable: A #GCancellable. @@ -467,6 +477,9 @@ polkit_agent_listener_class_init (PolkitAgentListenerClass *klass) void polkit_agent_listener_initiate_authentication (PolkitAgentListener *listener, const gchar *action_id, + const gchar *message, + const gchar *icon_name, + GHashTable *details, const gchar *cookie, GList *identities, GCancellable *cancellable, @@ -475,6 +488,9 @@ polkit_agent_listener_initiate_authentication (PolkitAgentListener *listener, { POLKIT_AGENT_LISTENER_GET_CLASS (listener)->initiate_authentication (listener, action_id, + message, + icon_name, + details, cookie, identities, cancellable, diff --git a/src/polkitagent/polkitagentlistener.h b/src/polkitagent/polkitagentlistener.h index 59a8cc8..9324b92 100644 --- a/src/polkitagent/polkitagentlistener.h +++ b/src/polkitagent/polkitagentlistener.h @@ -67,6 +67,9 @@ struct _PolkitAgentListenerClass /* Vtable */ void (*initiate_authentication) (PolkitAgentListener *listener, const gchar *action_id, + const gchar *message, + const gchar *icon_name, + GHashTable *details, const gchar *cookie, GList *identities, GCancellable *cancellable, @@ -92,6 +95,9 @@ struct _PolkitAgentListenerClass GType polkit_agent_listener_get_type (void) G_GNUC_CONST; void polkit_agent_listener_initiate_authentication (PolkitAgentListener *listener, const gchar *action_id, + const gchar *message, + const gchar *icon_name, + GHashTable *details, const gchar *cookie, GList *identities, GCancellable *cancellable, |