summaryrefslogtreecommitdiffstats
path: root/server/responder/nss
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-06-24 08:18:15 -0400
committerSimo Sorce <ssorce@redhat.com>2009-07-20 10:50:56 -0400
commit9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d (patch)
tree239b25bd2f7fa264126afcb5b6d7785716e05b45 /server/responder/nss
parent7ac82a61aff588daaa1c217889b3055538380e47 (diff)
downloadsssd-9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d.tar.gz
sssd-9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d.tar.xz
sssd-9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d.zip
Implement resInit for monitor, NSS, PAM, DP and the backends
Diffstat (limited to 'server/responder/nss')
-rw-r--r--server/responder/nss/nsssrv.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/responder/nss/nsssrv.c b/server/responder/nss/nsssrv.c
index e04a8c876..9a3d3c453 100644
--- a/server/responder/nss/nsssrv.c
+++ b/server/responder/nss/nsssrv.c
@@ -29,6 +29,12 @@
#include <string.h>
#include <sys/time.h>
#include <errno.h>
+
+/* Needed for res_init() */
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+
#include "popt.h"
#include "util/util.h"
#include "responder/nss/nsssrv.h"
@@ -49,11 +55,13 @@
static int service_identity(DBusMessage *message, struct sbus_conn_ctx *sconn);
static int service_pong(DBusMessage *message, struct sbus_conn_ctx *sconn);
static int service_reload(DBusMessage *message, struct sbus_conn_ctx *sconn);
+static int service_res_init(DBusMessage *message, struct sbus_conn_ctx *sconn);
struct sbus_method nss_sbus_methods[] = {
{SERVICE_METHOD_IDENTITY, service_identity},
{SERVICE_METHOD_PING, service_pong},
{SERVICE_METHOD_RELOAD, service_reload},
+ {SERVICE_METHOD_RES_INIT, service_res_init},
{NULL, NULL}
};
@@ -118,6 +126,18 @@ static int service_reload(DBusMessage *message, struct sbus_conn_ctx *sconn)
return service_pong(message, sconn);
}
+static int service_res_init(DBusMessage *message, struct sbus_conn_ctx *sconn)
+{
+ int ret;
+
+ ret = res_init();
+ if(ret != 0) {
+ return EIO;
+ }
+
+ return service_pong(message, sconn);
+}
+
static int nss_get_config(struct nss_ctx *nctx,
struct resp_ctx *rctx,
struct confdb_ctx *cdb)