summaryrefslogtreecommitdiffstats
path: root/server/nss
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-11-04 17:34:03 -0500
committerSimo Sorce <idra@samba.org>2008-11-04 17:39:27 -0500
commit750d1443a285048251c8843acd2c763b413869da (patch)
treec1126f6a01728575701d7714abefa463df2e493e /server/nss
parent603f59bcb502c48eb577bc6fd3232a6944756983 (diff)
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.c17
-rw-r--r--server/nss/nsssrv.h2
2 files changed, 18 insertions, 1 deletions
diff --git a/server/nss/nsssrv.c b/server/nss/nsssrv.c
index 04eead6dd..bd0f761b2 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 300b8af31..5e2649370 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;