summaryrefslogtreecommitdiff
path: root/server/responder/pam
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/pam
parent7ac82a61aff588daaa1c217889b3055538380e47 (diff)
downloadsssd-9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d.tar.gz
sssd-9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d.tar.bz2
sssd-9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d.zip
Implement resInit for monitor, NSS, PAM, DP and the backends
Diffstat (limited to 'server/responder/pam')
-rw-r--r--server/responder/pam/pamsrv.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/responder/pam/pamsrv.c b/server/responder/pam/pamsrv.c
index e4ddc432..ef01e972 100644
--- a/server/responder/pam/pamsrv.c
+++ b/server/responder/pam/pamsrv.c
@@ -30,6 +30,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 "db/sysdb.h"
@@ -52,11 +58,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 sss_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}
};
@@ -108,6 +116,18 @@ static int service_pong(DBusMessage *message, struct sbus_conn_ctx *sconn)
return EOK;
}
+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 void pam_shutdown(struct resp_ctx *ctx);
static int service_reload(DBusMessage *message, struct sbus_conn_ctx *sconn) {