--- gdm-2.26.1/gui/simple-greeter/gdm-user-manager.c.orig 2009-02-20 02:45:09.000000000 +0000 +++ gdm-2.26.1/gui/simple-greeter/gdm-user-manager.c 2009-08-09 06:00:37.000000000 +0100 @@ -1518,6 +1518,11 @@ GFile *file; GError *error; const char *exclude_default[] = DEFAULT_EXCLUDE; + char exc_filename[256]; /* The path to excluded shouldn't be THAT long */ + FILE *exc_file; + char exc_entry[256]; /* will we ever have 255-character usernames? */ + + sprintf(exc_filename, "%s/excluded", GDMCONFDIR); manager->priv = GDM_USER_MANAGER_GET_PRIVATE (manager); @@ -1538,6 +1543,24 @@ GUINT_TO_POINTER (TRUE)); } + exc_file = fopen(exc_filename, "r"); + if (exc_file != NULL) { + char *exc_res; + char *pos; + exc_res = exc_entry; + while (exc_res != NULL) { + exc_res = fgets(exc_entry, 255, exc_file); + if (exc_res) { + pos = index(exc_res, '\n'); + if (pos) *pos='\0'; + g_hash_table_insert (manager->priv->exclusions, + g_strdup (exc_entry), + GUINT_TO_POINTER (TRUE)); + } + } + fclose(exc_file); + } + /* /etc/shells */ manager->priv->shells = g_hash_table_new_full (g_str_hash, g_str_equal,