Overview of changes in lightdm 1.5.3
* Fix build with gobject-introspection 1.35.9
+ * Fix authentication cancel regression caused in 1.5.2
Overview of changes in lightdm 1.5.2
if (HEADER_SIZE + payload_length < HEADER_SIZE)
{
g_warning ("Payload length of %u octets too long", payload_length);
- return 0;
+ return HEADER_SIZE;
}
return HEADER_SIZE + payload_length;
if (greeter->priv->n_read >= HEADER_SIZE)
{
n_to_read = get_message_length (greeter);
- if (n_to_read == 0)
+ if (n_to_read <= HEADER_SIZE)
return FALSE;
}
if (greeter->priv->n_read == HEADER_SIZE)
{
n_to_read = get_message_length (greeter);
- if (n_to_read == 0)
- return FALSE;
-
- greeter->priv->read_buffer = secure_realloc (greeter, greeter->priv->read_buffer, n_to_read);
- read_cb (source, condition, greeter);
- return TRUE;
+ if (n_to_read > HEADER_SIZE)
+ {
+ greeter->priv->read_buffer = secure_realloc (greeter, greeter->priv->read_buffer, n_to_read);
+ read_cb (source, condition, greeter);
+ return TRUE;
+ }
}
offset = 0;
test-autologin-python-guest-timeout \
test-change-authentication \
test-restart-authentication \
+ test-gobject-cancel-authentication \
+ test-python-cancel-authentication \
test-pam \
test-login-pam \
test-denied \
TESTS += \
test-autologin-qt4-timeout \
test-autologin-qt4-guest-timeout \
+ test-qt4-cancel-authentication \
test-login-qt4 \
test-login-qt4-manual \
test-login-qt4-manual-previous-session \
TESTS += \
test-autologin-qt5-timeout \
test-autologin-qt5-guest-timeout \
+ test-qt5-cancel-authentication \
test-login-qt5 \
test-login-qt5-manual \
test-login-qt5-manual-previous-session \
scripts/autologin-timeout.conf \
scripts/autologin-xserver-crash.conf \
scripts/change-authentication.conf \
+ scripts/cancel-authentication.conf \
scripts/console-kit.conf \
scripts/crash-authenticate.conf \
scripts/cred-error.conf \
--- /dev/null
+#
+# Check can cancel authentication
+#
+
+[LightDM]
+minimum-display-number=50
+
+#?RUNNER DAEMON-START
+
+# X server starts
+#?XSERVER :50 START
+#?XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+#?XSERVER :50 ACCEPT-CONNECT
+
+# Greeter starts
+#?GREETER :50 START
+#?XSERVER :50 ACCEPT-CONNECT
+#?GREETER :50 CONNECT-XSERVER
+#?GREETER :50 CONNECT-TO-DAEMON
+#?GREETER :50 CONNECTED-TO-DAEMON
+
+# Start authentication
+#?*GREETER :50 AUTHENTICATE USERNAME=have-password1
+#?GREETER :50 SHOW-PROMPT TEXT="Password:"
+
+# Cancel authentication
+#?*GREETER :50 CANCEL-AUTHENTICATION
+
+# Start new authentication
+#?*GREETER :50 AUTHENTICATE USERNAME=have-password2
+#?GREETER :50 SHOW-PROMPT TEXT="Password:"
+
+# Cleanup
+#?*STOP-DAEMON
+# Don't know what order they will terminate
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?RUNNER DAEMON-EXIT STATUS=0
}
g_free (r);
+ r = g_strdup_printf ("GREETER %s CANCEL-AUTHENTICATION", getenv ("DISPLAY"));
+ if (strcmp (request, r) == 0)
+ lightdm_greeter_cancel_authentication (greeter);
+ g_free (r);
+
r = g_strdup_printf ("GREETER %s START-SESSION", getenv ("DISPLAY"));
if (strcmp (request, r) == 0)
{
if request.startswith (r):
greeter.respond (request[len (r):-1])
+ r = 'GREETER %s CANCEL-AUTHENTICATION' % os.getenv ('DISPLAY')
+ if request == r:
+ greeter.cancel_authentication ()
+
r = 'GREETER %s START-SESSION' % os.getenv ('DISPLAY')
if request == r:
if not greeter.start_session_sync (None):
}
g_free (r);
+ r = g_strdup_printf ("GREETER %s CANCEL-AUTHENTICATION", getenv ("DISPLAY"));
+ if (strcmp (request, r) == 0)
+ greeter->cancelAuthentication ();
+ g_free (r);
+
r = g_strdup_printf ("GREETER %s START-SESSION", getenv ("DISPLAY"));
if (strcmp (request, r) == 0)
{
--- /dev/null
+#!/bin/sh
+./src/dbus-env ./src/test-runner cancel-authentication test-gobject-greeter
--- /dev/null
+#!/bin/sh
+./src/dbus-env ./src/test-runner cancel-authentication test-python-greeter
--- /dev/null
+#!/bin/sh
+./src/dbus-env ./src/test-runner cancel-authentication test-qt4-greeter
--- /dev/null
+#!/bin/sh
+./src/dbus-env ./src/test-runner cancel-authentication test-qt5-greeter