Bug 39402

Summary: SetAutomaticLogin method partially broken
Product: accountsservice Reporter: Vincent Untz <vuntz>
Component: generalAssignee: Matthias Clasen <mclasen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: rstrode
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: daemon: ignore extraneous SetAutomaticLogin(false) calls for a user

Description Vincent Untz 2011-07-20 07:14:52 UTC
Just reading at the code, it looks to me that SetAutomaticLogin is broken.

Let's assume that autologin is configured for Alice. Now, if we call SetAutomaticLogin(False) on the Bob user, autologin will be disabled. However, the expected behavior, imho, is that it should be disabled for Bob, but should not disable anything for Alice (unless SetAutomaticLogin(True) is used, obviously).
Comment 1 Ray Strode [halfline] 2011-07-20 08:01:18 UTC
Created attachment 49345 [details] [review]
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 <vuntz@gnome.org>
Comment 2 Ray Strode [halfline] 2011-07-20 08:01:45 UTC
That patch look okay?
Comment 3 Vincent Untz 2011-07-20 10:07:12 UTC
Looks sane to me.
Comment 4 Matthias Clasen 2011-07-20 20:22:17 UTC
Makes sense to me as well
Comment 5 Ray Strode [halfline] 2011-07-21 12:55:19 UTC
alrighty

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.