From b81f453b8ade026f9c19bfd557a986cbcf0c9c8c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 22 Feb 2010 09:19:43 -0500 Subject: Remove unnecessary "domain" parameter from DP registration This was a holdover from when the DP and the providers were unique processes. The NSS and PAM registrations do not need to send the domain, as it is not ambiguous which one they are talking to. --- src/providers/data_provider.h | 2 +- src/providers/data_provider_be.c | 2 -- src/providers/dp_auth_util.c | 7 +++---- src/responder/common/responder_common.c | 2 +- src/responder/nss/nsssrv.c | 2 +- src/responder/pam/pamsrv.c | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/providers/data_provider.h b/src/providers/data_provider.h index 661bd986..cbb4ebb4 100644 --- a/src/providers/data_provider.h +++ b/src/providers/data_provider.h @@ -198,7 +198,7 @@ bool dp_unpack_pam_response(DBusMessage *msg, struct pam_data *pd, DBusError *dbus_error); int dp_common_send_id(struct sbus_connection *conn, uint16_t version, - const char *name, const char *domain); + const char *name); /* from dp_sbus.c */ int dp_get_sbus_address(TALLOC_CTX *mem_ctx, diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c index 93cae070..c384d015 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -654,7 +654,6 @@ static int client_registration(DBusMessage *message, DBusError dbus_error; dbus_uint16_t cli_ver; char *cli_name; - char *cli_domain; dbus_bool_t dbret; void *data; @@ -674,7 +673,6 @@ static int client_registration(DBusMessage *message, dbret = dbus_message_get_args(message, &dbus_error, DBUS_TYPE_UINT16, &cli_ver, DBUS_TYPE_STRING, &cli_name, - DBUS_TYPE_STRING, &cli_domain, DBUS_TYPE_INVALID); if (!dbret) { DEBUG(1, ("Failed to parse message, killing connection\n")); diff --git a/src/providers/dp_auth_util.c b/src/providers/dp_auth_util.c index 16fb28c7..f4e68eaf 100644 --- a/src/providers/dp_auth_util.c +++ b/src/providers/dp_auth_util.c @@ -354,7 +354,7 @@ done: } int dp_common_send_id(struct sbus_connection *conn, uint16_t version, - const char *name, const char *domain) + const char *name) { DBusPendingCall *pending_reply; DBusConnection *dbus_conn; @@ -373,13 +373,12 @@ int dp_common_send_id(struct sbus_connection *conn, uint16_t version, return ENOMEM; } - DEBUG(4, ("Sending ID to DP: (%d,%s,%s)\n", - version, name, domain)); + DEBUG(4, ("Sending ID to DP: (%d,%s)\n", + version, name)); ret = dbus_message_append_args(msg, DBUS_TYPE_UINT16, &version, DBUS_TYPE_STRING, &name, - DBUS_TYPE_STRING, &domain, DBUS_TYPE_INVALID); if (!ret) { DEBUG(1, ("Failed to build message\n")); diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index 37bbcb30..ca830e47 100644 --- a/src/responder/common/responder_common.c +++ b/src/responder/common/responder_common.c @@ -351,7 +351,7 @@ static int sss_dp_init(struct resp_ctx *rctx, /* Identify ourselves to the DP */ ret = dp_common_send_id(be_conn->conn, DATA_PROVIDER_VERSION, - cli_name, domain->name); + cli_name); if (ret != EOK) { DEBUG(0, ("Failed to identify to the DP!\n")); return ret; diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c index 7de346f0..1b55baf6 100644 --- a/src/responder/nss/nsssrv.c +++ b/src/responder/nss/nsssrv.c @@ -240,7 +240,7 @@ static void nss_dp_reconnect_init(struct sbus_connection *conn, /* Identify ourselves to the data provider */ ret = dp_common_send_id(be_conn->conn, DATA_PROVIDER_VERSION, - "NSS", be_conn->domain->name); + "NSS"); /* all fine */ if (ret == EOK) return; } diff --git a/src/responder/pam/pamsrv.c b/src/responder/pam/pamsrv.c index 84b13dc4..9abd213a 100644 --- a/src/responder/pam/pamsrv.c +++ b/src/responder/pam/pamsrv.c @@ -98,7 +98,7 @@ static void pam_dp_reconnect_init(struct sbus_connection *conn, int status, void /* Identify ourselves to the data provider */ ret = dp_common_send_id(be_conn->conn, DATA_PROVIDER_VERSION, - "PAM", be_conn->domain->name); + "PAM"); /* all fine */ if (ret == EOK) return; } -- cgit