summaryrefslogtreecommitdiff
path: root/server/responder/pam
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-08-11 12:03:01 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-08-11 13:27:30 -0400
commit2de7dab64517fcaee5198342e9b7890cdf1c7776 (patch)
treec9cd5373ccdccb3211dba7bdfe88324e2efd76e6 /server/responder/pam
parentab9cfe72d18531ca0fc93c772582329a3b0c5dc9 (diff)
downloadsssd-2de7dab64517fcaee5198342e9b7890cdf1c7776.tar.gz
sssd-2de7dab64517fcaee5198342e9b7890cdf1c7776.tar.bz2
sssd-2de7dab64517fcaee5198342e9b7890cdf1c7776.zip
Change the why DP clients identify
Mirrors what we have done with the monitor.
Diffstat (limited to 'server/responder/pam')
-rw-r--r--server/responder/pam/pamsrv.c19
-rw-r--r--server/responder/pam/pamsrv.h1
-rw-r--r--server/responder/pam/pamsrv_dp.c49
3 files changed, 16 insertions, 53 deletions
diff --git a/server/responder/pam/pamsrv.c b/server/responder/pam/pamsrv.c
index c0f0ca40..6f92eb96 100644
--- a/server/responder/pam/pamsrv.c
+++ b/server/responder/pam/pamsrv.c
@@ -125,13 +125,24 @@ static int pam_process_init(struct main_context *main_ctx,
return EOK;
}
+static struct sbus_method pam_dp_methods[] = {
+ { NULL, NULL }
+};
+
+struct sbus_interface pam_dp_interface = {
+ DP_CLI_INTERFACE,
+ DP_CLI_PATH,
+ SBUS_DEFAULT_VTABLE,
+ pam_dp_methods,
+ NULL
+};
+
int main(int argc, const char *argv[])
{
int opt;
poptContext pc;
struct main_context *main_ctx;
int ret;
- struct sbus_interface *pam_dp_interface;
struct sss_cmd_table *sss_cmds;
struct resp_ctx *rctx;
@@ -164,7 +175,6 @@ int main(int argc, const char *argv[])
DEBUG(2, ("Could not set up to exit when parent process does\n"));
}
- pam_dp_interface = get_pam_dp_interface();
sss_cmds = register_sss_cmds();
ret = sss_process_init(main_ctx,
main_ctx->event_ctx,
@@ -175,8 +185,11 @@ int main(int argc, const char *argv[])
PAM_SRV_CONFIG,
PAM_SBUS_SERVICE_NAME,
PAM_SBUS_SERVICE_VERSION,
- pam_dp_interface,
&monitor_pam_interface,
+ DP_CLI_FRONTEND,
+ DATA_PROVIDER_VERSION,
+ "PAM", "",
+ &pam_dp_interface,
&rctx);
if (ret != EOK) return 3;
diff --git a/server/responder/pam/pamsrv.h b/server/responder/pam/pamsrv.h
index 1de1cee8..67261157 100644
--- a/server/responder/pam/pamsrv.h
+++ b/server/responder/pam/pamsrv.h
@@ -22,7 +22,6 @@ struct pam_auth_req {
void *data;
};
-struct sbus_interface *get_pam_dp_interface(void);
struct sss_cmd_table *register_sss_cmds(void);
int pam_dp_send_req(struct pam_auth_req *preq, int timeout);
diff --git a/server/responder/pam/pamsrv_dp.c b/server/responder/pam/pamsrv_dp.c
index c0a286b2..3696d3d6 100644
--- a/server/responder/pam/pamsrv_dp.c
+++ b/server/responder/pam/pamsrv_dp.c
@@ -137,52 +137,3 @@ int pam_dp_send_req(struct pam_auth_req *preq, int timeout)
return EOK;
}
-static int pam_dp_identity(DBusMessage *message, struct sbus_connection *conn)
-{
- dbus_uint16_t version = DATA_PROVIDER_VERSION;
- dbus_uint16_t clitype = DP_CLI_FRONTEND;
- const char *cliname = "PAM";
- const char *nullname = "";
- DBusMessage *reply;
- dbus_bool_t ret;
-
- DEBUG(4,("Sending ID reply: (%d,%d,%s)\n", clitype, version, cliname));
-
- reply = dbus_message_new_method_return(message);
- if (!reply) return ENOMEM;
-
- ret = dbus_message_append_args(reply,
- DBUS_TYPE_UINT16, &clitype,
- DBUS_TYPE_UINT16, &version,
- DBUS_TYPE_STRING, &cliname,
- DBUS_TYPE_STRING, &nullname,
- DBUS_TYPE_INVALID);
- if (!ret) {
- dbus_message_unref(reply);
- return EIO;
- }
-
- /* send reply back */
- sbus_conn_send_reply(conn, reply);
- dbus_message_unref(reply);
-
- return EOK;
-}
-
-static struct sbus_method pam_dp_methods[] = {
- { DP_CLI_METHOD_IDENTITY, pam_dp_identity },
- { NULL, NULL }
-};
-
-struct sbus_interface pam_dp_interface = {
- DATA_PROVIDER_INTERFACE,
- DATA_PROVIDER_PATH,
- SBUS_DEFAULT_VTABLE,
- pam_dp_methods,
- NULL
-};
-
-struct sbus_interface *get_pam_dp_interface(void)
-{
- return &pam_dp_interface;
-}