aboutsummaryrefslogtreecommitdiff
path: root/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c
diff options
context:
space:
mode:
authorKoop Mast <kwm@FreeBSD.org>2010-07-25 19:35:08 +0000
committerKoop Mast <kwm@FreeBSD.org>2010-07-25 19:35:08 +0000
commit65898b3f67b3d8e8a17dca6914405aded77c8962 (patch)
treee78e9c70bc1a3c88055a240791ca22ed62d1f879 /x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c
parent90a918f71bfcf23b3df4225f711a4644a2519b63 (diff)
downloadports-65898b3f67b3d8e8a17dca6914405aded77c8962.tar.gz
ports-65898b3f67b3d8e8a17dca6914405aded77c8962.zip
Notes
Diffstat (limited to 'x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c')
-rw-r--r--x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c41
1 files changed, 17 insertions, 24 deletions
diff --git a/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c b/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c
index b0b8ed37d060..a7bfbc883da0 100644
--- a/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c
+++ b/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c
@@ -1,6 +1,6 @@
---- gui/simple-greeter/gdm-user-manager.c.orig 2009-12-21 17:36:30.000000000 +0100
-+++ gui/simple-greeter/gdm-user-manager.c 2009-12-27 22:34:26.000000000 +0100
-@@ -66,6 +66,8 @@
+--- gui/simple-greeter/gdm-user-manager.c.orig 2010-06-26 00:09:31.000000000 +0200
++++ gui/simple-greeter/gdm-user-manager.c 2010-07-20 23:23:07.000000000 +0200
+@@ -62,6 +62,8 @@
#ifdef __sun
#define DEFAULT_MINIMAL_UID 100
@@ -9,19 +9,12 @@
#else
#define DEFAULT_MINIMAL_UID 500
#endif
-@@ -1414,17 +1416,24 @@ reload_passwd (GdmUserManager *manager)
- GSList *new_users;
- GSList *list;
- GSList *dup;
-+#ifndef __FreeBSD__
- FILE *fp;
-+#endif
-
- old_users = NULL;
- new_users = NULL;
+@@ -1678,12 +1680,17 @@ reload_passwd_file (GHashTable *valid_sh
+ NULL,
+ g_object_unref);
+#ifdef __FreeBSD__
-+ setpwent ();
++ setpwent ();
+#else
+
errno = 0;
@@ -32,25 +25,25 @@
}
+#endif
- g_hash_table_foreach (manager->priv->users, listify_hash_values_hfunc, &old_users);
- g_slist_foreach (old_users, (GFunc) g_object_ref, NULL);
-@@ -1443,9 +1452,15 @@ reload_passwd (GdmUserManager *manager)
- } else {
+ /* Make sure we keep users who are logged in no matter what. */
+ g_hash_table_iter_init (&iter, current_users_by_name);
+@@ -1733,9 +1740,15 @@ reload_passwd_file (GHashTable *valid_sh
+
g_debug ("GdmUserManager: include_all is TRUE");
+#ifdef __FreeBSD__
+ for (pwent = getpwent ();
+ pwent != NULL;
-+ pwent = getpwent()) {
++ pwent = getpwent ()) {
+#else
for (pwent = fgetpwent (fp);
pwent != NULL;
pwent = fgetpwent (fp)) {
+#endif
- GdmUser *user;
- user = NULL;
-@@ -1521,7 +1536,11 @@ reload_passwd (GdmUserManager *manager)
+ /* Skip users below MinimalUID... */
+ if (pwent->pw_uid < DEFAULT_MINIMAL_UID) {
+@@ -1810,7 +1823,11 @@ reload_passwd_file (GHashTable *valid_sh
out:
/* Cleanup */
@@ -60,5 +53,5 @@
fclose (fp);
+#endif
- g_slist_foreach (new_users, (GFunc) g_object_thaw_notify, NULL);
- g_slist_foreach (new_users, (GFunc) g_object_unref, NULL);
+ g_hash_table_iter_init (&iter, new_users_by_name);
+ while (g_hash_table_iter_next (&iter, (gpointer *) &name, (gpointer *) &user)) {