diff -u lightdm-1.0.6/debian/changelog lightdm-1.0.6/debian/changelog --- lightdm-1.0.6/debian/changelog +++ lightdm-1.0.6/debian/changelog @@ -1,3 +1,10 @@ +lightdm (1.0.6-0ubuntu1.7) oneiric-proposed; urgency=low + + * Wait for the VT to become active when switching to avoid a suspected race + condition somewhere between LightDM, X, ConsoleKit and the kernel. (LP: #851612) + + -- Shih-Yuan Lee (FourDollars) Fri, 16 Mar 2012 17:16:27 +0800 + lightdm (1.0.6-0ubuntu1.6) oneiric-security; urgency=low * SECURITY UPDATE: Guest session arbitrary file deletion (LP: #953044) diff -u lightdm-1.0.6/debian/patches/series lightdm-1.0.6/debian/patches/series --- lightdm-1.0.6/debian/patches/series +++ lightdm-1.0.6/debian/patches/series @@ -11,0 +12 @@ +13_wait-for-the-vt.patch only in patch2: unchanged: --- lightdm-1.0.6.orig/debian/patches/13_wait-for-the-vt.patch +++ lightdm-1.0.6/debian/patches/13_wait-for-the-vt.patch @@ -0,0 +1,21 @@ +Description: Wait for the VT to become active when switching to avoid a suspected race condition somewhere between LightDM, X, ConsoleKit and the kernel +Author: Robert Ancell +Origin: upstream, http://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/revision/1375 +Bug: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/851612 + +Index: lightdm-1.0.6/src/vt.c +=================================================================== +--- lightdm-1.0.6.orig/src/vt.c 2012-03-16 17:08:36.709912105 +0800 ++++ lightdm-1.0.6/src/vt.c 2012-03-16 17:14:59.659811048 +0800 +@@ -82,6 +82,11 @@ + int n = number; + if (ioctl (console_fd, VT_ACTIVATE, n) < 0) + g_warning ("Error using VT_ACTIVATE %d on /dev/console: %s", n, strerror (errno)); ++ /* Wait for the VT to become active to avoid a suspected ++ * race condition somewhere between LightDM, X, ConsoleKit and the kernel. ++ * See https://bugs.launchpad.net/bugs/851612 */ ++ if (ioctl (console_fd, VT_WAITACTIVE) < 0) ++ g_warning ("Error using VT_WAITACTIVE %d on /dev/console: %s", n, strerror (errno)); + close (console_fd); + } + #endif