Bug 39413 - Monitor /etc/gdm/custom.conf
Summary: Monitor /etc/gdm/custom.conf
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 23:14 UTC by Vincent Untz
Modified: 2011-07-21 13:21 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Add file monitoring for /etc/gdm/custom.conf (6.11 KB, patch)
2011-07-20 23:37 UTC, Vincent Untz
Details | Splinter Review

Description Vincent Untz 2011-07-20 23:14:26 UTC
Some admins are simply used to editing config files by hand and might tweak the autologin configuration themselves. In that case, accounts-daemon will get out of sync with the autologin data as there's no file monitoring for /etc/gdm/custom.conf
Comment 1 Vincent Untz 2011-07-20 23:37:50 UTC
Created attachment 49360 [details] [review]
Add file monitoring for /etc/gdm/custom.conf

Two things:

 - it might be a good thing to use queue_reload_users() in on_passwd_monitor_changed(), instead of reload_users(), to avoid reloading things multiple times when /etc/passwd and /etc/shadow are changed together

 - the patch adds signal emission on changes when loading the config, in reload_autologin_timeout(). This easy way implies sending signals on start. Is this fine?
Comment 2 Ray Strode [halfline] 2011-07-21 13:21:43 UTC
(In reply to comment #1)
> Created an attachment (id=49360) [details]
> Add file monitoring for /etc/gdm/custom.conf
> 
> Two things:
> 
>  - it might be a good thing to use queue_reload_users() in
> on_passwd_monitor_changed(), instead of reload_users(), to avoid reloading
> things multiple times when /etc/passwd and /etc/shadow are changed together
Okay, 

http://cgit.freedesktop.org/accountsservice/commit/?id=4e3fad33442dfd908561960921aad335fad6b5a8

>  - the patch adds signal emission on changes when loading the config, in
> reload_autologin_timeout(). This easy way implies sending signals on start. Is
> this fine?
I think that's okay.  We can fix it if we need to (say if we made accounts-daemon exit on timeout later or something).

Committed your patch:
http://cgit.freedesktop.org/accountsservice/commit/?id=0c32736980a4f02d4eacf90d145bf937bf29dea6
http://cgit.freedesktop.org/accountsservice/commit/?id=07ea415a5ea0fc5039c947f967c5683ef0e31201


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.