summaryrefslogtreecommitdiffstats
path: root/src/responder/pac
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2014-01-10 08:58:12 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-02-24 11:14:59 +0100
commit769347ad4d35d43488eb98f980143495b0db415d (patch)
tree1613fff70e57d363ceda4f5d2d3d48efd87073a0 /src/responder/pac
parent3e7d7af1953410f3f009bf3b2e481a46fb80de83 (diff)
downloadsssd-769347ad4d35d43488eb98f980143495b0db415d.tar.gz
sssd-769347ad4d35d43488eb98f980143495b0db415d.tar.xz
sssd-769347ad4d35d43488eb98f980143495b0db415d.zip
sbus: Rework sbus to use interface metadata and vtables
Previous commits added support for interface metadata and handler vtables. This commit ports sbus_dbus_connection to use them. Port the internal uses of dbus to use the new scheme in a very minimal way. Further cleanup is possible here. This commit provides basic definitions of the internal dbus interfaces. The interfaces aren't fully defined, as the handlers will continue to unpack manually, and often overload DBus methods with different arguments (which is rather unorthodox, but not the end of the world). Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/responder/pac')
-rw-r--r--src/responder/pac/pacsrv.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/responder/pac/pacsrv.c b/src/responder/pac/pacsrv.c
index 2fb94293c..04a6200e0 100644
--- a/src/responder/pac/pacsrv.c
+++ b/src/responder/pac/pacsrv.c
@@ -48,30 +48,38 @@
#define DEFAULT_PAC_FD_LIMIT 8192
#define DEFAULT_ALLOWED_UIDS "0"
-struct sbus_method monitor_pac_methods[] = {
- { MON_CLI_METHOD_PING, monitor_common_pong },
- { MON_CLI_METHOD_RES_INIT, monitor_common_res_init },
- { MON_CLI_METHOD_ROTATE, responder_logrotate },
- { NULL, NULL }
+struct mon_cli_iface monitor_pac_methods = {
+ { &mon_cli_iface_meta, 0 },
+ .ping = monitor_common_pong,
+ .resInit = monitor_common_res_init,
+ .shutDown = NULL,
+ .goOffline = NULL,
+ .resetOffline = NULL,
+ .rotateLogs = responder_logrotate,
+ .clearMemcache = NULL,
+ .clearEnumCache = NULL,
};
struct sbus_interface monitor_pac_interface = {
- MONITOR_INTERFACE,
MONITOR_PATH,
- SBUS_DEFAULT_VTABLE,
- monitor_pac_methods,
+ &monitor_pac_methods.vtable,
NULL
};
-static struct sbus_method pac_dp_methods[] = {
- { NULL, NULL }
+static struct data_provider_iface pac_dp_methods = {
+ { &data_provider_iface_meta, 0 },
+ .RegisterService = NULL,
+ .pamHandler = NULL,
+ .sudoHandler = NULL,
+ .autofsHandler = NULL,
+ .hostHandler = NULL,
+ .getDomains = NULL,
+ .getAccountInfo = NULL,
};
struct sbus_interface pac_dp_interface = {
- DP_INTERFACE,
DP_PATH,
- SBUS_DEFAULT_VTABLE,
- pac_dp_methods,
+ &pac_dp_methods.vtable,
NULL
};