From 96b1d59f8ddd882b1e94735aeaba7a04cf8d24c9 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 19 Feb 2009 14:34:00 -0500 Subject: [PATCH] Adding initial framework for the InfoPipe --- server/infopipe/infopipe.c | 22 ++- server/infopipe/infopipe.h | 71 ++++++ server/infopipe/infopipe_groups.c | 49 ++++ server/infopipe/infopipe_users.c | 53 +++++ .../org.freeipa.sssd.infopipe.Introspect.xml | 231 ++++++++++++++++++++ server/infopipe/org.freeipa.sssd.infopipe.conf | 12 +- server/infopipe/sysbus.c | 158 ------------- server/infopipe/sysbus.h | 35 --- server/server.mk | 6 +- server/util/sysbus.c | 153 +++++++++++++ server/util/sysbus.h | 33 +++ 11 files changed, 611 insertions(+), 212 deletions(-) create mode 100644 server/infopipe/infopipe_groups.c create mode 100644 server/infopipe/infopipe_users.c create mode 100644 server/infopipe/org.freeipa.sssd.infopipe.Introspect.xml delete mode 100644 server/infopipe/sysbus.c delete mode 100644 server/infopipe/sysbus.h create mode 100644 server/util/sysbus.c create mode 100644 server/util/sysbus.h diff --git a/server/infopipe/infopipe.c b/server/infopipe/infopipe.c index a0654c4..461ee6b 100644 --- a/server/infopipe/infopipe.c +++ b/server/infopipe/infopipe.c @@ -22,13 +22,14 @@ #include #include #include "popt.h" -#include "infopipe.h" #include "util/util.h" +#include "util/btreemap.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" +#include "util/sysbus.h" +#include "infopipe.h" struct infp_ctx { struct event_context *ev; @@ -37,11 +38,6 @@ struct infp_ctx { struct sysbus_ctx *sysbus; }; -struct sbus_method infp_methods[] = { - { SYSBUS_READ_ATTR, sysbus_get_param }, - { NULL, NULL } -}; - static int service_identity(DBusMessage *message, void *data, DBusMessage **r) { dbus_uint16_t version = INFOPIPE_VERSION; @@ -134,12 +130,17 @@ static int infp_monitor_init(struct infp_ctx *infp_ctx) return EOK; } +struct sbus_method infp_methods[] = { + INFP_USER_METHODS + INFP_GROUP_METHODS + { NULL, NULL } +}; + static int infp_process_init(TALLOC_CTX *mem_ctx, struct event_context *ev, struct confdb_ctx *cdb) { struct infp_ctx *infp_ctx; - struct DBusConnection *conn; int ret; infp_ctx = talloc_zero(mem_ctx, struct infp_ctx); @@ -164,6 +165,11 @@ static int infp_process_init(TALLOC_CTX *mem_ctx, return EIO; } + /* Add the infp_ctx to the sbus_conn_ctx private data + * so we can pass it into message handler functions + */ + sbus_conn_set_private_data(sysbus_get_sbus_conn(infp_ctx->sysbus), infp_ctx); + return ret; } diff --git a/server/infopipe/infopipe.h b/server/infopipe/infopipe.h index dcd3e4f..861c3a5 100644 --- a/server/infopipe/infopipe.h +++ b/server/infopipe/infopipe.h @@ -28,4 +28,75 @@ #define INFOPIPE_VERSION 0x0001 #define INFOPIPE_SERVICE_NAME "infp" +/* InfoPipe Methods + * NOTE: Any changes to the method names and arguments for these calls + * must also be updated in the org.freeipa.sssd.infopipe.Introspect.xml + * or clients may not behave properly. + */ + +/********************************************************** + * Introspection Methods (from infopipe.c) * + **********************************************************/ + +/* This function must be exposed through the + * org.freedesktop.DBus.Introspectable interface + */ +#define INFP_INTROSPECT "Introspect" +int infp_introspect(DBusMessage *message, void *data, DBusMessage **r); + +/********************************************************** + * User Methods (from infopipe_users.c) * + **********************************************************/ +#define INFP_USERS_GET_CACHED "GetCachedUsers" +int infp_users_get_cached(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_USERS_CREATE "CreateUser" +int infp_users_create(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_USERS_DELETE "DeleteUser" +int infp_users_delete(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_USERS_GET_ATTR "GetUserAttributes" +int infp_users_get_attr(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_USERS_SET_ATTR "SetUserAttributes" +int infp_users_set_attr(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_USERS_SET_UID "Set_YouReallyDoNotWantToUseThisFunction_UserUID" +int infp_users_set_uid(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_USER_METHODS \ + {INFP_USERS_GET_CACHED, infp_users_get_cached}, \ + {INFP_USERS_CREATE, infp_users_create}, \ + {INFP_USERS_DELETE, infp_users_delete}, \ + {INFP_USERS_GET_ATTR, infp_users_get_attr}, \ + {INFP_USERS_SET_ATTR, infp_users_set_attr}, \ + {INFP_USERS_SET_UID, infp_users_set_uid}, + +/********************************************************** + * Group Methods (from infopipe_groups.c) * + **********************************************************/ + +#define INFP_GROUPS_CREATE "CreateGroup" +int infp_groups_create(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_GROUPS_DELETE "DeleteGroup" +int infp_groups_delete(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_GROUPS_ADD_MEMBERS "AddGroupMembers" +int infp_groups_add_members(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_GROUPS_REMOVE_MEMBERS "RemoveGroupMembers" +int infp_groups_remove_members(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_GROUPS_SET_GID "Set_YouReallyDoNotWantToUseThisFunction_GroupGID" +int infp_groups_set_gid(DBusMessage *message, void *data, DBusMessage **r); + +#define INFP_GROUP_METHODS \ + {INFP_GROUPS_CREATE, infp_groups_create}, \ + {INFP_GROUPS_DELETE, infp_groups_delete}, \ + {INFP_GROUPS_ADD_MEMBERS, infp_groups_add_members}, \ + {INFP_GROUPS_REMOVE_MEMBERS, infp_groups_remove_members}, \ + {INFP_GROUPS_SET_GID, infp_groups_set_gid}, + #endif /* INFOPIPE_H_ */ diff --git a/server/infopipe/infopipe_groups.c b/server/infopipe/infopipe_groups.c new file mode 100644 index 0000000..e566d66 --- /dev/null +++ b/server/infopipe/infopipe_groups.c @@ -0,0 +1,49 @@ +/* + SSSD + + InfoPipe + + Copyright (C) Stephen Gallagher 2009 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include "util/util.h" +#include "infopipe.h" + +int infp_groups_create(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} + +int infp_groups_delete(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} + +int infp_groups_add_members(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} + +int infp_groups_remove_members(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} + +int infp_groups_set_gid(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} diff --git a/server/infopipe/infopipe_users.c b/server/infopipe/infopipe_users.c new file mode 100644 index 0000000..40cffeb --- /dev/null +++ b/server/infopipe/infopipe_users.c @@ -0,0 +1,53 @@ +/* + SSSD + + InfoPipe + + Copyright (C) Stephen Gallagher 2009 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#include +#include "util/util.h" +#include "infopipe.h" + +int infp_users_get_cached(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} + +int infp_users_create(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} + +int infp_users_delete(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} + +int infp_users_get_attr(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} + +int infp_users_set_attr(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; /* Not yet implemented */ +} + +int infp_users_set_uid(DBusMessage *message, void *data, DBusMessage **r) +{ + return EIO; +} diff --git a/server/infopipe/org.freeipa.sssd.infopipe.Introspect.xml b/server/infopipe/org.freeipa.sssd.infopipe.Introspect.xml new file mode 100644 index 0000000..e969440 --- /dev/null +++ b/server/infopipe/org.freeipa.sssd.infopipe.Introspect.xml @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/infopipe/org.freeipa.sssd.infopipe.conf b/server/infopipe/org.freeipa.sssd.infopipe.conf index 8b3c760..74ec495 100644 --- a/server/infopipe/org.freeipa.sssd.infopipe.conf +++ b/server/infopipe/org.freeipa.sssd.infopipe.conf @@ -12,17 +12,11 @@ - + + within the InfoPipe Daemon. --> - - - - + diff --git a/server/infopipe/sysbus.c b/server/infopipe/sysbus.c deleted file mode 100644 index 1422eb2..0000000 --- a/server/infopipe/sysbus.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - SSSD - - SystemBus Helpers - - Copyright (C) Stephen Gallagher 2009 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include "talloc.h" -#include "tevent.h" -#include "util/util.h" -#include "dbus/dbus.h" -#include "sbus/sssd_dbus.h" -#include "sysbus.h" -#include "infopipe/infopipe.h" - -struct sysbus_ctx { - struct sbus_conn_ctx *sconn; - struct sbus_method_ctx *sm_ctx; - void *pvt_data; -}; - -static int sysbus_destructor(TALLOC_CTX *ctx) { - struct sysbus_ctx *system_bus = talloc_get_type(ctx, struct sysbus_ctx); - dbus_connection_unref(sbus_get_connection(system_bus->sconn)); - return EOK; -} - -static int sysbus_init_methods(TALLOC_CTX *mem_ctx, struct sysbus_ctx *sysbus, struct sbus_method *methods, struct sbus_method_ctx **sm_ctx) -{ - int ret; - TALLOC_CTX *tmp_ctx; - struct sbus_method_ctx *method_ctx; - - tmp_ctx = talloc_new(mem_ctx); - if(!tmp_ctx) { - return ENOMEM; - } - - method_ctx = talloc_zero(tmp_ctx, struct sbus_method_ctx); - if (!method_ctx) { - ret = ENOMEM; - goto done; - } - - method_ctx->interface = talloc_strdup(method_ctx, INFOPIPE_INTERFACE); - if (method_ctx->interface == NULL) { - ret = ENOMEM; - goto done; - } - - method_ctx->path = talloc_strdup(method_ctx, INFOPIPE_PATH); - if (method_ctx->path == NULL) { - ret = ENOMEM; - goto done; - } - - method_ctx->methods = methods; - method_ctx->message_handler = sbus_message_handler; - - *sm_ctx = method_ctx; - talloc_steal(mem_ctx, method_ctx); - - ret = EOK; -done: - talloc_free(tmp_ctx); - return ret; -} - -int sysbus_init(TALLOC_CTX *mem_ctx, struct sysbus_ctx **sysbus, - struct event_context *ev, const char *dbus_name, - struct sbus_method *methods) -{ - DBusError dbus_error; - DBusConnection *conn; - struct sysbus_ctx *system_bus; - int ret; - - system_bus = talloc_zero(mem_ctx, struct sysbus_ctx); - if (system_bus == NULL) { - return ENOMEM; - } - - dbus_error_init(&dbus_error); - - /* Connect to the well-known system bus */ - conn = dbus_bus_get(DBUS_BUS_SYSTEM, &dbus_error); - if (conn == NULL) { - DEBUG(0, ("Failed to connect to D-BUS system bus.\n")); - talloc_free(system_bus); - return EIO; - } - dbus_connection_set_exit_on_disconnect(conn, FALSE); - talloc_set_destructor((TALLOC_CTX *)system_bus, - sysbus_destructor); - - ret = dbus_bus_request_name(conn, - dbus_name, - /* We want exclusive access */ - DBUS_NAME_FLAG_DO_NOT_QUEUE, - &dbus_error - ); - if (ret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - /* We were unable to register on the system bus */ - DEBUG(0, ("Unable to request name on the system bus. Error: %s\n", dbus_error.message)); - talloc_free(system_bus); - return EIO; - } - - DEBUG(1, ("Listening on %s\n", INFOPIPE_DBUS_NAME)); - - /* Integrate with TEvent loop */ - ret = sbus_add_connection(system_bus, ev, conn, &system_bus->sconn, SBUS_CONN_TYPE_SHARED); - if (ret != EOK) { - DEBUG(0, ("Could not integrate D-BUS into mainloop.\n")); - talloc_free(system_bus); - return ret; - } - - /* Set up methods */ - ret = sysbus_init_methods(system_bus, system_bus, methods, &system_bus->sm_ctx); - if (ret != EOK) { - talloc_free(system_bus); - return ret; - } - - ret = sbus_conn_add_method_ctx(system_bus->sconn, system_bus->sm_ctx); - if (ret != EOK) { - talloc_free(system_bus); - return ret; - } - - *sysbus = system_bus; - return EOK; -} - -int sysbus_get_param(DBusMessage *message, void *data, DBusMessage **r) { - /* TODO: remove this */ - DEBUG(0, ("Received message. Printing this garbage.\n")); - return EOK; -} - -DBusConnection *sysbus_get_dbus_conn(struct sysbus_ctx *sysbus) { - return sbus_get_connection(sysbus->sconn); -} diff --git a/server/infopipe/sysbus.h b/server/infopipe/sysbus.h deleted file mode 100644 index 00e36cc..0000000 --- a/server/infopipe/sysbus.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - SSSD - - SystemBus Helpers - - Copyright (C) Stephen Gallagher 2009 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#ifndef SYSBUS_H_ -#define SYSBUS_H_ - -#define SYSBUS_READ_ATTR "ReadAttribute" - -struct sysbus_ctx; - -int sysbus_init(TALLOC_CTX *mem_ctx, struct sysbus_ctx **sysbus, - struct event_context *ev, const char *dbus_name, - struct sbus_method *methods); - -int sysbus_get_param(DBusMessage *message, void *data, DBusMessage **r); - -#endif /* SYSBUS_H_ */ diff --git a/server/server.mk b/server/server.mk index 4832f00..53801fb 100644 --- a/server/server.mk +++ b/server/server.mk @@ -4,6 +4,7 @@ UTIL_OBJ = \ util/server.o \ util/memory.o \ util/btreemap.o \ + util/sysbus.o \ monitor/monitor_sbus.o \ providers/dp_sbus.o \ sbus/sssd_dbus_common.o \ @@ -35,7 +36,8 @@ NSSSRV_OBJ = \ INFOPIPE_OBJ = \ infopipe/infopipe.o \ - infopipe/sysbus.o + infopipe/infopipe_users.o \ + infopipe/infopipe_groups.o POLKIT_OBJ = \ polkit/sssd_polkit.o @@ -75,4 +77,4 @@ lib/memberof.$(SHLIBEXT): $(MEMBEROF_OBJ) #Tests tests/sysdb-tests: $(SYSDB_TEST_OBJ) $(UTIL_OBJ) lib/libsysdb.$(SHLIBEXT) - $(CC) -o tests/sysdb-tests $(SYSDB_TEST_OBJ) $(UTIL_OBJ) -lsysdb $(LDFLAGS) $(LIBS) $(CHECK_LIBS) \ No newline at end of file + $(CC) -o tests/sysdb-tests $(SYSDB_TEST_OBJ) $(UTIL_OBJ) -lsysdb $(LDFLAGS) $(LIBS) $(CHECK_LIBS) diff --git a/server/util/sysbus.c b/server/util/sysbus.c new file mode 100644 index 0000000..dd0ff47 --- /dev/null +++ b/server/util/sysbus.c @@ -0,0 +1,153 @@ +/* + SSSD + + SystemBus Helpers + + Copyright (C) Stephen Gallagher 2009 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "talloc.h" +#include "tevent.h" +#include "util/util.h" +#include "dbus/dbus.h" +#include "sbus/sssd_dbus.h" +#include "sysbus.h" +#include "infopipe/infopipe.h" + +struct sysbus_ctx { + struct sbus_conn_ctx *sconn; + struct sbus_method_ctx *sm_ctx; + void *pvt_data; +}; + +static int sysbus_destructor(TALLOC_CTX *ctx) { + struct sysbus_ctx *system_bus = talloc_get_type(ctx, struct sysbus_ctx); + dbus_connection_unref(sbus_get_connection(system_bus->sconn)); + return EOK; +} + +static int sysbus_init_methods(TALLOC_CTX *mem_ctx, struct sysbus_ctx *sysbus, struct sbus_method *methods, struct sbus_method_ctx **sm_ctx) +{ + int ret; + TALLOC_CTX *tmp_ctx; + struct sbus_method_ctx *method_ctx; + + tmp_ctx = talloc_new(mem_ctx); + if(!tmp_ctx) { + return ENOMEM; + } + + method_ctx = talloc_zero(tmp_ctx, struct sbus_method_ctx); + if (!method_ctx) { + ret = ENOMEM; + goto done; + } + + method_ctx->interface = talloc_strdup(method_ctx, INFOPIPE_INTERFACE); + if (method_ctx->interface == NULL) { + ret = ENOMEM; + goto done; + } + + method_ctx->path = talloc_strdup(method_ctx, INFOPIPE_PATH); + if (method_ctx->path == NULL) { + ret = ENOMEM; + goto done; + } + + method_ctx->methods = methods; + method_ctx->message_handler = sbus_message_handler; + + *sm_ctx = method_ctx; + talloc_steal(mem_ctx, method_ctx); + + ret = EOK; +done: + talloc_free(tmp_ctx); + return ret; +} + +int sysbus_init(TALLOC_CTX *mem_ctx, struct sysbus_ctx **sysbus, + struct event_context *ev, const char *dbus_name, + struct sbus_method *methods) +{ + DBusError dbus_error; + DBusConnection *conn; + struct sysbus_ctx *system_bus; + int ret; + + system_bus = talloc_zero(mem_ctx, struct sysbus_ctx); + if (system_bus == NULL) { + return ENOMEM; + } + + dbus_error_init(&dbus_error); + + /* Connect to the well-known system bus */ + conn = dbus_bus_get(DBUS_BUS_SYSTEM, &dbus_error); + if (conn == NULL) { + DEBUG(0, ("Failed to connect to D-BUS system bus.\n")); + talloc_free(system_bus); + return EIO; + } + dbus_connection_set_exit_on_disconnect(conn, FALSE); + talloc_set_destructor((TALLOC_CTX *)system_bus, + sysbus_destructor); + + ret = dbus_bus_request_name(conn, + dbus_name, + /* We want exclusive access */ + DBUS_NAME_FLAG_DO_NOT_QUEUE, + &dbus_error + ); + if (ret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { + /* We were unable to register on the system bus */ + DEBUG(0, ("Unable to request name on the system bus. Error: %s\n", dbus_error.message)); + talloc_free(system_bus); + return EIO; + } + + DEBUG(1, ("Listening on %s\n", dbus_name)); + + /* Integrate with TEvent loop */ + ret = sbus_add_connection(system_bus, ev, conn, &system_bus->sconn, SBUS_CONN_TYPE_SHARED); + if (ret != EOK) { + DEBUG(0, ("Could not integrate D-BUS into mainloop.\n")); + talloc_free(system_bus); + return ret; + } + + /* Set up methods */ + ret = sysbus_init_methods(system_bus, system_bus, methods, &system_bus->sm_ctx); + if (ret != EOK) { + talloc_free(system_bus); + return ret; + } + + ret = sbus_conn_add_method_ctx(system_bus->sconn, system_bus->sm_ctx); + if (ret != EOK) { + talloc_free(system_bus); + return ret; + } + + *sysbus = system_bus; + return EOK; +} + +struct sbus_conn_ctx *sysbus_get_sbus_conn(struct sysbus_ctx *sysbus) +{ + return sysbus->sconn; +} diff --git a/server/util/sysbus.h b/server/util/sysbus.h new file mode 100644 index 0000000..053f0b4 --- /dev/null +++ b/server/util/sysbus.h @@ -0,0 +1,33 @@ +/* + SSSD + + SystemBus Helpers + + Copyright (C) Stephen Gallagher 2009 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef SYSBUS_H_ +#define SYSBUS_H_ + +struct sysbus_ctx; + +int sysbus_init(TALLOC_CTX *mem_ctx, struct sysbus_ctx **sysbus, + struct event_context *ev, const char *dbus_name, + struct sbus_method *methods); + +struct sbus_conn_ctx *sysbus_get_sbus_conn(struct sysbus_ctx *sysbus); + +#endif /* SYSBUS_H_ */ -- 1.6.0.6