diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-02-22 10:11:18 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-02-22 12:54:52 -0500 |
commit | e55f1df17af45d2e32153b41006c06061d0337e5 (patch) | |
tree | 03630ec13a85bd7df26a6c4100fb7714270815a0 | |
parent | b81f453b8ade026f9c19bfd557a986cbcf0c9c8c (diff) | |
download | sssd-e55f1df17af45d2e32153b41006c06061d0337e5.tar.gz sssd-e55f1df17af45d2e32153b41006c06061d0337e5.tar.xz sssd-e55f1df17af45d2e32153b41006c06061d0337e5.zip |
Remove unnecessary domain parameter from PAM requests
If we're sending a message to the backend, we already know which
domain the request is targeting. Carrying this information is not
useful and confuses the interface.
-rw-r--r-- | src/providers/data_provider.h | 11 | ||||
-rw-r--r-- | src/providers/dp_auth_util.c | 22 |
2 files changed, 5 insertions, 28 deletions
diff --git a/src/providers/data_provider.h b/src/providers/data_provider.h index cbb4ebb44..747e6e89d 100644 --- a/src/providers/data_provider.h +++ b/src/providers/data_provider.h @@ -63,10 +63,9 @@ * The PAM responder send all the data it has received from the PAM client to * the authentication backend with a DBUS message. * - * As a response it expects basically a PAM return value (see pam(3) for - * details) and the name of the domain. The backend may send any number of - * additional messages (see ...) which are forwarded by the PAM responder to - * the PAM client. + * As a response it expects a PAM return value (see pam(3) for details). + * The backend may send any number of additional messages (see ...) which are + * forwarded by the PAM responder to the PAM client. * @{ */ @@ -77,7 +76,6 @@ * hand it must have the following elements: * * @param DBUS_TYPE_INT32 PAM Command, see #sss_cli_command for allowed values - * @param DBUS_TYPE_STRING Name of the Domain * @param DBUS_TYPE_STRING User name, this value is send by the PAM client and * contains the value of the PAM item PAM_USER * @param DBUS_TYPE_STRING Service name, this value is send by the PAM client @@ -111,8 +109,7 @@ * indicate that the provider is offline and that the PAM responder should try * a chached authentication, for all other return value see the man pages for * the corresponding PAM service functions - * @retval DBUS_TYPE_STRING Domain Name - * @retval DBUS_TYPE_ARRAY__(STRUCT) (optional) Zero more more additional + * @retval DBUS_TYPE_ARRAY__(STRUCT) Zero or more additional getAccountInfo * messages, here the DBUS_TYPE_STRUCT is build of a DBUS_TYPE_UINT32 holding * an identifier (see #response_type) and DBUS_TYPE_G_BYTE_ARRAY with the data * of the message. diff --git a/src/providers/dp_auth_util.c b/src/providers/dp_auth_util.c index f4e68eafd..52911769a 100644 --- a/src/providers/dp_auth_util.c +++ b/src/providers/dp_auth_util.c @@ -60,7 +60,7 @@ bool dp_pack_pam_request(DBusMessage *msg, struct pam_data *pd) { int ret; - if (pd->user == NULL || pd->domain == NULL) return false; + if (pd->user == NULL) return false; if (pd->service == NULL) pd->service = talloc_strdup(pd, ""); if (pd->tty == NULL) pd->tty = talloc_strdup(pd, ""); if (pd->ruser == NULL) pd->ruser = talloc_strdup(pd, ""); @@ -69,7 +69,6 @@ bool dp_pack_pam_request(DBusMessage *msg, struct pam_data *pd) ret = dbus_message_append_args(msg, DBUS_TYPE_INT32, &(pd->cmd), - DBUS_TYPE_STRING, &(pd->domain), DBUS_TYPE_STRING, &(pd->user), DBUS_TYPE_STRING, &(pd->service), DBUS_TYPE_STRING, &(pd->tty), @@ -96,7 +95,6 @@ bool dp_unpack_pam_request(DBusMessage *msg, struct pam_data *pd, DBusError *dbu ret = dbus_message_get_args(msg, dbus_error, DBUS_TYPE_INT32, &(pd->cmd), - DBUS_TYPE_STRING, &(pd->domain), DBUS_TYPE_STRING, &(pd->user), DBUS_TYPE_STRING, &(pd->service), DBUS_TYPE_STRING, &(pd->tty), @@ -135,13 +133,6 @@ bool dp_pack_pam_response(DBusMessage *msg, struct pam_data *pd) return false; } - /* Append the domain */ - dbret = dbus_message_iter_append_basic(&iter, - DBUS_TYPE_STRING, &(pd->domain)); - if (!dbret) { - return false; - } - /* Create an array of response structures */ dbret = dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(uay)", @@ -227,17 +218,6 @@ bool dp_unpack_pam_response(DBusMessage *msg, struct pam_data *pd, DBusError *db return false; } - if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING) { - DEBUG(1, ("pam response format error.\n")); - return false; - } - dbus_message_iter_get_basic(&iter, &(pd->domain)); - - if (!dbus_message_iter_next(&iter)) { - DEBUG(1, ("pam response has too few arguments.\n")); - return false; - } - /* After this point will be an array of pam data */ if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY) { DEBUG(1, ("pam response format error.\n")); |