- Update to 2.17.7

This commit is contained in:
Ray Strode 2007-02-24 04:01:25 +00:00
parent 72068c27d9
commit b1f3e76e68
4 changed files with 332 additions and 6 deletions

View File

@ -259,7 +259,7 @@
gdm_slave_action_pending ()) {
+
+ gdm_verify_write_record (d, GDM_VERIFY_RECORD_TYPE_FAILED_ATTEMPT,
+ login == NULL? tmp_PAM_USER : login, display,
+ login, display,
+ d->attached? NULL : d->hostname,
+ getpid ());
+

View File

@ -0,0 +1,147 @@
--- gdm-2.17.7/gui/gdmlogin.c.move-default-message 2007-02-12 00:40:13.000000000 -0500
+++ gdm-2.17.7/gui/gdmlogin.c 2007-02-23 22:53:47.000000000 -0500
@@ -160,6 +160,7 @@
extern const gchar *current_session;
extern gboolean session_dir_whacked_out;
extern gint gdm_timed_delay;
+static gboolean using_fallback_message = FALSE;
static gboolean first_prompt = TRUE;
@@ -1558,9 +1559,20 @@
gdm_config_get_string (GDM_KEY_SOUND_ON_LOGIN_FILE),
gdm_config_get_bool (GDM_KEY_SOUND_ON_LOGIN));
gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("_Username:"));
+ if (ve_string_empty (gtk_label_get_text (GTK_LABEL (msg)))) {
+ gtk_label_set_text (GTK_LABEL (msg),
+ _("Please enter your username"));
+ using_fallback_message = TRUE;
+ }
+
} else {
if (tmp != NULL)
gtk_label_set_text (GTK_LABEL (label), tmp);
+ if (using_fallback_message) {
+ gtk_label_set_text (GTK_LABEL (msg), "");
+ using_fallback_message = FALSE;
+ }
+
}
g_free (tmp);
@@ -1648,6 +1660,7 @@
g_free (tmp);
}
replace_msg = FALSE;
+ using_fallback_message = FALSE;
gtk_widget_show (GTK_WIDGET (msg));
printf ("%c\n", STX);
@@ -1828,9 +1841,7 @@
if (browser_ok && gdm_config_get_bool (GDM_KEY_BROWSER))
gtk_widget_set_sensitive (GTK_WIDGET (browser), TRUE);
- tmp = ve_locale_to_utf8 (args);
- gtk_label_set_text (GTK_LABEL (msg), tmp);
- g_free (tmp);
+ gtk_label_set_text (GTK_LABEL (msg), "");
gtk_widget_show (GTK_WIDGET (msg));
printf ("%c\n", STX);
--- gdm-2.17.7/gui/greeter/greeter_item_pam.c.move-default-message 2007-02-12 00:40:12.000000000 -0500
+++ gdm-2.17.7/gui/greeter/greeter_item_pam.c 2007-02-23 22:50:22.000000000 -0500
@@ -46,6 +46,7 @@
gboolean require_quarter = FALSE;
extern gboolean greeter_probably_login_prompt;
+static gboolean using_fallback_message = FALSE;
extern GtkButton *gtk_ok_button;
extern GtkButton *gtk_start_again_button;
@@ -250,13 +251,35 @@
int entry_len,
gboolean entry_visible)
{
+ GreeterItemInfo *message_info;
GreeterItemInfo *conversation_info;
GreeterItemInfo *entry_info;
GtkWidget *entry;
+ message_info = greeter_lookup_id ("pam-message");
conversation_info = greeter_lookup_id ("pam-prompt");
entry_info = greeter_lookup_id ("user-pw-entry");
+ if (strcmp (message, _("Username:")) == 0 && message_info)
+ {
+ gchar *text;
+ text = NULL;
+ g_object_get (G_OBJECT (message_info->item),
+ "text", &text,
+ NULL);
+ if (ve_string_empty (text))
+ {
+ set_text (message_info, _("Please enter your username"));
+ using_fallback_message = TRUE;
+ }
+ g_free (text);
+ }
+ else if (using_fallback_message)
+ {
+ set_text (message_info, "");
+ using_fallback_message = FALSE;
+ }
+
if (conversation_info)
{
set_text (conversation_info, message);
@@ -296,6 +319,7 @@
* we try to collect them until the next prompt or reset or
* whatnot */
if ( ! replace_msg &&
+ ! using_fallback_message &&
/* empty message is for clearing */
! ve_string_empty (message))
{
@@ -315,6 +339,7 @@
set_text (message_info, message);
}
replace_msg = FALSE;
+ using_fallback_message = FALSE;
}
--- gdm-2.17.7/daemon/verify-pam.c.move-default-message 2007-02-23 22:50:22.000000000 -0500
+++ gdm-2.17.7/daemon/verify-pam.c 2007-02-23 22:50:22.000000000 -0500
@@ -534,12 +534,6 @@
case PAM_PROMPT_ECHO_ON:
if (strcmp (m, _("Username:")) == 0) {
if ( ve_string_empty (selected_user)) {
- /* this is an evil hack, but really there is no way we'll
- know this is a username prompt. However we SHOULD NOT
- rely on this working. The pam modules can set their
- prompt to whatever they wish to */
- gdm_slave_greeter_ctl_no_ret
- (GDM_MSG, _("Please enter your username"));
s = gdm_slave_greeter_ctl (GDM_PROMPT, m);
/* this will clear the message */
gdm_slave_greeter_ctl_no_ret (GDM_MSG, "");
--- gdm-2.17.7/daemon/verify-crypt.c.move-default-message 2007-02-12 00:40:19.000000000 -0500
+++ gdm-2.17.7/daemon/verify-crypt.c 2007-02-23 22:50:22.000000000 -0500
@@ -115,7 +115,6 @@
authenticate_again:
/* Ask for the user's login */
gdm_verify_select_user (NULL);
- gdm_slave_greeter_ctl_no_ret (GDM_MSG, _("Please enter your username"));
login = gdm_slave_greeter_ctl (GDM_PROMPT, _("Username:"));
if (login == NULL ||
gdm_slave_greeter_check_interruption ()) {
--- gdm-2.17.7/daemon/verify-shadow.c.move-default-message 2007-02-12 00:40:19.000000000 -0500
+++ gdm-2.17.7/daemon/verify-shadow.c 2007-02-23 22:50:22.000000000 -0500
@@ -114,7 +114,6 @@
authenticate_again:
/* Ask for the user's login */
gdm_verify_select_user (NULL);
- gdm_slave_greeter_ctl_no_ret (GDM_MSG, _("Please enter your username"));
login = gdm_slave_greeter_ctl (GDM_PROMPT, _("Username:"));
if (login == NULL ||
gdm_slave_greeter_check_interruption ()) {

176
gdm-2.17.7-reset-pam.patch Normal file
View File

@ -0,0 +1,176 @@
--- gdm-2.17.7/gui/greeter/greeter.c.reset-pam 2007-02-12 00:40:12.000000000 -0500
+++ gdm-2.17.7/gui/greeter/greeter.c 2007-02-23 22:54:28.000000000 -0500
@@ -171,7 +171,6 @@
GtkWidget *dlg;
char *tmp;
char *session;
- GreeterItemInfo *conversation_info;
static GnomeCanvasItem *disabled_cover = NULL;
gchar *language;
gchar *selected_user = NULL;
@@ -380,17 +379,10 @@
first_prompt = TRUE;
- conversation_info = greeter_lookup_id ("pam-conversation");
-
- if (conversation_info)
- {
- tmp = ve_locale_to_utf8 (args);
- g_object_set (G_OBJECT (conversation_info->item),
- "text", tmp,
- NULL);
- g_free (tmp);
- }
-
+ greeter_item_ulist_unset_selected_user ();
+ greeter_item_pam_prompt ("", PW_ENTRY_SIZE, TRUE);
+ greeter_item_pam_message ("");
+
printf ("%c\n", STX);
fflush (stdout);
greeter_ignore_buttons (FALSE);
--- gdm-2.17.7/daemon/slave.c.reset-pam 2007-02-23 22:54:28.000000000 -0500
+++ gdm-2.17.7/daemon/slave.c 2007-02-23 22:54:28.000000000 -0500
@@ -133,6 +133,12 @@
static int greeter_fd_out = -1;
static int greeter_fd_in = -1;
+/* a dup of the other side of greeter_fd_in so that
+ * the slave can talk to itself from its sig handler
+ * using the greeter ipc mechanism
+ */
+static int slave_fd_out = -1;
+
#ifdef HAVE_TSOL
static gboolean have_suntsol_extension = FALSE;
#endif
@@ -626,7 +632,7 @@
}
static void
-whack_greeter_fds (void)
+whack_greeter_and_slave_fds (void)
{
if (greeter_fd_out > 0)
VE_IGNORE_EINTR (close (greeter_fd_out));
@@ -634,6 +640,9 @@
if (greeter_fd_in > 0)
VE_IGNORE_EINTR (close (greeter_fd_in));
greeter_fd_in = -1;
+ if (slave_fd_out > 0)
+ VE_IGNORE_EINTR (close (slave_fd_out));
+ slave_fd_out = -1;
}
static void
@@ -1084,7 +1093,7 @@
d->greetpid = 0;
- whack_greeter_fds ();
+ whack_greeter_and_slave_fds ();
gdm_slave_send_num (GDM_SOP_GREETPID, 0);
@@ -1887,7 +1896,7 @@
d->greetpid = 0;
- whack_greeter_fds ();
+ whack_greeter_and_slave_fds ();
gdm_slave_send_num (GDM_SOP_GREETPID, 0);
}
@@ -2124,6 +2133,12 @@
break;
}
+ if (do_cancel) {
+ gdm_debug ("canceling...");
+ gdm_slave_greeter_ctl_no_ret (GDM_RESETOK, "");
+ continue;
+ }
+
if (login == NULL) {
char *failuresound = gdm_get_value_string (GDM_KEY_SOUND_ON_LOGIN_FAILURE_FILE);
@@ -2723,9 +2738,9 @@
default:
VE_IGNORE_EINTR (close (pipe1[0]));
- VE_IGNORE_EINTR (close (pipe2[1]));
+ whack_greeter_and_slave_fds ();
- whack_greeter_fds ();
+ slave_fd_out = pipe2[1];
greeter_fd_out = pipe1[1];
greeter_fd_in = pipe2[0];
@@ -4784,7 +4799,7 @@
greet = FALSE;
d->greetpid = 0;
- whack_greeter_fds ();
+ whack_greeter_and_slave_fds ();
gdm_slave_send_num (GDM_SOP_GREETPID, 0);
do_restart_greeter = TRUE;
@@ -4796,7 +4811,7 @@
continue;
}
- whack_greeter_fds ();
+ whack_greeter_and_slave_fds ();
/* if greet is TRUE, then the greeter died outside of our
* control really, so clean up and die, something is wrong
@@ -4939,6 +4954,11 @@
gdm_wait_for_go = FALSE;
} else if (strcmp (&s[1], GDM_NOTIFY_TWIDDLE_POINTER) == 0) {
gdm_twiddle_pointer (d);
+ } else if (strcmp (&s[1], GDM_NOTIFY_RESET) == 0) {
+ if (!d->logged_in) {
+ gdm_fdprintf (slave_fd_out, "%c%c%c\n",
+ STX, BEL, GDM_INTERRUPT_CANCEL);
+ }
}
} else if (s[0] == GDM_SLAVE_NOTIFY_RESPONSE) {
gdm_got_ack = TRUE;
--- gdm-2.17.7/daemon/gdm.h.reset-pam 2007-02-12 00:40:19.000000000 -0500
+++ gdm-2.17.7/daemon/gdm.h 2007-02-23 22:54:28.000000000 -0500
@@ -749,6 +749,9 @@
#define GDM_SOP_SHOW_QUESTION_DIALOG "SHOW_QUESTION_DIALOG" /* show the question dialog from daemon */
#define GDM_SOP_SHOW_ASKBUTTONS_DIALOG "SHOW_ASKBUTTON_DIALOG" /* show the askbutton dialog from daemon */
+/* Reset any in progress authentication conversations */
+#define GDM_SOP_CANCEL_LOGIN_REQUESTS "CANCEL_LOGIN_REQUESTS" /* no arguments */
+
/* Notification protocol */
/* keys */
#define GDM_NOTIFY_ALLOW_REMOTE_ROOT "AllowRemoteRoot" /* <true/false as int> */
@@ -776,6 +779,7 @@
#define GDM_NOTIFY_SOFT_RESTART_SERVERS "SOFT_RESTART_SERVERS"
#define GDM_NOTIFY_GO "GO"
#define GDM_NOTIFY_TWIDDLE_POINTER "TWIDDLE_POINTER"
+#define GDM_NOTIFY_RESET "RESET"
/* Ack for a slave message */
/* Note that an extra response can follow an 'ack' */
--- gdm-2.17.7/daemon/gdm.c.reset-pam 2007-02-12 00:40:19.000000000 -0500
+++ gdm-2.17.7/daemon/gdm.c 2007-02-23 22:55:35.000000000 -0500
@@ -2557,6 +2557,14 @@
TRUE /* handled */,
FALSE /* chooser */,
NULL, 0, NULL, NULL, NULL);
+ } else if (strcmp (msg, GDM_SOP_CANCEL_LOGIN_REQUESTS) == 0) {
+ GSList *li;
+ for (li = displays; li != NULL; li = li->next) {
+ GdmDisplay *d = li->data;
+ if (!d->logged_in) {
+ send_slave_command (d, GDM_NOTIFY_RESET);
+ }
+ }
} else if (strncmp (msg, "opcode="GDM_SOP_SHOW_ERROR_DIALOG,
strlen ("opcode="GDM_SOP_SHOW_ERROR_DIALOG)) == 0) {
GdmDisplay *d;

View File

@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.17.7
Release: 2%{?dist}
Release: 3.%{?dist}
Epoch: 1
License: LGPL/GPL
Group: User Interface/X
@ -36,11 +36,11 @@ Patch6: gdm-2.8.0.2-clean-up-xsession-errors.patch
Patch7: gdm-2.8.0.2-merge-resources.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=349835
Patch12: gdm-2.13.0.4-audit-login.patch
Patch12: gdm-2.17.6-audit-login.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=347798
Patch19: gdm-2.17.1-move-default-message.patch
Patch20: gdm-2.17.3-reset-pam.patch
Patch19: gdm-2.17.7-move-default-message.patch
Patch20: gdm-2.17.7-reset-pam.patch
Patch21: gdm-2.17.3-security-tokens.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=347871
@ -323,12 +323,15 @@ fi
%attr(1770, root, gdm) %dir %{_localstatedir}/gdm
%changelog
* Fri Feb 23 2007 Ray Strode <rstrode@redhat.com> - 1:2.17.7-3
- Update to 2.17.7
* Fri Feb 23 2007 Matthias Clasen <mclasen@redhat.com> - 1:2.17.7-2
- Don't own /usr/share/icons/hicolor
- Install all desktop files
* Mon Feb 12 2007 Matthias Clasen <mclasen@redhat.com> - 1:2.17.7-1
- Update to 2.17.7
- try to update to 2.17.7
- Drop upstreamed patches
* Mon Feb 12 2007 Matthias Clasen <mclasen@redhat.com> - 1:2.17.6-4