Bug 39402 - SetAutomaticLogin method partially broken
Summary: SetAutomaticLogin method partially broken
Status: RESOLVED FIXED
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-20 07:14 UTC by Vincent Untz
Modified: 2011-07-21 12:55 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
daemon: ignore extraneous SetAutomaticLogin(false) calls for a user (1.21 KB, patch)
2011-07-20 08:01 UTC, Ray Strode [halfline]
Details | Splinter Review

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.