diff options
author | Ray Strode <rstrode@redhat.com> | 2013-05-20 14:53:22 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2013-05-20 19:49:12 -0400 |
commit | c155a72d4da6afe5ed6846954e6f06086ea91912 (patch) | |
tree | cbdf0376fc093ac16a60183d7e57702962870e5c | |
parent | e3bf97a6c42f94f86a9ebc7e7a7ae6d0cd426e41 (diff) | |
download | accountsservice-c155a72d4da6afe5ed6846954e6f06086ea91912.tar.gz |
daemon:Trust SystemAccount key from keyfile over heuristics
We use some less than perfect heuristics for determining whether or
not a user is a "system account".
This commit defers to what's in the key file when the key file
explicitly says.
https://bugs.freedesktop.org/show_bug.cgi?id=64769
-rw-r--r-- | src/user.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -347,6 +347,16 @@ user_update_from_keyfile (User *user, g_object_notify (G_OBJECT (user), "icon-file"); } + if (g_key_file_has_key (keyfile, "User", "SystemAccount", NULL)) { + gboolean system_account; + + system_account = g_key_file_get_boolean (keyfile, "User", "SystemAccount", NULL); + if (system_account != user->system_account) { + user->system_account = system_account; + g_object_notify (G_OBJECT (user), "system-account"); + } + } + g_object_thaw_notify (G_OBJECT (user)); } |