[fdo] [PATCH 2/2] Check shell when building cached list

Matthew Monaco dgbaley27 at 0x01b.net
Mon May 7 07:29:24 PDT 2012


From: Matthew Monaco <matthew.monaco at 0x01b.net>

---
 src/daemon.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/daemon.c b/src/daemon.c
index bff139e..c2fc563 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -835,13 +835,16 @@ finish_list_cached_users (gpointer user_data)
         const gchar *name;
         User *user;
         uid_t uid;
+        gchar *shell;
 
         object_paths = g_ptr_array_new ();
 
         g_hash_table_iter_init (&iter, data->daemon->priv->users);
         while (g_hash_table_iter_next (&iter, (gpointer *)&name, (gpointer *)&user)) {
                 uid = user_local_get_uid (user);
-                if (!daemon_local_user_is_excluded (data->daemon, name, NULL)) {
+                shell = user_local_get_shell (user);
+                printf("Inspecting user id: %u... ", uid);
+                if (!daemon_local_user_is_excluded (data->daemon, name, shell)) {
                         g_debug ("user %s %ld not excluded\n", name, (long) uid);
                         g_ptr_array_add (object_paths, (gpointer) user_local_get_object_path (user));
                 }
-- 
1.7.10.1



More information about the freedesktop mailing list