--- gdm-2.4.4.7/daemon/verify-pam.c.nologin	2003-12-20 02:06:57.000000000 +0100
+++ gdm-2.4.4.7/daemon/verify-pam.c	2004-03-11 14:02:18.662560204 +0100
@@ -171,17 +171,25 @@
 		       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, "");
-		    islogin = TRUE;
+		    if (gdm_slave_should_complain ()) {
+			    /* we might be called several time in the same pam_authenticate call
+			     * even after returning error when switching to configurator */
+
+			    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, "");
+			    islogin = TRUE;
+		    }
+		    else {
+			    s = NULL;
+		    }
 	    } else {
 		    s = gdm_slave_greeter_ctl (GDM_PROMPT, m);
 	    }
 
-	    if (gdm_slave_greeter_check_interruption ()) {
+	    if (gdm_slave_greeter_check_interruption () || !gdm_slave_should_complain ()) {
 		    g_free (s);
 		    for (i = 0; i < replies; i++)
 			    if (reply[replies].resp != NULL)
@@ -504,9 +512,15 @@
 
     pam_set_item (pamh, PAM_USER_PROMPT, _("Username:"));
 
+#if 0
+        /* FIXME: this makes things wait at the wrong places! such as
+	   when running the configurator.  We wish to ourselves cancel logins
+	   without a delay, so ... evil */
+
 #ifdef PAM_FAIL_DELAY
     pam_fail_delay (pamh, GdmRetryDelay * 1000000);
 #endif /* PAM_FAIL_DELAY */
+#endif
 
     did_we_ask_for_password = FALSE;
 
@@ -544,9 +558,9 @@
 	    if (started_timer)
 		    gdm_slave_greeter_ctl_no_ret (GDM_STOPTIMER, "");
 	    if (gdm_slave_should_complain ()) {
-#ifndef PAM_FAIL_DELAY
+/* #ifndef PAM_FAIL_DELAY */
 		    gdm_sleep_no_signal (GdmRetryDelay);
-#endif /* PAM_FAIL_DELAY */
+/* #endif */ /* PAM_FAIL_DELAY */
 		    gdm_error (_("Couldn't authenticate user"));
 	    }
 	    goto pamerr;
