manpagez: man pages & more
html files: polkit
Home | html | info | man

PolkitAuthority

PolkitAuthority — Authority

Stability Level

Stable, unless otherwise indicated

Synopsis

                    PolkitAuthority;
enum                PolkitAuthorityFeatures;
enum                PolkitCheckAuthorizationFlags;
PolkitAuthority *   polkit_authority_get                (void);
const gchar *       polkit_authority_get_backend_name   (PolkitAuthority *authority);
const gchar *       polkit_authority_get_backend_version
                                                        (PolkitAuthority *authority);
PolkitAuthorityFeatures  polkit_authority_get_backend_features
                                                        (PolkitAuthority *authority);
void                polkit_authority_check_authorization
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *action_id,
                                                         PolkitDetails *details,
                                                         PolkitCheckAuthorizationFlags flags,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
PolkitAuthorizationResult * polkit_authority_check_authorization_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
void                polkit_authority_enumerate_actions  (PolkitAuthority *authority,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GList *             polkit_authority_enumerate_actions_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
void                polkit_authority_register_authentication_agent
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *locale,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            polkit_authority_register_authentication_agent_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
void                polkit_authority_unregister_authentication_agent
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            polkit_authority_unregister_authentication_agent_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
void                polkit_authority_authentication_agent_response
                                                        (PolkitAuthority *authority,
                                                         const gchar *cookie,
                                                         PolkitIdentity *identity,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            polkit_authority_authentication_agent_response_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
void                polkit_authority_enumerate_temporary_authorizations
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GList *             polkit_authority_enumerate_temporary_authorizations_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
void                polkit_authority_revoke_temporary_authorizations
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            polkit_authority_revoke_temporary_authorizations_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
void                polkit_authority_revoke_temporary_authorization_by_id
                                                        (PolkitAuthority *authority,
                                                         const gchar *id,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            polkit_authority_revoke_temporary_authorization_by_id_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
void                polkit_authority_add_lockdown_for_action
                                                        (PolkitAuthority *authority,
                                                         const gchar *action_id,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            polkit_authority_add_lockdown_for_action_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
void                polkit_authority_remove_lockdown_for_action
                                                        (PolkitAuthority *authority,
                                                         const gchar *action_id,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            polkit_authority_remove_lockdown_for_action_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);
PolkitAuthorizationResult * polkit_authority_check_authorization_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *action_id,
                                                         PolkitDetails *details,
                                                         PolkitCheckAuthorizationFlags flags,
                                                         GCancellable *cancellable,
                                                         GError **error);
GList *             polkit_authority_enumerate_actions_sync
                                                        (PolkitAuthority *authority,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            polkit_authority_register_authentication_agent_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *locale,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            polkit_authority_unregister_authentication_agent_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            polkit_authority_authentication_agent_response_sync
                                                        (PolkitAuthority *authority,
                                                         const gchar *cookie,
                                                         PolkitIdentity *identity,
                                                         GCancellable *cancellable,
                                                         GError **error);
GList *             polkit_authority_enumerate_temporary_authorizations_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            polkit_authority_revoke_temporary_authorizations_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            polkit_authority_revoke_temporary_authorization_by_id_sync
                                                        (PolkitAuthority *authority,
                                                         const gchar *id,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            polkit_authority_add_lockdown_for_action_sync
                                                        (PolkitAuthority *authority,
                                                         const gchar *action_id,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            polkit_authority_remove_lockdown_for_action_sync
                                                        (PolkitAuthority *authority,
                                                         const gchar *action_id,
                                                         GCancellable *cancellable,
                                                         GError **error);

Object Hierarchy

  GObject
   +----PolkitAuthority

Signals

  "changed"                                        : Run Last

Description

PolkitAuthority is used for checking whether a given subject is authorized to perform a given action. Typically privileged system daemons or suid helpers will use this when handling requests from untrusted clients.

User sessions can register an authentication agent with the authority. This is used for requests from untrusted clients where system policy requires that the user needs to acknowledge (through proving he is the user or the administrator) a given action. See PolkitAgentListener and PolkitAgentSession for details.

Details

PolkitAuthority

typedef struct _PolkitAuthority PolkitAuthority;

The PolkitAuthority struct should not be accessed directly.


enum PolkitAuthorityFeatures

typedef enum
{
  POLKIT_AUTHORITY_FEATURES_NONE                    = 0,
  POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION = (1<<0),
  POLKIT_AUTHORITY_FEATURES_LOCKDOWN                = (1<<1)
} PolkitAuthorityFeatures;

Flags describing features supported by the Authority implementation.

POLKIT_AUTHORITY_FEATURES_NONE

No flags set.

POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION

The authority supports temporary authorizations that can be obtained through authentication.

POLKIT_AUTHORITY_FEATURES_LOCKDOWN

The authority supports the XXX method.

enum PolkitCheckAuthorizationFlags

typedef enum
{
  POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE = 0,
  POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION = (1<<0),
} PolkitCheckAuthorizationFlags;

Possible flags when checking authorizations.

POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE

No flags set.

POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION

If the subject can obtain the authorization through authentication, and an authentication agent is available, then attempt to do so. Note, this means that the method used for checking authorization is likely to block for a long time.

polkit_authority_get ()

PolkitAuthority *   polkit_authority_get                (void);

Gets a reference to the authority.

Returns :

A PolkitAuthority. Free it with g_object_unref() when done with it.

polkit_authority_get_backend_name ()

const gchar *       polkit_authority_get_backend_name   (PolkitAuthority *authority);

Gets the name of the authority backend.

authority :

A PolkitAuthority.

Returns :

The name of the backend.

polkit_authority_get_backend_version ()

const gchar *       polkit_authority_get_backend_version
                                                        (PolkitAuthority *authority);

Gets the version of the authority backend.

authority :

A PolkitAuthority.

Returns :

The name of the backend.

polkit_authority_get_backend_features ()

PolkitAuthorityFeatures  polkit_authority_get_backend_features
                                                        (PolkitAuthority *authority);

Gets the features supported by the authority backend.

authority :

A PolkitAuthority.

Returns :

Flags from PolkitAuthorityFeatures.

polkit_authority_check_authorization ()

void                polkit_authority_check_authorization
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *action_id,
                                                         PolkitDetails *details,
                                                         PolkitCheckAuthorizationFlags flags,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously checks if subject is authorized to perform the action represented by action_id.

Note that POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION 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.

When the operation is finished, callback will be invoked. You can then call polkit_authority_check_authorization_finish() to get the result of the operation.

authority :

A PolkitAuthority.

subject :

A PolkitSubject.

action_id :

The action to check for.

details :

Details about the action or NULL. Keys starting with polkit. are reserved for internal use and cannot be used.

flags :

A set of PolkitCheckAuthorizationFlags.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_check_authorization_finish ()

PolkitAuthorizationResult * polkit_authority_check_authorization_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes checking if a subject is authorized for an action.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

A PolkitAuthorizationResult or NULL if error is set. Free with g_object_unref().

polkit_authority_enumerate_actions ()

void                polkit_authority_enumerate_actions  (PolkitAuthority *authority,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously retrieves all registered actions.

When the operation is finished, callback will be invoked. You can then call polkit_authority_enumerate_actions_finish() to get the result of the operation.

authority :

A PolkitAuthority.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_enumerate_actions_finish ()

GList *             polkit_authority_enumerate_actions_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes retrieving all registered actions.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

A list of PolkitActionDescription objects or NULL if error is set. The returned list should be freed with g_list_free() after each element have been freed with g_object_unref().

polkit_authority_register_authentication_agent ()

void                polkit_authority_register_authentication_agent
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *locale,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously registers an authentication agent.

When the operation is finished, callback will be invoked. You can then call polkit_authority_register_authentication_agent_finish() to get the result of the operation.

authority :

A PolkitAuthority.

subject :

The subject the authentication agent is for, typically a PolkitUnixSession object.

locale :

The locale of the authentication agent.

object_path :

The object path for the authentication agent.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_register_authentication_agent_finish ()

gboolean            polkit_authority_register_authentication_agent_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes registering an authentication agent.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

TRUE if the authentication agent was successfully registered, FALSE if error is set.

polkit_authority_unregister_authentication_agent ()

void                polkit_authority_unregister_authentication_agent
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously unregisters an authentication agent.

When the operation is finished, callback will be invoked. You can then call polkit_authority_unregister_authentication_agent_finish() to get the result of the operation.

authority :

A PolkitAuthority.

subject :

The PolkitSubject passed when registering the agent.

object_path :

The object path that the authentication agent is registered at.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_unregister_authentication_agent_finish ()

gboolean            polkit_authority_unregister_authentication_agent_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes unregistering an authentication agent.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

TRUE if the authentication agent was successfully unregistered, FALSE if error is set.

polkit_authority_authentication_agent_response ()

void                polkit_authority_authentication_agent_response
                                                        (PolkitAuthority *authority,
                                                         const gchar *cookie,
                                                         PolkitIdentity *identity,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously provide response that identity successfully authenticated for the authentication request identified by cookie.

This function is only used by the privileged bits of an authentication agent. It will fail if the caller is not sufficiently privileged (typically uid 0).

When the operation is finished, callback will be invoked. You can then call polkit_authority_authentication_agent_response_finish() to get the result of the operation.

authority :

A PolkitAuthority.

cookie :

The cookie passed to the authentication agent from the authority.

identity :

The identity that was authenticated.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_authentication_agent_response_finish ()

gboolean            polkit_authority_authentication_agent_response_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes providing response from an authentication agent.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

TRUE if authority acknowledged the call, FALSE if error is set.

polkit_authority_enumerate_temporary_authorizations ()

void                polkit_authority_enumerate_temporary_authorizations
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously gets all temporary authorizations for subject.

When the operation is finished, callback will be invoked. You can then call polkit_authority_enumerate_temporary_authorizations_finish() to get the result of the operation.

authority :

A PolkitAuthority.

subject :

A PolkitSubject, typically a PolkitUnixSession.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_enumerate_temporary_authorizations_finish ()

GList *             polkit_authority_enumerate_temporary_authorizations_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes retrieving all registered actions.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

A list of PolkitTemporaryAuthorization objects or NULL if error is set. The returned list should be freed with g_list_free() after each element have been freed with g_object_unref().

polkit_authority_revoke_temporary_authorizations ()

void                polkit_authority_revoke_temporary_authorizations
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously revokes all temporary authorizations for subject.

When the operation is finished, callback will be invoked. You can then call polkit_authority_revoke_temporary_authorizations_finish() to get the result of the operation.

authority :

A PolkitAuthority.

subject :

The subject to revoke authorizations from, typically a PolkitUnixSession.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_revoke_temporary_authorizations_finish ()

gboolean            polkit_authority_revoke_temporary_authorizations_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes revoking temporary authorizations.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

TRUE if all the temporary authorizations was revoked, FALSE if error is set.

polkit_authority_revoke_temporary_authorization_by_id ()

void                polkit_authority_revoke_temporary_authorization_by_id
                                                        (PolkitAuthority *authority,
                                                         const gchar *id,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously revoke a temporary authorization.

When the operation is finished, callback will be invoked. You can then call polkit_authority_revoke_temporary_authorization_by_id_finish() to get the result of the operation.

authority :

A PolkitAuthority.

id :

The opaque identifier for the temporary authorization.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_revoke_temporary_authorization_by_id_finish ()

gboolean            polkit_authority_revoke_temporary_authorization_by_id_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes revoking a temporary authorization by id.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

TRUE if the temporary authorization was revoked, FALSE if error is set.

polkit_authority_add_lockdown_for_action ()

void                polkit_authority_add_lockdown_for_action
                                                        (PolkitAuthority *authority,
                                                         const gchar *action_id,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Locks down the action identified by action_id.

When the operation is finished, callback will be invoked. You can then call polkit_authority_add_lockdown_for_action_finish() to get the result of the operation.

authority :

A PolkitAuthority.

action_id :

The identifier for the action.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_add_lockdown_for_action_finish ()

gboolean            polkit_authority_add_lockdown_for_action_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes locking down an action.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

TRUE if the action was locked down, FALSE if error is set.

polkit_authority_remove_lockdown_for_action ()

void                polkit_authority_remove_lockdown_for_action
                                                        (PolkitAuthority *authority,
                                                         const gchar *action_id,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Removes locks down the action identified by action_id.

When the operation is finished, callback will be invoked. You can then call polkit_authority_remove_lockdown_for_action_finish() to get the result of the operation.

authority :

A PolkitAuthority.

action_id :

The identifier for the action.

cancellable :

A GCancellable or NULL.

callback :

A GAsyncReadyCallback to call when the request is satisfied.

user_data :

The data to pass to callback.

polkit_authority_remove_lockdown_for_action_finish ()

gboolean            polkit_authority_remove_lockdown_for_action_finish
                                                        (PolkitAuthority *authority,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes removing lock down for an action.

authority :

A PolkitAuthority.

res :

A GAsyncResult obtained from the callback.

error :

Return location for error or NULL.

Returns :

TRUE if the action was locked down, FALSE if error is set.

polkit_authority_check_authorization_sync ()

PolkitAuthorizationResult * polkit_authority_check_authorization_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *action_id,
                                                         PolkitDetails *details,
                                                         PolkitCheckAuthorizationFlags flags,
                                                         GCancellable *cancellable,
                                                         GError **error);

Checks if subject is authorized to perform the action represented by action_id.

Note that POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION 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.

authority :

A PolkitAuthority.

subject :

A PolkitSubject.

action_id :

The action to check for.

details :

Details about the action or NULL. Keys starting with polkit. are reserved for internal use and cannot be used.

flags :

A set of PolkitCheckAuthorizationFlags.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

A PolkitAuthorizationResult or NULL if error is set. Free with g_object_unref().

polkit_authority_enumerate_actions_sync ()

GList *             polkit_authority_enumerate_actions_sync
                                                        (PolkitAuthority *authority,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously retrieves all registered actions.

authority :

A PolkitAuthority.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

A list of PolkitActionDescription or NULL if error is set. The returned list should be freed with g_list_free() after each element have been freed with g_object_unref().

polkit_authority_register_authentication_agent_sync ()

gboolean            polkit_authority_register_authentication_agent_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *locale,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GError **error);

Registers an authentication agent.

authority :

A PolkitAuthority.

subject :

The subject the authentication agent is for, typically a PolkitUnixSession object.

locale :

The locale of the authentication agent.

object_path :

The object path for the authentication agent.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

TRUE if the authentication agent was successfully registered, FALSE if error is set.

polkit_authority_unregister_authentication_agent_sync ()

gboolean            polkit_authority_unregister_authentication_agent_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable,
                                                         GError **error);

Unregisters an authentication agent.

authority :

A PolkitAuthority.

subject :

The PolkitSubject passed when registering the agent.

object_path :

The object path that the authentication agent is registered at.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

TRUE if the authentication agent was successfully unregistered, FALSE if error is set.

polkit_authority_authentication_agent_response_sync ()

gboolean            polkit_authority_authentication_agent_response_sync
                                                        (PolkitAuthority *authority,
                                                         const gchar *cookie,
                                                         PolkitIdentity *identity,
                                                         GCancellable *cancellable,
                                                         GError **error);

Provide response that identity successfully authenticated for the authentication request identified by cookie. See polkit_authority_authentication_agent_response() for limitations on who is allowed is to call this method.

authority :

A PolkitAuthority.

cookie :

The cookie passed to the authentication agent from the authority.

identity :

The identity that was authenticated.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

TRUE if authority acknowledged the call, FALSE if error is set.

polkit_authority_enumerate_temporary_authorizations_sync ()

GList *             polkit_authority_enumerate_temporary_authorizations_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronousky gets all temporary authorizations for subject.

authority :

A PolkitAuthority.

subject :

A PolkitSubject, typically a PolkitUnixSession.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

A list of PolkitTemporaryAuthorization objects or NULL if error is set. The returned list should be freed with g_list_free() after each element have been freed with g_object_unref().

polkit_authority_revoke_temporary_authorizations_sync ()

gboolean            polkit_authority_revoke_temporary_authorizations_sync
                                                        (PolkitAuthority *authority,
                                                         PolkitSubject *subject,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously revokes all temporary authorization from subject.

authority :

A PolkitAuthority.

subject :

The subject to revoke authorizations from, typically a PolkitUnixSession.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

TRUE if the temporary authorization was revoked, FALSE if error is set.

polkit_authority_revoke_temporary_authorization_by_id_sync ()

gboolean            polkit_authority_revoke_temporary_authorization_by_id_sync
                                                        (PolkitAuthority *authority,
                                                         const gchar *id,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously revokes a temporary authorization.

authority :

A PolkitAuthority.

id :

The opaque identifier for the temporary authorization.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

TRUE if the temporary authorization was revoked, FALSE if error is set.

polkit_authority_add_lockdown_for_action_sync ()

gboolean            polkit_authority_add_lockdown_for_action_sync
                                                        (PolkitAuthority *authority,
                                                         const gchar *action_id,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously locks down an action.

authority :

A PolkitAuthority.

action_id :

The identifier for the action.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

TRUE if the action was locked down, FALSE if error is set.

polkit_authority_remove_lockdown_for_action_sync ()

gboolean            polkit_authority_remove_lockdown_for_action_sync
                                                        (PolkitAuthority *authority,
                                                         const gchar *action_id,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously removes lock down for an action.

authority :

A PolkitAuthority.

action_id :

The identifier for the action.

cancellable :

A GCancellable or NULL.

error :

Return location for error or NULL.

Returns :

TRUE if the action was locked down, FALSE if error is set.

Property Details

The "backend-features" property

  "backend-features"         PolkitAuthorityFeatures  : Read

The features of the currently used Authority backend.


The "backend-name" property

  "backend-name"             gchar*                : Read

The name of the currently used Authority backend.

Default value: NULL


The "backend-version" property

  "backend-version"          gchar*                : Read

The version of the currently used Authority backend.

Default value: NULL

Signal Details

The "changed" signal

void                user_function                      (PolkitAuthority *authority,
                                                        gpointer         user_data)      : Run Last

Emitted when actions and/or authorizations change

authority :

A PolkitAuthority.

user_data :

user data set when the signal handler was connected.
© manpagez.com 2000-2017
Individual documents may contain additional copyright information.