[gdm] worker: fix crasher for PAM_RADIO_TYPE messages
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] worker: fix crasher for PAM_RADIO_TYPE messages
- Date: Tue, 10 Sep 2013 16:31:25 +0000 (UTC)
commit f29d171dcbb73af4ad0a476e4a626c6df6e04c21
Author: David Liang <liangchenye gmail com>
Date: Tue Sep 10 12:27:48 2013 -0400
worker: fix crasher for PAM_RADIO_TYPE messages
Some modules send PAM_RADIO_TYPE message to gdm (samba: commit
2d063d077aed01f020352e859b766415fe094fa5 nsswitch/pam_winbind.c),
then gdm crashes.
This commit reuses the 'ask_question' method and add 'yes/no/maybe'
to the prompt_label, which avoids the crash. It's suboptimal because
the user needs to type 'yes' manually rather than clicking on a UI element,
and because yes, no, and maybe aren't translated.
It's a temporary workaround until more complete support can get added.
https://bugzilla.gnome.org/show_bug.cgi?id=671106
daemon/gdm-session-worker.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 7307872..437f1cd 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -748,6 +748,7 @@ gdm_session_worker_process_pam_message (GdmSessionWorker *worker,
char *user_answer;
gboolean res;
char *utf8_msg;
+ char *msg;
if (response_text != NULL) {
*response_text = NULL;
@@ -778,6 +779,13 @@ gdm_session_worker_process_pam_message (GdmSessionWorker *worker,
case PAM_ERROR_MSG:
res = gdm_session_worker_report_problem (worker, utf8_msg);
break;
+#ifdef PAM_RADIO_TYPE
+ case PAM_RADIO_TYPE:
+ msg = g_strdup_printf ("%s (yes/no/maybe)", utf8_msg);
+ res = gdm_session_worker_ask_question (worker, msg, &user_answer);
+ g_free (msg);
+ break;
+#endif
default:
g_assert_not_reached ();
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]