Commit 7491b69e authored by David Zeuthen's avatar David Zeuthen

Remove Lock Down functionality

This is better implemented as a separate set of extension to the local
authority. The only current known user, PolkitLockButton, will be
ported away from using these interfaces.

Since polkit still hasn't reached 1.0 this removal of functionality is
OK especially since the NEWS file has already wanred something like
this may happen.
Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent b224c804
......@@ -42,8 +42,6 @@ Structure <link linkend="eggdbus-struct-TemporaryAuthorization">TemporaryAuth
OUT Array&lt;<link linkend="eggdbus-struct-TemporaryAuthorization">TemporaryAuthorization</link>&gt; temporary_authorizations)
<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RevokeTemporaryAuthorizations">RevokeTemporaryAuthorizations</link> (IN <link linkend="eggdbus-struct-Subject">Subject</link> subject)
<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RevokeTemporaryAuthorizationById">RevokeTemporaryAuthorizationById</link> (IN String id)
<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AddLockdownForAction">AddLockdownForAction</link> (IN String action_id)
<link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RemoveLockdownForAction">RemoveLockdownForAction</link> (IN String action_id)
</synopsis>
</refsynopsisdiv>
<refsect1 role="signal_proto" id="eggdbus-if-signals-org.freedesktop.PolicyKit1.Authority">
......@@ -232,8 +230,7 @@ The passed <parameter>cancellation_id</parameter> is already in use.
<programlisting>
{
None = 0x00000000,
TemporaryAuthorization = 0x00000001,
Lockdown = 0x00000002
TemporaryAuthorization = 0x00000001
}
</programlisting>
<para>
......@@ -255,14 +252,6 @@ No flags set.
The authority supports temporary authorizations that can be obtained through authentication.
</para>
</listitem>
</varlistentry>
<varlistentry id="eggdbus-constant-AuthorityFeatures.Lockdown" role="constant">
<term><literal>Lockdown</literal></term>
<listitem>
<para>
The authority supports the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AddLockdownForAction">AddLockdownForAction()</link> and <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RemoveLockdownForAction">RemoveLockdownForAction()</link> methods.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
......@@ -472,7 +461,7 @@ TRUE if the given <link linkend="eggdbus-struct-Subject">Subject</link> could be
<term><literal>Dict&lt;String,String&gt; <structfield>details</structfield></literal></term>
<listitem>
<para>
Details for the result or empty if not authorized. Known key/value-pairs include <literal>polkit.temporary_authorization_id</literal> (if the authorization is temporary, this is set to the opaque temporary authorization id), <literal>polkit.retains_authorization_after_challenge</literal> (Set to a non-empty string if the authorization will be retained after authentication (if is_challenge is TRUE)) and <literal>polkit.lockdown</literal> (set to a non-empty string if the action is locked down).
Details for the result or empty if not authorized. Known key/value-pairs include <literal>polkit.temporary_authorization_id</literal> (if the authorization is temporary, this is set to the opaque temporary authorization id), <literal>polkit.retains_authorization_after_challenge</literal> (Set to a non-empty string if the authorization will be retained after authentication (if is_challenge is TRUE)).
</para>
</listitem>
</varlistentry>
......@@ -809,44 +798,6 @@ The opaque identifier of the temporary authorization.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AddLockdownForAction">
<title>AddLockdownForAction ()</title>
<programlisting>
AddLockdownForAction (IN String action_id)
</programlisting>
<para>
Locks down an action so administrator authentication is always needed to obtain a temporary authorization for the action.
</para>
<variablelist role="params">
<varlistentry>
<term><literal>IN String <parameter>action_id</parameter></literal>:</term>
<listitem>
<para>
Identifier for the action.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="function" id="eggdbus-method-org.freedesktop.PolicyKit1.Authority.RemoveLockdownForAction">
<title>RemoveLockdownForAction ()</title>
<programlisting>
RemoveLockdownForAction (IN String action_id)
</programlisting>
<para>
Removes the effect of a previous <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.AddLockdownForAction">AddLockdownForAction()</link> call.
</para>
<variablelist role="params">
<varlistentry>
<term><literal>IN String <parameter>action_id</parameter></literal>:</term>
<listitem>
<para>
Identifier for the action.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
......
......@@ -42,10 +42,6 @@ polkit_authority_revoke_temporary_authorizations
polkit_authority_revoke_temporary_authorizations_finish
polkit_authority_revoke_temporary_authorization_by_id
polkit_authority_revoke_temporary_authorization_by_id_finish
polkit_authority_add_lockdown_for_action
polkit_authority_add_lockdown_for_action_finish
polkit_authority_remove_lockdown_for_action
polkit_authority_remove_lockdown_for_action_finish
polkit_authority_check_authorization_sync
polkit_authority_enumerate_actions_sync
polkit_authority_register_authentication_agent_sync
......@@ -54,8 +50,6 @@ polkit_authority_authentication_agent_response_sync
polkit_authority_enumerate_temporary_authorizations_sync
polkit_authority_revoke_temporary_authorizations_sync
polkit_authority_revoke_temporary_authorization_by_id_sync
polkit_authority_add_lockdown_for_action_sync
polkit_authority_remove_lockdown_for_action_sync
<SUBSECTION Standard>
PolkitAuthorityClass
POLKIT_AUTHORITY
......@@ -75,7 +69,6 @@ polkit_authorization_result_get_is_authorized
polkit_authorization_result_get_is_challenge
polkit_authorization_result_get_retains_authorization
polkit_authorization_result_get_temporary_authorization_id
polkit_authorization_result_get_locked_down
polkit_authorization_result_get_details
<SUBSECTION Standard>
PolkitAuthorizationResultClass
......@@ -288,10 +281,6 @@ polkit_backend_authority_enumerate_actions
polkit_backend_authority_system_bus_name_owner_changed
polkit_backend_authority_enumerate_temporary_authorizations
polkit_backend_authority_revoke_temporary_authorizations
polkit_backend_authority_add_lockdown_for_action
polkit_backend_authority_add_lockdown_for_action_finish
polkit_backend_authority_remove_lockdown_for_action
polkit_backend_authority_remove_lockdown_for_action_finish
polkit_backend_authority_get
polkit_backend_authority_register
polkit_backend_authority_unregister
......
......@@ -1382,206 +1382,6 @@ polkit_authority_revoke_temporary_authorization_by_id_sync (PolkitAuthority
/* ---------------------------------------------------------------------------------------------------- */
/**
* polkit_authority_add_lockdown_for_action:
* @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.
*
* 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.
*/
void
polkit_authority_add_lockdown_for_action (PolkitAuthority *authority,
const gchar *action_id,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
g_dbus_proxy_call (authority->proxy,
"AddLockdownForAction",
g_variant_new ("(s)",
action_id),
G_DBUS_CALL_FLAGS_NONE,
-1,
cancellable,
generic_async_cb,
g_simple_async_result_new (G_OBJECT (authority),
callback,
user_data,
polkit_authority_add_lockdown_for_action));
}
/**
* polkit_authority_add_lockdown_for_action_finish:
* @authority: A #PolkitAuthority.
* @res: A #GAsyncResult obtained from the callback.
* @error: Return location for error or %NULL.
*
* Finishes locking down an action.
*
* Returns: %TRUE if the action was locked down, %FALSE if error is set.
**/
gboolean
polkit_authority_add_lockdown_for_action_finish (PolkitAuthority *authority,
GAsyncResult *res,
GError **error)
{
gboolean ret;
GVariant *value;
GAsyncResult *_res;
ret = FALSE;
g_warn_if_fail (g_simple_async_result_get_source_tag (G_SIMPLE_ASYNC_RESULT (res)) == polkit_authority_add_lockdown_for_action);
_res = G_ASYNC_RESULT (g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (res)));
value = g_dbus_proxy_call_finish (authority->proxy, _res, error);
if (value == NULL)
goto out;
ret = TRUE;
g_variant_unref (value);
out:
return ret;
}
/**
* polkit_authority_add_lockdown_for_action_sync:
* @authority: A #PolkitAuthority.
* @action_id: The identifier for the action.
* @cancellable: A #GCancellable or %NULL.
* @error: Return location for error or %NULL.
*
* Synchronously locks down an action.
*
* Returns: %TRUE if the action was locked down, %FALSE if error is set.
**/
gboolean
polkit_authority_add_lockdown_for_action_sync (PolkitAuthority *authority,
const gchar *action_id,
GCancellable *cancellable,
GError **error)
{
gboolean ret;
CallSyncData *data;
data = call_sync_new ();
polkit_authority_add_lockdown_for_action (authority, action_id, cancellable, call_sync_cb, data);
call_sync_block (data);
ret = polkit_authority_add_lockdown_for_action_finish (authority, data->res, error);
call_sync_free (data);
return ret;
}
/* ---------------------------------------------------------------------------------------------------- */
/**
* polkit_authority_remove_lockdown_for_action:
* @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.
*
* 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.
*/
void
polkit_authority_remove_lockdown_for_action (PolkitAuthority *authority,
const gchar *action_id,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
g_dbus_proxy_call (authority->proxy,
"RemoveLockdownForAction",
g_variant_new ("(s)",
action_id),
G_DBUS_CALL_FLAGS_NONE,
-1,
cancellable,
generic_async_cb,
g_simple_async_result_new (G_OBJECT (authority),
callback,
user_data,
polkit_authority_remove_lockdown_for_action));
}
/**
* polkit_authority_remove_lockdown_for_action_finish:
* @authority: A #PolkitAuthority.
* @res: A #GAsyncResult obtained from the callback.
* @error: Return location for error or %NULL.
*
* Finishes removing lock down for an action.
*
* Returns: %TRUE if the action was locked down, %FALSE if error is set.
**/
gboolean
polkit_authority_remove_lockdown_for_action_finish (PolkitAuthority *authority,
GAsyncResult *res,
GError **error)
{
gboolean ret;
GVariant *value;
GAsyncResult *_res;
ret = FALSE;
g_warn_if_fail (g_simple_async_result_get_source_tag (G_SIMPLE_ASYNC_RESULT (res)) == polkit_authority_remove_lockdown_for_action);
_res = G_ASYNC_RESULT (g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (res)));
value = g_dbus_proxy_call_finish (authority->proxy, _res, error);
if (value == NULL)
goto out;
ret = TRUE;
g_variant_unref (value);
out:
return ret;
}
/**
* polkit_authority_remove_lockdown_for_action_sync:
* @authority: A #PolkitAuthority.
* @action_id: The identifier for the action.
* @cancellable: A #GCancellable or %NULL.
* @error: Return location for error or %NULL.
*
* Synchronously removes lock down for an action.
*
* Returns: %TRUE if the action was locked down, %FALSE if error is set.
**/
gboolean
polkit_authority_remove_lockdown_for_action_sync (PolkitAuthority *authority,
const gchar *action_id,
GCancellable *cancellable,
GError **error)
{
gboolean ret;
CallSyncData *data;
data = call_sync_new ();
polkit_authority_remove_lockdown_for_action (authority, action_id, cancellable, call_sync_cb, data);
call_sync_block (data);
ret = polkit_authority_remove_lockdown_for_action_finish (authority, data->res, error);
call_sync_free (data);
return ret;
}
/* ---------------------------------------------------------------------------------------------------- */
/**
* polkit_authority_get_owner:
* @authority: A #PolkitAuthority.
......
......@@ -110,16 +110,6 @@ gboolean polkit_authority_revoke_temporary_authorization_by_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);
/* ---------------------------------------------------------------------------------------------------- */
void polkit_authority_enumerate_actions (PolkitAuthority *authority,
......@@ -208,26 +198,6 @@ gboolean polkit_authority_revoke_temporary_authorization_by_id
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);
/* ---------------------------------------------------------------------------------------------------- */
G_END_DECLS
......
......@@ -227,32 +227,6 @@ polkit_authorization_result_get_temporary_authorization_id (PolkitAuthorizationR
return ret;
}
/**
* polkit_authorization_result_get_locked_down:
* @result: A #PolkitAuthorizationResult.
*
* Gets whether the action is locked down via
* e.g. polkit_authority_add_lockdown_for_action().
*
* This method simply reads the value of the key/value pair in @details with the
* key <literal>polkit.lockdown</literal>.
*
* Returns: %TRUE if the action for the authorization is locked down.
*/
gboolean
polkit_authorization_result_get_locked_down (PolkitAuthorizationResult *result)
{
gboolean ret;
PolkitDetails *details;
ret = FALSE;
details = polkit_authorization_result_get_details (result);
if (details != NULL && polkit_details_lookup (details, "polkit.lockdown") != NULL)
ret = TRUE;
return ret;
}
PolkitAuthorizationResult *
polkit_authorization_result_new_for_gvariant (GVariant *value)
{
......
......@@ -52,7 +52,6 @@ gboolean polkit_authorization_result_get_is_authorized (P
gboolean polkit_authorization_result_get_is_challenge (PolkitAuthorizationResult *result);
gboolean polkit_authorization_result_get_retains_authorization (PolkitAuthorizationResult *result);
const gchar *polkit_authorization_result_get_temporary_authorization_id (PolkitAuthorizationResult *result);
gboolean polkit_authorization_result_get_locked_down (PolkitAuthorizationResult *result);
/* ---------------------------------------------------------------------------------------------------- */
......
......@@ -498,154 +498,6 @@ polkit_backend_authority_revoke_temporary_authorization_by_id (PolkitBackendAuth
}
}
/**
* polkit_backend_authority_add_lockdown_for_action:
* @authority: A #PolkitBackendAuthority.
* @caller: The system bus name that called the method.
* @action_id: The action id.
* @callback: A #GAsyncReadyCallback to call when the request is satisfied.
* @user_data: The data to pass to @callback.
*
* Asynchronously add locks down for @action_id.
*
* When the operation is finished, @callback will be invoked. You can
* then call polkit_backend_authority_add_lockdown_for_action_finish()
* to get the result of the operation.
*/
void
polkit_backend_authority_add_lockdown_for_action (PolkitBackendAuthority *authority,
PolkitSubject *caller,
const gchar *action_id,
GAsyncReadyCallback callback,
gpointer user_data)
{
PolkitBackendAuthorityClass *klass;
klass = POLKIT_BACKEND_AUTHORITY_GET_CLASS (authority);
if (klass->add_lockdown_for_action == NULL)
{
GSimpleAsyncResult *simple;
simple = g_simple_async_result_new_error (G_OBJECT (authority),
callback,
user_data,
POLKIT_ERROR,
POLKIT_ERROR_NOT_SUPPORTED,
"Operation not supported");
g_simple_async_result_complete (simple);
g_object_unref (simple);
}
else
{
klass->add_lockdown_for_action (authority, caller, action_id, callback, user_data);
}
}
/**
* polkit_backend_authority_add_lockdown_for_action_finish:
* @authority: A #PolkitBackendAuthority.
* @res: A #GAsyncResult obtained from the callback.
* @error: Return location for error or %NULL.
*
* Finishes adding lock down for an action.
*
* Returns: %TRUE if the operation succeeded or, %FALE if @error is set.
*/
gboolean
polkit_backend_authority_add_lockdown_for_action_finish (PolkitBackendAuthority *authority,
GAsyncResult *res,
GError **error)
{
PolkitBackendAuthorityClass *klass;
klass = POLKIT_BACKEND_AUTHORITY_GET_CLASS (authority);
if (klass->add_lockdown_for_action_finish == NULL)
{
g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error);
return FALSE;
}
else
{
return klass->add_lockdown_for_action_finish (authority, res, error);
}
}
/**
* polkit_backend_authority_remove_lockdown_for_action:
* @authority: A #PolkitBackendAuthority.
* @caller: The system bus name that called the method.
* @action_id: The action id.
* @callback: A #GAsyncReadyCallback to call when the request is satisfied.
* @user_data: The data to pass to @callback.
*
* Asynchronously remove locks down for @action_id.
*
* When the operation is finished, @callback will be invoked. You can
* then call polkit_backend_authority_remove_lockdown_for_action_finish()
* to get the result of the operation.
*/
void
polkit_backend_authority_remove_lockdown_for_action (PolkitBackendAuthority *authority,
PolkitSubject *caller,
const gchar *action_id,
GAsyncReadyCallback callback,
gpointer user_data)
{
PolkitBackendAuthorityClass *klass;
klass = POLKIT_BACKEND_AUTHORITY_GET_CLASS (authority);
if (klass->remove_lockdown_for_action == NULL)
{
GSimpleAsyncResult *simple;
simple = g_simple_async_result_new_error (G_OBJECT (authority),
callback,
user_data,
POLKIT_ERROR,
POLKIT_ERROR_NOT_SUPPORTED,
"Operation not supported");
g_simple_async_result_complete (simple);
g_object_unref (simple);
}
else
{
klass->remove_lockdown_for_action (authority, caller, action_id, callback, user_data);
}
}
/**
* polkit_backend_authority_remove_lockdown_for_action_finish:
* @authority: A #PolkitBackendAuthority.
* @res: A #GAsyncResult obtained from the callback.
* @error: Return location for error or %NULL.
*
* Finishes removing lock down for an action.
*
* Returns: %TRUE if the operation succeeded or, %FALE if @error is set.
*/
gboolean
polkit_backend_authority_remove_lockdown_for_action_finish (PolkitBackendAuthority *authority,
GAsyncResult *res,
GError **error)
{
PolkitBackendAuthorityClass *klass;
klass = POLKIT_BACKEND_AUTHORITY_GET_CLASS (authority);
if (klass->remove_lockdown_for_action_finish == NULL)
{
g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error);
return FALSE;
}
else
{
return klass->remove_lockdown_for_action_finish (authority, res, error);
}
}
/* ---------------------------------------------------------------------------------------------------- */
typedef struct
......@@ -758,12 +610,6 @@ static const gchar *server_introspection_data =
" <method name='RevokeTemporaryAuthorizationById'>"
" <arg type='s' name='id' direction='in'/>"
" </method>"
" <method name='AddLockdownForAction'>"
" <arg type='s' name='action_id' direction='in'/>"
" </method>"
" <method name='RemoveLockdownForAction'>"
" <arg type='s' name='action_id' direction='in'/>"
" </method>"
" <signal name='Changed'/>"
" <property type='s' name='BackendName' access='read'/>"
" <property type='s' name='BackendVersion' access='read'/>"
......@@ -1280,7 +1126,7 @@ server_handle_revoke_temporary_authorization_by_id (Server *serv
const gchar *id;
g_variant_get (parameters,
"(@s)",
"(&s)",
&id);
error = NULL;
......@@ -1302,36 +1148,6 @@ server_handle_revoke_temporary_authorization_by_id (Server *serv
/* ---------------------------------------------------------------------------------------------------- */
static void
server_handle_add_lockdown_for_action (Server *server,
GVariant *parameters,
PolkitSubject *caller,
GDBusMethodInvocation *invocation)
{
/* TODO: probably want to nuke this method so don't implement now */
g_dbus_method_invocation_return_error (invocation,
POLKIT_ERROR,
POLKIT_ERROR_NOT_SUPPORTED,
"Operation is not supported");
}
/* ---------------------------------------------------------------------------------------------------- */
static void
server_handle_remove_lockdown_for_action (Server *server,
GVariant *parameters,
PolkitSubject *caller,
GDBusMethodInvocation *invocation)
{
/* TODO: probably want to nuke this method so don't implement now */
g_dbus_method_invocation_return_error (invocation,
POLKIT_ERROR,
POLKIT_ERROR_NOT_SUPPORTED,
"Operation is not supported");
}
/* ---------------------------------------------------------------------------------------------------- */
static void
server_handle_method_call (GDBusConnection *connection,
const gchar *sender,
......@@ -1365,10 +1181,6 @@ server_handle_method_call (GDBusConnection *connection,
server_handle_revoke_temporary_authorizations (server, parameters, caller, invocation);
else if (g_strcmp0 (method_name, "RevokeTemporaryAuthorizationById") == 0)
server_handle_revoke_temporary_authorization_by_id (server, parameters, caller, invocation);
else if (g_strcmp0 (method_name, "AddLockdownForAction") == 0)
server_handle_add_lockdown_for_action (server, parameters, caller, invocation);
else if (g_strcmp0 (method_name, "RemoveLockdownForAction") == 0)
server_handle_remove_lockdown_for_action (server, parameters, caller, invocation);
else
g_assert_not_reached ();
......
......@@ -98,10 +98,6 @@ struct _PolkitBackendAuthority
* authorization identified by id or %NULL if the backend doesn't support
* the operation. See polkit_backend_authority_revoke_temporary_authorization_by_id()
* for details.
* @add_lockdown_for_action: Called to add lock down for an action. See polkit_backend_authority_add_lockdown_for_action() for details. Can be %NULL if not supported by the backend.
* @add_lockdown_for_action_finish: Called to finish adding lock down for an an action. See polkit_backend_authority_add_lockdown_for_action_finish() for details. Can be %NULL if not supported by the backend.
* @remove_lockdown_for_action: Called when removing lock down for an action. See polkit_backend_authority_remove_lockdown_for_action() for details. Can be %NULL if not supported by the backend.
* @remove_lockdown_for_action_finish: Called to finish removing lock down for an action. See polkit_backend_authority_remove_lockdown_for_action_finish() for details. Can be %NULL if not supported by the backend.
* @system_bus_name_owner_changed: temporary VFunc, to be removed before API is declared stable.
*
* VFuncs that authority backends need to implement.
......@@ -173,26 +169,6 @@ struct _PolkitBackendAuthorityClass
const gchar *id,
GError **error);
void (*add_lockdown_for_action) (PolkitBackendAuthority *authority,
PolkitSubject *caller,
const gchar *action_id,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*add_lockdown_for_action_finish) (PolkitBackendAuthority *authority,
GAsyncResult *res,
GError **error);
void (*remove_lockdown_for_action) (PolkitBackendAuthority *authority,
PolkitSubject *caller,
const gchar *action_id,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*remove_lockdown_for_action_finish) (PolkitBackendAuthority *authority,
GAsyncResult *res,
GError **error);
/* TODO: need something more efficient such that we don't watch all name changes */
void (*system_bus_name_owner_changed) (PolkitBackendAuthority *authority,
const gchar *name,
......@@ -305,26 +281,6 @@ gboolean polkit_backend_authority_revoke_temporary_authorization_by_id (PolkitBa
const gchar *id,
GError **error);
void polkit_backend_authority_add_lockdown_for_action (PolkitBackendAuthority *authority,
PolkitSubject *caller,
const gchar *action_id,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean polkit_backend_authority_add_lockdown_for_action_finish (PolkitBackendAuthority *authority,
GAsyncResult *res,
GError **error);
void polkit_backend_authority_remove_lockdown_for_action (PolkitBackendAuthority *authority,
PolkitSubject *caller,
const gchar *action_id,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean polkit_backend_authority_remove_lockdown_for_action_finish (PolkitBackendAuthority *authority,
GAsyncResult *res,
GError **error);
/* --- */
PolkitBackendAuthority *polkit_backend_authority_get (void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment