Object used to encapsulate a registered action. Gets the action id for @action_description. A string owned by @action_description. Do not free. A #PolkitActionDescription. Get the value of the annotation with @key. %NULL if there is no annoation with @key, otherwise the annotation value owned by @action_description. Do not free. A #PolkitActionDescription. An annotation key. Gets the keys of annotations defined in @action_description. The annotation keys owned by @action_description. Do not free. A #PolkitActionDescription. Gets the description used for @action_description. A string owned by @action_description. Do not free. A #PolkitActionDescription. Gets the icon name for @action_description, if any. A string owned by @action_description. Do not free. A #PolkitActionDescription. Gets the implicit authorization for @action_description used for subjects in active sessions on a local console. A value from the #PolkitImplicitAuthorization enumeration. A #PolkitActionDescription. Gets the implicit authorization for @action_description used for any subject. A value from the #PolkitImplicitAuthorization enumeration. A #PolkitActionDescription. Gets the implicit authorization for @action_description used for subjects in inactive sessions on a local console. A value from the #PolkitImplicitAuthorization enumeration. A #PolkitActionDescription. Gets the message used for @action_description. A string owned by @action_description. Do not free. A #PolkitActionDescription. Gets the vendor name for @action_description, if any. A string owned by @action_description. Do not free. A #PolkitActionDescription. Gets the vendor URL for @action_description, if any. A string owned by @action_description. Do not free. A #PolkitActionDescription. #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. (deprecated) value Asynchronously gets a reference to the authority. This is an asynchronous failable function. When the result is ready, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from and you can use polkit_authority_get_finish() to get the result. See polkit_authority_get_sync() for the synchronous version. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes an operation started with polkit_authority_get_async(). A #PolkitAuthority. Free it with g_object_unref() when done with it. A #GAsyncResult obtained from the #GAsyncReadyCallback passed to polkit_authority_get_async(). Synchronously gets a reference to the authority. This is a synchronous failable function - the calling thread is blocked until a reply is received. See polkit_authority_get_async() for the asynchronous version. A #PolkitAuthority. Free it with g_object_unref() when done with it. A #GCancellable or %NULL. 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 in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_authority_authentication_agent_response_finish() to get the result of the operation. A #PolkitAuthority. The cookie passed to the authentication agent from the authority. The identity that was authenticated. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes providing response from an authentication agent. %TRUE if @authority acknowledged the call, %FALSE if @error is set. A #PolkitAuthority. A #GAsyncResult obtained from the callback. 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. The calling thread is blocked until a reply is received. See polkit_authority_authentication_agent_response() for the asynchronous version. %TRUE if @authority acknowledged the call, %FALSE if @error is set. A #PolkitAuthority. The cookie passed to the authentication agent from the authority. The identity that was authenticated. A #GCancellable or %NULL. Asynchronously checks if @subject is authorized to perform the action represented by @action_id. Note that %POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION <emphasis>SHOULD</emphasis> be passed <emphasis>ONLY</emphasis> 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 in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_authority_check_authorization_finish() to get the result of the operation. 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. If @details is non-empty then the request will fail with #POLKIT_ERROR_FAILED unless the process doing the check itsef is sufficiently authorized (e.g. running as uid 0). A #PolkitAuthority. A #PolkitSubject. The action to check for. Details about the action or %NULL. A set of #PolkitCheckAuthorizationFlags. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes checking if a subject is authorized for an action. A #PolkitAuthorizationResult or %NULL if @error is set. Free with g_object_unref(). A #PolkitAuthority. A #GAsyncResult obtained from the callback. Checks if @subject is authorized to perform the action represented by @action_id. Note that %POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION <emphasis>SHOULD</emphasis> be passed <emphasis>ONLY</emphasis> 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. Note the calling thread is blocked until a reply is received. You should therefore <emphasis>NEVER</emphasis> do this from a GUI thread or a daemon service thread when using the %POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION flag. This is because it may potentially take minutes (or even hours) for the operation to complete because it involves waiting for the user to authenticate. 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. A #PolkitAuthorizationResult or %NULL if @error is set. Free with g_object_unref(). A #PolkitAuthority. A #PolkitSubject. The action to check for. Details about the action or %NULL. A set of #PolkitCheckAuthorizationFlags. A #GCancellable or %NULL. Asynchronously retrieves all registered actions. When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_authority_enumerate_actions_finish() to get the result of the operation. A #PolkitAuthority. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes retrieving all registered actions. 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(). A #PolkitAuthority. A #GAsyncResult obtained from the callback. Synchronously retrieves all registered actions - the calling thread is blocked until a reply is received. See polkit_authority_enumerate_actions() for the asynchronous version. 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(). A #PolkitAuthority. A #GCancellable or %NULL. Asynchronously gets all temporary authorizations for @subject. When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_authority_enumerate_temporary_authorizations_finish() to get the result of the operation. A #PolkitAuthority. A #PolkitSubject, typically a #PolkitUnixSession. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes retrieving all registered actions. 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(). A #PolkitAuthority. A #GAsyncResult obtained from the callback. Synchronousky gets all temporary authorizations for @subject. The calling thread is blocked until a reply is received. See polkit_authority_enumerate_temporary_authorizations() for the asynchronous version. 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(). A #PolkitAuthority. A #PolkitSubject, typically a #PolkitUnixSession. A #GCancellable or %NULL. Gets the features supported by the authority backend. Flags from #PolkitAuthorityFeatures. A #PolkitAuthority. Gets the name of the authority backend. The name of the backend. A #PolkitAuthority. Gets the version of the authority backend. The version string for the backend. A #PolkitAuthority. The unique name on the system message bus of the owner of the name <literal>org.freedesktop.PolicyKit1</literal> or %NULL if no-one currently owns the name. You may connect to the #GObject::notify signal to track changes to the #PolkitAuthority:owner property. %NULL or a string that should be freed with g_free(). A #PolkitAuthority. Asynchronously registers an authentication agent. Note that this should be called by the same effective UID which will be the real UID using the #PolkitAgentSession API or otherwise calling polkit_authority_authentication_agent_response(). When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_authority_register_authentication_agent_finish() to get the result of the operation. A #PolkitAuthority. The subject the authentication agent is for, typically a #PolkitUnixSession object. The locale of the authentication agent. The object path for the authentication agent. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes registering an authentication agent. %TRUE if the authentication agent was successfully registered, %FALSE if @error is set. A #PolkitAuthority. A #GAsyncResult obtained from the callback. Registers an authentication agent. Note that this should be called by the same effective UID which will be the real UID using the #PolkitAgentSession API or otherwise calling polkit_authority_authentication_agent_response(). The calling thread is blocked until a reply is received. See polkit_authority_register_authentication_agent() for the asynchronous version. %TRUE if the authentication agent was successfully registered, %FALSE if @error is set. A #PolkitAuthority. The subject the authentication agent is for, typically a #PolkitUnixSession object. The locale of the authentication agent. The object path for the authentication agent. A #GCancellable or %NULL. Asynchronously registers an authentication agent. Note that this should be called by the same effective UID which will be the real UID using the #PolkitAgentSession API or otherwise calling polkit_authority_authentication_agent_response(). When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_authority_register_authentication_agent_with_options_finish() to get the result of the operation. A #PolkitAuthority. The subject the authentication agent is for, typically a #PolkitUnixSession object. The locale of the authentication agent. The object path for the authentication agent. A #GVariant with options or %NULL. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes registering an authentication agent. %TRUE if the authentication agent was successfully registered, %FALSE if @error is set. A #PolkitAuthority. A #GAsyncResult obtained from the callback. Registers an authentication agent. Note that this should be called by the same effective UID which will be the real UID using the #PolkitAgentSession API or otherwise calling polkit_authority_authentication_agent_response(). The calling thread is blocked until a reply is received. See polkit_authority_register_authentication_agent_with_options() for the asynchronous version. %TRUE if the authentication agent was successfully registered, %FALSE if @error is set. A #PolkitAuthority. The subject the authentication agent is for, typically a #PolkitUnixSession object. The locale of the authentication agent. The object path for the authentication agent. A #GVariant with options or %NULL. A #GCancellable or %NULL. Asynchronously revoke a temporary authorization. When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_authority_revoke_temporary_authorization_by_id_finish() to get the result of the operation. A #PolkitAuthority. The opaque identifier for the temporary authorization. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes revoking a temporary authorization by id. %TRUE if the temporary authorization was revoked, %FALSE if error is set. A #PolkitAuthority. A #GAsyncResult obtained from the callback. Synchronously revokes a temporary authorization. The calling thread is blocked until a reply is received. See polkit_authority_revoke_temporary_authorization_by_id() for the asynchronous version. %TRUE if the temporary authorization was revoked, %FALSE if error is set. A #PolkitAuthority. The opaque identifier for the temporary authorization. A #GCancellable or %NULL. Asynchronously revokes all temporary authorizations for @subject. When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_authority_revoke_temporary_authorizations_finish() to get the result of the operation. A #PolkitAuthority. The subject to revoke authorizations from, typically a #PolkitUnixSession. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes revoking temporary authorizations. %TRUE if all the temporary authorizations was revoked, %FALSE if error is set. A #PolkitAuthority. A #GAsyncResult obtained from the callback. Synchronously revokes all temporary authorization from @subject. The calling thread is blocked until a reply is received. See polkit_authority_revoke_temporary_authorizations() for the asynchronous version. %TRUE if the temporary authorization was revoked, %FALSE if error is set. A #PolkitAuthority. The subject to revoke authorizations from, typically a #PolkitUnixSession. A #GCancellable or %NULL. Asynchronously unregisters an authentication agent. When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_authority_unregister_authentication_agent_finish() to get the result of the operation. A #PolkitAuthority. The subject the authentication agent is for, typically a #PolkitUnixSession object. The object path for the authentication agent. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Finishes unregistering an authentication agent. %TRUE if the authentication agent was successfully unregistered, %FALSE if @error is set. A #PolkitAuthority. A #GAsyncResult obtained from the callback. Unregisters an authentication agent. The calling thread is blocked until a reply is received. See polkit_authority_unregister_authentication_agent() for the asynchronous version. %TRUE if the authentication agent was successfully unregistered, %FALSE if @error is set. A #PolkitAuthority. The subject the authentication agent is for, typically a #PolkitUnixSession object. The object path for the authentication agent. A #GCancellable or %NULL. The features of the currently used Authority backend. The name of the currently used Authority backend. The unique name of the owner of the org.freedesktop.PolicyKit1 D-Bus service or %NULL if there is no owner. Connect to the #GObject::notify signal to track changes to this property. Emitted when actions and/or authorizations change Flags describing features supported by the Authority implementation. No flags set. The authority supports temporary authorizations that can be obtained through authentication. This class represents the result you get when checking for an authorization. Creates a new #PolkitAuthorizationResult object. A #PolkitAuthorizationResult object. Free with g_object_unref(). Whether the subject is authorized. Whether the subject is authorized if more information is provided. Must be %FALSE unless @is_authorized is %TRUE. Must be %NULL unless @is_authorized is %TRUE Gets the details about the result. A #PolkitDetails object or %NULL if there are no details. This object is owned by @result and should not be freed by the caller. A #PolkitAuthorizationResult. Gets whether the authentication request was dismissed / canceled by the user. This method simply reads the value of the key/value pair in @details with the key <literal>polkit.dismissed</literal>. %TRUE if the authentication request was dismissed, %FALSE otherwise. A #PolkitAuthorizationResult. Gets whether the subject is authorized. If the authorization is temporary, use polkit_authorization_result_get_temporary_authorization_id() to get the opaque identifier for the temporary authorization. Whether the subject is authorized. A #PolkitAuthorizationResult. Gets whether the subject is authorized if more information is provided. Whether the subject is authorized if more information is provided. A #PolkitAuthorizationResult. Gets whether authorization is retained if obtained via authentication. This can only be the case if @result indicates that the subject can obtain authorization after challenge (cf. polkit_authorization_result_get_is_challenge()), e.g. when the subject is not already authorized (cf. polkit_authorization_result_get_is_authorized()). If the subject is already authorized, use polkit_authorization_result_get_temporary_authorization_id() to check if the authorization is temporary. This method simply reads the value of the key/value pair in @details with the key <literal>polkit.retains_authorization_after_challenge</literal>. %TRUE if the authorization is or will be temporary. A #PolkitAuthorizationResult. Gets the opaque temporary authorization id for @result if @result indicates the subject is authorized and the authorization is temporary rather than one-shot or permanent. You can use this string together with the result from polkit_authority_enumerate_temporary_authorizations() to get more details about the temporary authorization or polkit_authority_revoke_temporary_authorization_by_id() to revoke the temporary authorization. If the subject is not authorized, use polkit_authorization_result_get_retains_authorization() to check if the authorization will be retained if obtained via authentication. This method simply reads the value of the key/value pair in @details with the key <literal>polkit.temporary_authorization_id</literal>. The opaque temporary authorization id for @result or %NULL if not available. Do not free this string, it is owned by @result. A #PolkitAuthorizationResult. Possible flags when checking authorizations. No flags set. 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. An object used for passing details around. Creates a new #PolkitDetails object. A #PolkitDetails object. Free with g_object_unref(). Gets a list of all keys on @details. %NULL if there are no keys otherwise an array of strings that should be freed with g_strfreev(). A #PolkitDetails. Inserts a copy of @key and @value on @details. If @value is %NULL, the key will be removed. A #PolkitDetails. A key. A value. Gets the value for @key on @details. %NULL if there is no value for @key, otherwise a string owned by @details. A #PolkitDetails. A key. Possible error when using PolicyKit. The operation failed. The operation was cancelled. Operation is not supported. Not authorized to perform operation. #PolkitIdentity is an abstract type for representing one or more identities. Creates an object from @str that implements the #PolkitIdentity interface. A #PolkitIdentity or %NULL if @error is set. Free with g_object_unref(). A string obtained from polkit_identity_to_string(). Checks if @a and @b are equal, ie. represent the same identity. This function can be used in e.g. g_hash_table_new(). %TRUE if @a and @b are equal, %FALSE otherwise. A #PolkitIdentity. A #PolkitIdentity. Gets a hash code for @identity that can be used with e.g. g_hash_table_new(). A hash code. A #PolkitIdentity. Serializes @identity to a string that can be used in polkit_identity_from_string(). A string representing @identity. Free with g_free(). A #PolkitIdentity. Checks if @a and @b are equal, ie. represent the same identity. This function can be used in e.g. g_hash_table_new(). %TRUE if @a and @b are equal, %FALSE otherwise. A #PolkitIdentity. A #PolkitIdentity. Gets a hash code for @identity that can be used with e.g. g_hash_table_new(). A hash code. A #PolkitIdentity. Serializes @identity to a string that can be used in polkit_identity_from_string(). A string representing @identity. Free with g_free(). A #PolkitIdentity. An interface for identities. The parent interface. Gets a hash value for a #PolkitIdentity. A hash code. A #PolkitIdentity. Checks if two #PolkitIdentity<!-- -->s are equal. %TRUE if @a and @b are equal, %FALSE otherwise. A #PolkitIdentity. A #PolkitIdentity. Serializes a #PolkitIdentity to a string that can be used in polkit_identity_from_string(). A string representing @identity. Free with g_free(). A #PolkitIdentity. Possible implicit authorizations. Unknown whether the subject is authorized, never returned in any public API. Subject is not authorized. Authentication is required. Authentication as an administrator is required. Authentication is required. If the authorization is obtained, it is retained. Authentication as an administrator is required. If the authorization is obtained, it is retained. The subject is authorized A string The location of the resulting deserialization #PolkitPermission is a #GPermission implementation. It can be used with e.g. #GtkLockButton. See the #GPermission documentation for more information. Finishes an operation started with polkit_permission_new(). A #GPermission or %NULL if @error is set. A #GAsyncResult obtained from the #GAsyncReadyCallback passed to polkit_permission_new(). Creates a #GPermission instance for the PolicyKit action @action_id. This is a synchronous failable constructor. See polkit_permission_new() for the asynchronous version. A #GPermission or %NULL if @error is set. The PolicyKit action identifier. A #PolkitSubject or %NULL for the current process. A #GCancellable or %NULL. Creates a #GPermission instance for the PolicyKit action @action_id. When the operation is finished, @callback will be invoked. You can then call polkit_permission_new_finish() to get the result of the operation. This is a asynchronous failable constructor. See polkit_permission_new_sync() for the synchronous version. The PolicyKit action identifier. A #PolkitSubject or %NULL for the current process. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied. The data to pass to @callback. Gets the PolicyKit action identifier used for @permission. A string owned by @permission. Do not free. A #PolkitPermission. Gets the subject used for @permission. An object owned by @permission. Do not free. A #PolkitPermission. The action identifier to use for the permission. The #PolkitSubject to use for the permission. If not set during construction, it will be set to match the current process. #PolkitSubject is an abstract type for representing one or more processes. Creates an object from @str that implements the #PolkitSubject interface. A #PolkitSubject or %NULL if @error is set. Free with g_object_unref(). A string obtained from polkit_subject_to_string(). Checks if @a and @b are equal, ie. represent the same subject. However, avoid calling polkit_subject_equal() to compare two processes; for more information see the `PolkitUnixProcess` documentation. This function can be used in e.g. g_hash_table_new(). %TRUE if @a and @b are equal, %FALSE otherwise. A #PolkitSubject. A #PolkitSubject. Asynchronously checks if @subject exists. When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_subject_exists_finish() to get the result of the operation. A #PolkitSubject. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied The data to pass to @callback. Finishes checking whether a subject exists. %TRUE if the subject exists, %FALSE if not or @error is set. A #PolkitSubject. A #GAsyncResult obtained from the #GAsyncReadyCallback passed to polkit_subject_exists(). Checks if @subject exists. This is a synchronous blocking call - the calling thread is blocked until a reply is received. See polkit_subject_exists() for the asynchronous version. %TRUE if the subject exists, %FALSE if not or @error is set. A #PolkitSubject. A #GCancellable or %NULL. Gets a hash code for @subject that can be used with e.g. g_hash_table_new(). A hash code. A #PolkitSubject. Serializes @subject to a string that can be used in polkit_subject_from_string(). A string representing @subject. Free with g_free(). A #PolkitSubject. Checks if @a and @b are equal, ie. represent the same subject. However, avoid calling polkit_subject_equal() to compare two processes; for more information see the `PolkitUnixProcess` documentation. This function can be used in e.g. g_hash_table_new(). %TRUE if @a and @b are equal, %FALSE otherwise. A #PolkitSubject. A #PolkitSubject. Asynchronously checks if @subject exists. When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_subject_exists_finish() to get the result of the operation. A #PolkitSubject. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied The data to pass to @callback. Finishes checking whether a subject exists. %TRUE if the subject exists, %FALSE if not or @error is set. A #PolkitSubject. A #GAsyncResult obtained from the #GAsyncReadyCallback passed to polkit_subject_exists(). Checks if @subject exists. This is a synchronous blocking call - the calling thread is blocked until a reply is received. See polkit_subject_exists() for the asynchronous version. %TRUE if the subject exists, %FALSE if not or @error is set. A #PolkitSubject. A #GCancellable or %NULL. Gets a hash code for @subject that can be used with e.g. g_hash_table_new(). A hash code. A #PolkitSubject. Serializes @subject to a string that can be used in polkit_subject_from_string(). A string representing @subject. Free with g_free(). A #PolkitSubject. An interface for subjects. The parent interface. Gets a hash value for a #PolkitSubject. A hash code. A #PolkitSubject. Checks if two #PolkitSubject<!-- -->s are equal. %TRUE if @a and @b are equal, %FALSE otherwise. A #PolkitSubject. A #PolkitSubject. Serializes a #PolkitSubject to a string that can be used in polkit_subject_from_string(). A string representing @subject. Free with g_free(). A #PolkitSubject. Asynchronously check if a #PolkitSubject exists. A #PolkitSubject. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied The data to pass to @callback. Finishes checking if a #PolkitSubject exists. %TRUE if the subject exists, %FALSE if not or @error is set. A #PolkitSubject. A #GAsyncResult obtained from the #GAsyncReadyCallback passed to polkit_subject_exists(). Synchronously check if a #PolkitSubject exists. %TRUE if the subject exists, %FALSE if not or @error is set. A #PolkitSubject. A #GCancellable or %NULL. An object that represents a process owning a unique name on the system bus. Creates a new #PolkitSystemBusName for @name. A #PolkitSystemBusName. Free with g_object_unref(). A unique system bus name. Gets the unique system bus name for @system_bus_name. The unique system bus name for @system_bus_name. Do not free, this string is owned by @system_bus_name. A #PolkitSystemBusName. Synchronously gets a #PolkitUnixProcess object for @system_bus_name - the calling thread is blocked until a reply is received. A #PolkitUnixProcess object or %NULL if @error is set. A #PolkitSystemBusName. A #GCancellable or %NULL. Synchronously gets a #PolkitUnixUser object for @system_bus_name; the calling thread is blocked until a reply is received. A #PolkitUnixUser object or %NULL if @error is set. A #PolkitSystemBusName. A #GCancellable or %NULL. Sets the unique system bus name for @system_bus_name. A #PolkitSystemBusName. A unique system bus name. The unique name on the system message bus. Object used to describe a temporary authorization. Gets the action that @authorization is for. A string owned by @authorization. Do not free. A #PolkitTemporaryAuthorization. Gets the opaque identifier for @authorization. A string owned by @authorization. Do not free. A #PolkitTemporaryAuthorization. Gets the subject that @authorization is for. A #PolkitSubject, free with g_object_unref(). A #PolkitTemporaryAuthorization. Gets the time when @authorization will expire. (Note that the PolicyKit daemon is using monotonic time internally so the returned value may change if system time changes.) Seconds since the Epoch Jan 1. 1970, 0:00 UTC. A #PolkitTemporaryAuthorization. Gets the time when @authorization was obtained. (Note that the PolicyKit daemon is using monotonic time internally so the returned value may change if system time changes.) Seconds since the Epoch Jan 1. 1970, 0:00 UTC. A #PolkitTemporaryAuthorization. An object representing a group identity on a UNIX system. Creates a new #PolkitUnixGroup object for @gid. A #PolkitUnixGroup object. Free with g_object_unref(). A UNIX group id. Creates a new #PolkitUnixGroup object for a group with the group name @name. A #PolkitUnixGroup object or %NULL if @error is set. A UNIX group name. Gets the UNIX group id for @group. A UNIX group id. A #PolkitUnixGroup. Sets @gid for @group. A #PolkitUnixGroup. A UNIX group id. The UNIX group id. An object representing a netgroup identity on a UNIX system. Creates a new #PolkitUnixNetgroup object for @name. A #PolkitUnixNetgroup object. Free with g_object_unref(). A netgroup name. Gets the netgroup name for @group. A netgroup name string. A #PolkitUnixNetgroup. Sets @name for @group. A #PolkitUnixNetgroup. A netgroup name. The NIS netgroup name. An object for representing a UNIX process. In order to be reliable and race-free, this requires support for PID File Descriptors in the kernel, dbus-daemon/broker and systemd. With this functionality, we can reliably track processes without risking PID reuse and race conditions, and compare them. NOTE: If PID FDs are not available, this object will fall back to using PIDs, and this designed is now known broken; a mechanism to exploit a delay in start time in the Linux kernel was identified. Avoid calling polkit_subject_equal() to compare two processes. To uniquely identify processes, both the process id and the start time of the process (a monotonic increasing value representing the time since the kernel was started) is used. NOTE: This object stores, and provides access to, the real UID of the process. That value can change over time (with set*uid*(2) and exec*(2)). Checks whether an operation is allowed need to take care to use the UID value as of the time when the operation was made (or, following the open() privilege check model, when the connection making the operation possible was initiated). That is usually done by initializing this with polkit_unix_process_new_for_owner() with trusted data. Creates a new #PolkitUnixProcess for @pid. The uid and start time of the process will be looked up in using e.g. the <filename>/proc</filename> filesystem depending on the platform in use. A #PolkitSubject. Free with g_object_unref(). The process id. Creates a new #PolkitUnixProcess object for @pid, @start_time and @uid. A #PolkitSubject. Free with g_object_unref(). The process id. The start time for @pid or 0 to look it up in e.g. <filename>/proc</filename>. The (real, not effective) uid of the owner of @pid or -1 to look it up in e.g. <filename>/proc</filename>. Creates a new #PolkitUnixProcess object for @pid and @start_time. The uid of the process will be looked up in using e.g. the <filename>/proc</filename> filesystem depending on the platform in use. A #PolkitSubject. Free with g_object_unref(). The process id. The start time for @pid. Creates a new #PolkitUnixProcess object for @pidfd and @uid. A #PolkitSubject. Free with g_object_unref(). The process id file descriptor. The (real, not effective) uid of the owner of @pid or -1 to look it up in e.g. <filename>/proc</filename>. The (real, not effective) gids of the owner of @pid or %NULL. Gets the group ids for @process. Note that this is the real group-ids, not the effective group-ids. a #GArray of #gid_t containing the group ids for @process or NULL if unknown, as a new reference to the array, caller must deref it when done. A #PolkitUnixProcess. (deprecated) A #PolkitUnixProcess. Gets the process id for @process. The process id for @process. A #PolkitUnixProcess. Gets the process id file descriptor for @process. The process id file descriptor for @process. A #PolkitUnixProcess. Checks if the process id file descriptor for @process is safe or if it was opened locally and thus vulnerable to reuse. TRUE or FALSE. A #PolkitUnixProcess. Gets the start time of @process. The start time of @process. A #PolkitUnixProcess. Gets the user id for @process. Note that this is the real user-id, not the effective user-id. NOTE: The UID may change over time, so the returned value may not match the current state of the underlying process; or the UID may have been set by polkit_unix_process_new_for_owner() or polkit_unix_process_set_uid(), in which case it may not correspond to the actual UID of the referenced process at all (at any point in time). The user id for @process or -1 if unknown. A #PolkitUnixProcess. Sets the (real, not effective) group ids for @process. A #PolkitUnixProcess. A #GList of #gid_t containing the group ids to set for @process or NULL to unset them. A reference to @gids is taken. Sets @pid for @process. A #PolkitUnixProcess. A process id. Sets @pidfd for @process. A #PolkitUnixProcess. A process id file descriptor. Set the start time of @process. A #PolkitUnixProcess. The start time for @pid. Sets the (real, not effective) user id for @process. A #PolkitUnixProcess. The user id to set for @process or -1 to unset it. The UNIX group ids of the process. The UNIX process id. The UNIX process id file descriptor. The start time of the process. The UNIX user id of the process or -1 if unknown. Note that this is the real user-id, not the effective user-id. An object that represents an user session. The session id is an opaque string obtained from ConsoleKit. Creates a new #PolkitUnixSession for @session_id. A #PolkitUnixSession. Free with g_object_unref(). The session id. Asynchronously creates a new #PolkitUnixSession object for the process with process id @pid. When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from. You can then call polkit_unix_session_new_for_process_finish() to get the result of the operation. This method constructs the object asynchronously, for the synchronous and blocking version use polkit_unix_session_new_for_process_sync(). The process id of the process to get the session for. A #GCancellable or %NULL. A #GAsyncReadyCallback to call when the request is satisfied The data to pass to @callback. Finishes constructing a #PolkitSubject for a process id. A #PolkitUnixSession for the @pid passed to polkit_unix_session_new_for_process() or %NULL if @error is set. Free with g_object_unref(). A #GAsyncResult obtained from the #GAsyncReadyCallback passed to polkit_unix_session_new_for_process(). Creates a new #PolkitUnixSession for the process with process id @pid. This is a synchronous call - the calling thread is blocked until a reply is received. For the asynchronous version, see polkit_unix_session_new_for_process(). A #PolkitUnixSession for @pid or %NULL if @error is set. Free with g_object_unref(). The process id of the process to get the session for. A #GCancellable or %NULL. Gets the session id for @session. The session id for @session. Do not free this string, it is owned by @session. A #PolkitUnixSession. Sets the session id for @session to @session_id. A #PolkitUnixSession. The session id. The UNIX process id to look up the session. The UNIX session id. An object representing a user identity on a UNIX system. Creates a new #PolkitUnixUser object for @uid. A #PolkitUnixUser object. Free with g_object_unref(). A UNIX user id. Creates a new #PolkitUnixUser object for a user with the user name @name. A #PolkitUnixUser object or %NULL if @error is set. A UNIX user name. Get the user's name. User name string or %NULL if user uid not found. A #PolkitUnixUser. Gets the UNIX user id for @user. A UNIX user id. A #PolkitUnixUser. Sets @uid for @user. A #PolkitUnixUser. A UNIX user id. The UNIX user id. Creates an object from @str that implements the #PolkitIdentity interface. A #PolkitIdentity or %NULL if @error is set. Free with g_object_unref(). A string obtained from polkit_identity_to_string(). A string The location of the resulting deserialization Error codes. Creates an object from @str that implements the #PolkitSubject interface. A #PolkitSubject or %NULL if @error is set. Free with g_object_unref(). A string obtained from polkit_subject_to_string().