diff options
author | Brian Cameron <brian.cameron@sun.com> | 2006-11-07 00:26:00 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2006-11-07 00:26:00 +0000 |
commit | ba620e43380fb953e37f2add9285e525ea883c80 (patch) | |
tree | f9d73d0d0f704231bc9f62561a1383209dba670c | |
parent | fd7837238075652bc558b85274dc9431f0aecba4 (diff) | |
download | gdm-ba620e43380fb953e37f2add9285e525ea883c80.tar.gz |
Update to make casting more clear. This fixes a problem noticed with the
2006-11-06 Brian Cameron <brian.cameron@sun.com>
* daemon/verify-pam.c: Update to make casting more clear.
This fixes a problem noticed with the Kerberos PAM module.
Kerberos was sending the proper error message but gdm was not
accessing it properly. This message comes as "struct pam_message"
and is accesed using a double pointer "**msg".GDM was treating
msg as a pointer to an array of "num_msg"s of "struct pam_message"
whereas it actually is pointer to a pointer to an array of
"num_msg"s of "struct pam_message".
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | daemon/verify-pam.c | 8 |
2 files changed, 15 insertions, 4 deletions
@@ -1,3 +1,14 @@ +2006-11-06 Brian Cameron <brian.cameron@sun.com> + + * daemon/verify-pam.c: Update to make casting more clear. + This fixes a problem noticed with the Kerberos PAM module. + Kerberos was sending the proper error message but gdm was not + accessing it properly. This message comes as "struct pam_message" + and is accesed using a double pointer "**msg".GDM was treating + msg as a pointer to an array of "num_msg"s of "struct pam_message" + whereas it actually is pointer to a pointer to an array of + "num_msg"s of "struct pam_message". + 2006-11-06 Brian Cameron <brian.cameron@sun.com> * utils/Makefile.am: Add back X_EXTRA_LIBS and X_LIBS to diff --git a/daemon/verify-pam.c b/daemon/verify-pam.c index 22c22866..694c0851 100644 --- a/daemon/verify-pam.c +++ b/daemon/verify-pam.c @@ -502,10 +502,10 @@ gdm_verify_pam_conv (int num_msg, struct pam_message **msg, for (replies = 0; replies < num_msg; replies++) { gboolean islogin = FALSE; - const char *m = msg[replies]->msg; + const char *m = (*msg)[replies].msg; m = perhaps_translate_message (m); - switch (msg[replies]->msg_style) { + switch ((*msg)[replies].msg_style) { /* PAM requested textual input with echo on */ case PAM_PROMPT_ECHO_ON: @@ -645,9 +645,9 @@ gdm_verify_standalone_pam_conv (int num_msg, struct pam_message **msg, memset (reply, 0, sizeof (struct pam_response) * num_msg); for (replies = 0; replies < num_msg; replies++) { - const char *m = msg[replies]->msg; + const char *m = (*msg)[replies].msg; m = perhaps_translate_message (m); - switch (msg[replies]->msg_style) { + switch ((*msg)[replies].msg_style) { case PAM_PROMPT_ECHO_ON: if (extra_standalone_message != NULL) |