diff options
author | Simo Sorce <idra@samba.org> | 2008-11-04 17:34:03 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-11-04 17:39:27 -0500 |
commit | 750d1443a285048251c8843acd2c763b413869da (patch) | |
tree | c1126f6a01728575701d7714abefa463df2e493e /server/nss | |
parent | 603f59bcb502c48eb577bc6fd3232a6944756983 (diff) | |
download | sssd-750d1443a285048251c8843acd2c763b413869da.tar.gz sssd-750d1443a285048251c8843acd2c763b413869da.tar.bz2 sssd-750d1443a285048251c8843acd2c763b413869da.zip |
Add the ping funtion to the nss service Make the monitor task ping connecting services Make it possible to configure timeouts and service ping times.
Diffstat (limited to 'server/nss')
-rw-r--r-- | server/nss/nsssrv.c | 17 | ||||
-rw-r--r-- | server/nss/nsssrv.h | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/server/nss/nsssrv.c b/server/nss/nsssrv.c index 04eead6d..bd0f761b 100644 --- a/server/nss/nsssrv.c +++ b/server/nss/nsssrv.c @@ -40,9 +40,11 @@ #include "sbus_interfaces.h" static int provide_identity(DBusMessage *message, void *data, DBusMessage **r); +static int reply_ping(DBusMessage *message, void *data, DBusMessage **r); struct sbus_method nss_sbus_methods[] = { {SERVICE_METHOD_IDENTITY, provide_identity}, + {SERVICE_METHOD_PING, reply_ping}, {NULL, NULL} }; @@ -223,6 +225,21 @@ static int provide_identity(DBusMessage *message, void *data, DBusMessage **r) return EOK; } +static int reply_ping(DBusMessage *message, void *data, DBusMessage **r) +{ + DBusMessage *reply; + dbus_bool_t ret; + + 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 nss_sbus_init(struct nss_ctx *nctx) { struct sbus_method_ctx *cli_sm_ctx; diff --git a/server/nss/nsssrv.h b/server/nss/nsssrv.h index 300b8af3..5e264937 100644 --- a/server/nss/nsssrv.h +++ b/server/nss/nsssrv.h @@ -30,7 +30,7 @@ #include "../nss_client/sss_nss.h" #define NSS_SBUS_SERVICE_VERSION 0x0001 -#define NSS_SBUS_SERVICE_NAME "NSS" +#define NSS_SBUS_SERVICE_NAME "nss" struct nss_ldb_ctx; struct getent_ctx; |