summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/nss/nsssrv.c12
-rw-r--r--server/providers/data_provider.c12
-rw-r--r--server/sbus_interfaces.h1
3 files changed, 25 insertions, 0 deletions
diff --git a/server/nss/nsssrv.c b/server/nss/nsssrv.c
index 4180a460..0c7bf060 100644
--- a/server/nss/nsssrv.c
+++ b/server/nss/nsssrv.c
@@ -45,12 +45,14 @@
static int service_identity(DBusMessage *message, void *data, DBusMessage **r);
static int service_pong(DBusMessage *message, void *data, DBusMessage **r);
+static int service_reload(DBusMessage *message, void *data, DBusMessage **r);
static int nss_init_domains(struct nss_ctx *nctx);
static int _domain_comparator(void *key1, void *key2);
struct sbus_method nss_sbus_methods[] = {
{SERVICE_METHOD_IDENTITY, service_identity},
{SERVICE_METHOD_PING, service_pong},
+ {SERVICE_METHOD_RELOAD, service_reload},
{NULL, NULL}
};
@@ -262,6 +264,16 @@ static int service_pong(DBusMessage *message, void *data, DBusMessage **r)
return EOK;
}
+static int service_reload(DBusMessage *message, void *data, DBusMessage **r) {
+ /* Monitor calls this function when we need to reload
+ * our configuration information. Perform whatever steps
+ * are needed to update the configuration objects.
+ */
+
+ /* Send an empty reply to acknowledge receipt */
+ return service_pong(message, data, r);
+}
+
static int nss_sbus_init(struct nss_ctx *nctx)
{
struct service_sbus_ctx *ss_ctx;
diff --git a/server/providers/data_provider.c b/server/providers/data_provider.c
index e0de4dbb..393e03e7 100644
--- a/server/providers/data_provider.c
+++ b/server/providers/data_provider.c
@@ -77,10 +77,12 @@ static int dp_frontend_destructor(void *ctx);
static int service_identity(DBusMessage *message, void *data, DBusMessage **r);
static int service_pong(DBusMessage *message, void *data, DBusMessage **r);
+static int service_reload(DBusMessage *message, void *data, DBusMessage **r);
struct sbus_method mon_sbus_methods[] = {
{ SERVICE_METHOD_IDENTITY, service_identity },
{ SERVICE_METHOD_PING, service_pong },
+ { SERVICE_METHOD_RELOAD, service_reload },
{ NULL, NULL }
};
@@ -142,6 +144,16 @@ static int service_pong(DBusMessage *message, void *data, DBusMessage **r)
return EOK;
}
+static int service_reload(DBusMessage *message, void *data, DBusMessage **r) {
+ /* Monitor calls this function when we need to reload
+ * our configuration information. Perform whatever steps
+ * are needed to update the configuration objects.
+ */
+
+ /* Send an empty reply to acknowledge receipt */
+ return service_pong(message, data, r);
+}
+
static int dp_monitor_init(struct dp_ctx *dpctx)
{
struct service_sbus_ctx *ss_ctx;
diff --git a/server/sbus_interfaces.h b/server/sbus_interfaces.h
index 58a85749..0a3fe7a8 100644
--- a/server/sbus_interfaces.h
+++ b/server/sbus_interfaces.h
@@ -37,6 +37,7 @@
/* Service Methods */
#define SERVICE_METHOD_IDENTITY "getIdentity"
#define SERVICE_METHOD_PING "ping"
+#define SERVICE_METHOD_RELOAD "reloadConfig"
#define SSSD_SERVICE_PIPE "private/sbus-monitor"