summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2017-07-14 11:01:13 -0400
committerRay Strode <rstrode@redhat.com>2017-10-20 14:14:12 -0400
commit932dd92bd4eddd2145db9131b01555987b793463 (patch)
tree3107784127ffe3714583875cef140cea33597866
parent0c9f6629bf2b25898375d020603efd3326f8824d (diff)
downloadgdm-932dd92bd4eddd2145db9131b01555987b793463.tar.gz
session-worker: rename response_text to response
Right now we always give text responses back to pam modules, so the response variable is named response_text. That's going to change in the future, when we introduce private protocol for the module to talk to GDM. As prep work for that change, rename "response_text" to "response". https://bugzilla.gnome.org/show_bug.cgi?id=788851
-rw-r--r--daemon/gdm-session-worker.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 9ef4c5b0..890fd91f 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -550,15 +550,15 @@ convert_to_utf8 (const char *str)
static gboolean
gdm_session_worker_process_pam_message (GdmSessionWorker *worker,
const struct pam_message *query,
- char **response_text)
+ char **response)
{
char *user_answer;
gboolean res;
char *utf8_msg;
char *msg;
- if (response_text != NULL) {
- *response_text = NULL;
+ if (response != NULL) {
+ *response = NULL;
}
gdm_session_worker_update_username (worker);
@@ -611,8 +611,8 @@ gdm_session_worker_process_pam_message (GdmSessionWorker *worker,
* instead of g_malloc'd memory. PAM_MAX_RESP_SIZE includes
* the '\0' terminating character, thus the "- 1".
*/
- if (res && response_text != NULL) {
- *response_text = strndup (user_answer, PAM_MAX_RESP_SIZE - 1);
+ if (res && response != NULL) {
+ *response = strndup (user_answer, PAM_MAX_RESP_SIZE - 1);
}
memset (user_answer, '\0', strlen (user_answer));
@@ -681,17 +681,17 @@ gdm_session_worker_pam_new_messages_handler (int number_o
sizeof (struct pam_response));
for (i = 0; i < number_of_messages; i++) {
gboolean got_response;
- char *response_text;
+ char *response;
- response_text = NULL;
+ response = NULL;
got_response = gdm_session_worker_process_pam_message (worker,
messages[i],
- &response_text);
+ &response);
if (!got_response) {
goto out;
}
- replies[i].resp = response_text;
+ replies[i].resp = response;
replies[i].resp_retcode = PAM_SUCCESS;
}