diff options
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; |