From df8e8831131663efc7ca42c4016e445362bee843 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 20 Jul 2011 10:54:35 -0400 Subject: [PATCH] daemon: ignore extraneous SetAutomaticLogin(false) calls for a user Right now, if a user is not configured for automatic login, and SetAutomaticLogin(false) is called for that user then we disable automatic login system wide even if someone else is configured for automatic login. This commit changes the semantics of the call such that SetAutomaticLogin(false) is a no op for users where automatic login isn't already enabled. Spotted by Vincent Untz https://bugs.freedesktop.org/show_bug.cgi?id=39402 --- src/daemon.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/daemon.c b/src/daemon.c index ec319a9..f8753d6 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -1294,6 +1294,10 @@ daemon_local_set_automatic_login (Daemon *daemon, return TRUE; } + if (daemon->priv->autologin != user && !enabled) { + return TRUE; + } + if (!save_autologin (daemon, user_local_get_user_name (user), enabled, error)) { return FALSE; } -- 1.7.6