[gdm] Do not autologin again after a logout
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] Do not autologin again after a logout
- Date: Fri, 17 Dec 2010 23:48:12 +0000 (UTC)
commit f06d3c70e54ca935312bf3cae2ac6c81c19ba731
Author: Vincent Untz <vuntz gnome org>
Date: Fri Oct 2 00:53:04 2009 +0200
Do not autologin again after a logout
Note that it doesn't affect timed login at all.
https://bugzilla.gnome.org/show_bug.cgi?id=587606
daemon/gdm-static-display.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/daemon/gdm-static-display.c b/daemon/gdm-static-display.c
index a747ee3..9605f5a 100644
--- a/daemon/gdm-static-display.c
+++ b/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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]