summaryrefslogtreecommitdiffstats
path: root/server/polkit
diff options
context:
space:
mode:
Diffstat (limited to 'server/polkit')
-rw-r--r--server/polkit/sssd_polkit.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/server/polkit/sssd_polkit.c b/server/polkit/sssd_polkit.c
index 9eda53734..6c7d0e1e8 100644
--- a/server/polkit/sssd_polkit.c
+++ b/server/polkit/sssd_polkit.c
@@ -35,16 +35,17 @@ struct spk_ctx {
struct sbus_srv_ctx *sbus_srv;
};
-static int service_identity(DBusMessage *message, struct sbus_message_ctx *reply)
+static int service_identity(DBusMessage *message, void *data, DBusMessage **r)
{
dbus_uint16_t version = POLKIT_VERSION;
const char *name = POLKIT_SERVICE_NAME;
+ DBusMessage *reply;
dbus_bool_t ret;
DEBUG(4, ("Sending identity data [%s,%d]\n", name, version));
- reply->reply_message = dbus_message_new_method_return(message);
- ret = dbus_message_append_args(reply->reply_message,
+ reply = dbus_message_new_method_return(message);
+ ret = dbus_message_append_args(reply,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_UINT16, &version,
DBUS_TYPE_INVALID);
@@ -52,30 +53,33 @@ static int service_identity(DBusMessage *message, struct sbus_message_ctx *reply
return EIO;
}
+ *r = reply;
return EOK;
}
-static int service_pong(DBusMessage *message, struct sbus_message_ctx *reply)
+static int service_pong(DBusMessage *message, void *data, DBusMessage **r)
{
+ DBusMessage *reply;
dbus_bool_t ret;
- reply->reply_message = dbus_message_new_method_return(message);
- ret = dbus_message_append_args(reply->reply_message, DBUS_TYPE_INVALID);
+ reply = dbus_message_new_method_return(message);
+ ret = dbus_message_append_args(reply, DBUS_TYPE_INVALID);
if (!ret) {
return EIO;
}
+ *r = reply;
return EOK;
}
-static int service_reload(DBusMessage *message, struct sbus_message_ctx *reply) {
+static int service_reload(DBusMessage *message, void *data, DBusMessage **r) {
/* Monitor calls this function when we need to reload
* our configuration information. Perform whatever steps
* are needed to update the configuration objects.
*/
/* Send an empty reply to acknowledge receipt */
- return service_pong(message, reply);
+ return service_pong(message, data, r);
}
struct sbus_method mon_sbus_methods[] = {