diff --git a/gdm-2.22.0-fix-auto-login.patch b/gdm-2.22.0-fix-auto-login.patch
new file mode 100644
index 0000000..1bb68e5
--- /dev/null
+++ b/gdm-2.22.0-fix-auto-login.patch
@@ -0,0 +1,63 @@
+diff -up gdm-2.22.0/common/gdm-settings-keys.h.fix-auto-login gdm-2.22.0/common/gdm-settings-keys.h
+--- gdm-2.22.0/common/gdm-settings-keys.h.fix-auto-login 2008-06-27 12:49:43.000000000 -0400
++++ gdm-2.22.0/common/gdm-settings-keys.h 2008-06-27 12:50:25.000000000 -0400
+@@ -27,6 +27,8 @@ G_BEGIN_DECLS
+
+ #define GDM_KEY_USER "daemon/User"
+ #define GDM_KEY_GROUP "daemon/Group"
++#define GDM_KEY_AUTO_LOGIN_ENABLE "daemon/AutomaticLoginEnable"
++#define GDM_KEY_AUTO_LOGIN_USER "daemon/AutomaticLogin"
+ #define GDM_KEY_TIMED_LOGIN_ENABLE "daemon/TimedLoginEnable"
+ #define GDM_KEY_TIMED_LOGIN_USER "daemon/TimedLogin"
+ #define GDM_KEY_TIMED_LOGIN_DELAY "daemon/TimedLoginDelay"
+diff -up gdm-2.22.0/data/gdm.schemas.in.in.fix-auto-login gdm-2.22.0/data/gdm.schemas.in.in
+--- gdm-2.22.0/data/gdm.schemas.in.in.fix-auto-login 2008-06-27 12:55:20.000000000 -0400
++++ gdm-2.22.0/data/gdm.schemas.in.in 2008-06-27 12:55:08.000000000 -0400
+@@ -12,6 +12,16 @@
+ gdm
+
+
++ daemon/AutomaticLoginEnable
++ b
++ false
++
++
++ daemon/AutomaticLogin
++ s
++
++
++
+ daemon/TimedLoginEnable
+ b
+ false
+diff -up gdm-2.22.0/daemon/gdm-simple-slave.c.fix-autologin gdm-2.22.0/daemon/gdm-simple-slave.c
+--- gdm-2.22.0/daemon/gdm-simple-slave.c.fix-autologin 2008-06-27 12:47:26.000000000 -0400
++++ gdm-2.22.0/daemon/gdm-simple-slave.c 2008-06-27 12:54:21.000000000 -0400
+@@ -427,12 +427,26 @@ get_timed_login_details (GdmSimpleSlave
+ gboolean res;
+
+ enabled = FALSE;
++ res = gdm_settings_client_get_boolean (GDM_KEY_AUTO_LOGIN_ENABLE, &enabled);
++ if (enabled) {
++
++ *username = NULL;
++ res = gdm_settings_client_get_string (GDM_KEY_TIMED_LOGIN_USER, username);
++ }
++
++ if (enabled && *username != NULL)
++ {
++ *delay = 0;
++ return TRUE;
++ }
++
++ *username = NULL;
++ enabled = FALSE;
+ res = gdm_settings_client_get_boolean (GDM_KEY_TIMED_LOGIN_ENABLE, &enabled);
+ if (! enabled) {
+ return FALSE;
+ }
+
+- *username = NULL;
+ res = gdm_settings_client_get_string (GDM_KEY_TIMED_LOGIN_USER, username);
+
+ if (username == NULL) {
diff --git a/gdm.spec b/gdm.spec
index b7de9ab..4a39194 100644
--- a/gdm.spec
+++ b/gdm.spec
@@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.22.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@@ -85,6 +85,7 @@ Patch4: gdm-2.22.0-fix-language-selector.patch
Patch5: gdm-2.22.0-fix-pam-mkhomedir.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=446672
Patch6: gdm-2.22.0-enable-tcp.patch
+Patch7: gdm-2.22.0-fix-auto-login.patch
Patch99: gdm-2.21.8-fedora-logo.patch
%package user-switch-applet
@@ -110,6 +111,7 @@ multiple simulanteous logged in users.
%patch4 -p1 -b .fix-language-selector
%patch5 -p1 -b .fix-pam-mkhomedir
%patch6 -p1 -b .enable-tcp
+%patch7 -p1 -b .fix-auto-login
%patch99 -p1 -b .fedora-logo
%build
@@ -307,6 +309,9 @@ fi
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
%changelog
+* Fri Jun 27 2008 Ray Strode - 1:2.22.0-7
+- Fix automatic login option
+
* Wed Jun 25 2008 Ray Strode - 1:2.22.0-6
- Add back tcp connection option (bug 446672)