• João Paulo Rechi Vita's avatar
    daemon: Wait for reload before servicing list_cached_users · e88a50bd
    João Paulo Rechi Vita authored
    When /etc/passwd, /etc/shadow or /etc/group are changed outside of
    AccountsService, the cache reload is delayed by 500 ms so subsequent
    changes to these files are process seen together and AccountsService has
    a consistent view of the data (since after one of these files is changed
    the others may change too).
    If ListCachedUsers is called in this 500 ms window,
    finish_list_cached_users will be executed before reload_users_timeout
    has been dispatched, since its added to the mainloop as an idler and at
    point there is nothing preventing it from being executed. This makes
    finish_list_cached_users only be attached to the mainloop after
    reload_users_timeout has been dispatched.
    This bug was introduced by commit 4e3fad33 when the 500 ms delay was
    Closes: #71
daemon.c 52.7 KB