summaryrefslogtreecommitdiff
path: root/server/infopipe/infopipe.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-01-26 16:01:26 -0500
committerSimo Sorce <idra@samba.org>2009-01-27 11:44:12 -0500
commitde38bb8f2f04dcefbbe4a998c9bd8532c844bcc0 (patch)
tree07302d5e1c9c5c19e2df77dd7c19bf998ae14ac5 /server/infopipe/infopipe.c
parent27ee5a204b8927adcc1e340b12d2edf1c70d9ba5 (diff)
downloadsssd-de38bb8f2f04dcefbbe4a998c9bd8532c844bcc0.tar.gz
sssd-de38bb8f2f04dcefbbe4a998c9bd8532c844bcc0.tar.bz2
sssd-de38bb8f2f04dcefbbe4a998c9bd8532c844bcc0.zip
Preliminary support for enabling InfoPipe to listen on the D-BUS system bus. It will connect and authenticate successfully (using the included D-BUS policy file installed in the correct /etc directory. Does not yet listen for requests.
Diffstat (limited to 'server/infopipe/infopipe.c')
-rw-r--r--server/infopipe/infopipe.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/server/infopipe/infopipe.c b/server/infopipe/infopipe.c
index 14e0354f..81541d82 100644
--- a/server/infopipe/infopipe.c
+++ b/server/infopipe/infopipe.c
@@ -24,15 +24,22 @@
#include "popt.h"
#include "infopipe.h"
#include "util/util.h"
+#include "sbus/sssd_dbus.h"
#include "sbus/sbus_client.h"
#include "monitor/monitor_sbus.h"
#include "monitor/monitor_interfaces.h"
+#include "infopipe/sysbus.h"
struct infp_ctx {
struct event_context *ev;
struct confdb_ctx *cdb;
struct service_sbus_ctx *ss_ctx;
- struct sbus_srv_ctx *sbus_srv;
+ struct sysbus_ctx *sysbus;
+};
+
+struct sbus_method infp_methods[] = {
+ { SYSBUS_GET_PARAM, sysbus_get_param },
+ { NULL, NULL }
};
static int service_identity(DBusMessage *message, void *data, DBusMessage **r)
@@ -142,10 +149,15 @@ static int infp_process_init(TALLOC_CTX *mem_ctx,
infp_ctx->ev = ev;
infp_ctx->cdb = cdb;
+ /* Connect to the monitor */
ret = infp_monitor_init(infp_ctx);
if (ret != EOK) {
DEBUG(0, ("Fatal error setting up monitor bus\n"));
}
+
+ /* Connect to the D-BUS system bus */
+ ret = sysbus_init(infp_ctx, &infp_ctx->sysbus, infp_methods);
+
return ret;
}