From owner-freebsd-gnome@FreeBSD.ORG Wed Dec 7 18:38:42 2011 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB98F1065670 for ; Wed, 7 Dec 2011 18:38:42 +0000 (UTC) (envelope-from kris@pcbsd.org) Received: from mail.iXsystems.com (newknight.ixsystems.com [206.40.55.70]) by mx1.freebsd.org (Postfix) with ESMTP id 5D4398FC08 for ; Wed, 7 Dec 2011 18:38:42 +0000 (UTC) Received: from mail.ixsystems.com (localhost [127.0.0.1]) by mail.iXsystems.com (Postfix) with ESMTP id 6AAA25E9 for ; Wed, 7 Dec 2011 10:19:37 -0800 (PST) Received: from mail.iXsystems.com ([127.0.0.1]) by mail.ixsystems.com (mail.ixsystems.com [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 56165-02 for ; Wed, 7 Dec 2011 10:19:37 -0800 (PST) Received: from [192.168.0.188] (75-130-56-30.static.kgpt.tn.charter.com [75.130.56.30]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTPSA id 1012D5E4 for ; Wed, 7 Dec 2011 10:19:36 -0800 (PST) Message-ID: <4EDFAE37.1090605@pcbsd.org> Date: Wed, 07 Dec 2011 13:19:35 -0500 From: Kris Moore User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111123 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-gnome@freebsd.org X-Enigmail-Version: undefined Content-Type: multipart/mixed; boundary="------------070402050705080401080708" Subject: Patch for GDM to fix AutoLogin issues X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2011 18:38:43 -0000 This is a multi-part message in MIME format. --------------070402050705080401080708 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit A user sent us a heads up for a patch that fixes issues with GDM auto-login, when you want to logout and login as another user. http://forums.pcbsd.org/showthread.php?t=15615 The attached patch is from opensuse and should work if you drop it into x11/gdm/files/ Anybody want to take a look at it and put it in the port? Thanks! -- Kris Moore PC-BSD Software iXsystems --------------070402050705080401080708 Content-Type: text/plain; name="patch-daemon-gdm-static-display.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-daemon-gdm-static-display.c" --- daemon/gdm-static-display.c +++ daemon/gdm-static-display.c @@ -45,7 +45,7 @@ struct GdmStaticDisplayPrivate { - gboolean enable_timed_login; + gboolean first_login; }; enum { @@ -121,6 +121,8 @@ gdm_static_display_unmanage (GdmDisplay *display) { g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE); + GDM_STATIC_DISPLAY (display)->priv->first_login = FALSE; + GDM_DISPLAY_CLASS (gdm_static_display_parent_class)->unmanage (display); return TRUE; @@ -158,12 +160,14 @@ gdm_static_display_get_timed_login_details (GdmDisplay *display, char **usernamep, int *delayp) { - if (GDM_STATIC_DISPLAY (display)->priv->enable_timed_login) { - GDM_DISPLAY_CLASS (gdm_static_display_parent_class)->get_timed_login_details (display, enabledp, usernamep, delayp); - } else { - *enabledp = FALSE; - *usernamep = g_strdup (""); - *delayp = 0; + GDM_DISPLAY_CLASS (gdm_static_display_parent_class)->get_timed_login_details (display, enabledp, usernamep, delayp); + + if (!GDM_STATIC_DISPLAY (display)->priv->first_login) { + /* if this is autologin but not timed login, then disable + * autologin after the first one */ + if (*enabledp && *delayp == 0) { + *enabledp = FALSE; + } } } @@ -196,7 +200,7 @@ gdm_static_display_init (GdmStaticDisplay *static_display) static_display->priv = GDM_STATIC_DISPLAY_GET_PRIVATE (static_display); - static_display->priv->enable_timed_login = TRUE; + static_display->priv->first_login = TRUE; } static void --------------070402050705080401080708--