--- a/ChangeLog Mon Aug 31 16:23:04 2009 +0000
+++ b/ChangeLog Tue Sep 01 00:51:45 2009 +0000
@@ -1,3 +1,9 @@
+2009-08-31 Brian Cameron <[email protected]>
+
+ * base-specs/gdm.spec, patches/gdm-09-include-exclude.diff: Add
+ patch gdm-09-include-exclude.diff to address bugster #557553,
+ doo #10913.
+
2009-08-31 Christian Kelly <[email protected]>
* base-specs/*.spec, *.spec: Change owner field to be parsable with
@@ -188,7 +194,6 @@
2009-08-28 Laszlo (Laca) Peter <[email protected]>
Fixes d.o.o bug 10427.
-
* SUNWPython25.spec: add SUNWgnome-common-devel dep for pkg-config
* SUNWPython26.spec: add SUNWgnome-common-devel dep for pkg-config
* SUNWgnome-common-devel.spec: remove Python dependencies as they
@@ -255,7 +260,8 @@
2009-08-28 Leon Sha <[email protected]>
- * SUNWgnome-img-editor-help.spec:Remove ko and ru locale files if no "--with-l10n" specified.
+ * SUNWgnome-img-editor-help.spec:Remove ko and ru locale files if no
+ "--with-l10n" specified.
2009-08-28 Ke Wang <[email protected]>
* base-specs/java-atk-wrapper.spec: Bump to 0.27.8
@@ -292,15 +298,15 @@
2009-08-27 Christian Kelly <[email protected]>
- * base-specs/orca.spec: Bump to 2.27.91.
- * patches/orca-01-menu-entry.diff: Remove, upstream.
+ * base-specs/orca.spec: Bump to 2.27.91.
+ * patches/orca-01-menu-entry.diff: Remove, upstream.
2009-08-27 Brian Cameron <[email protected]>
* base-specs/libcanberra.spec, patches/libcanberra-01-solaris.diff:
Bump to 0.16, rework patch.
* SUNWxdg-sound-theme.spec: Bump to 0.5.
-
+
2009-08-27 Christian Kelly <[email protected]>
* base-specs/gnome-user-docs.spec: Bump to 2.27.1.
@@ -348,7 +354,7 @@
2009-08-27 Dave Lin <[email protected]>
- * include/options.inc: Set option_with_apoc_adapter to 0 as default.
+ * include/options.inc: Set option_with_apoc_adapter to 0 as default.
2009-08-27 Leon Sha <[email protected]>
@@ -357,8 +363,8 @@
2009-08-27 Jerry Tan <[email protected]>
- * base-specs/raptor.spec:
- update with vendor info
+ * base-specs/raptor.spec:
+ update with vendor info
2009-08-27 Lin Ma <[email protected]>
@@ -373,9 +379,9 @@
2009-08-27 Li Yuan <[email protected]>
* base-specs/atk.spec:
- Run aclocal and related commands before configure.
+ Run aclocal and related commands before configure.
* base-specs/at-spi.spec:
- Run autoheader before configure.
+ Run autoheader before configure.
2009-08-26 Christian Kelly <[email protected]>
@@ -389,7 +395,8 @@
* patches/gnome-panel-08-launch-menu.diff : Rework
* patches/gnome-panel-10-trusted-extensions.diff : Rework
* patches/gnome-panel-14-hide-show-weather.diff : Rework
- * patches/gnome-panel-16-set-default-location-crash.diff : Remove, upstream
+ * patches/gnome-panel-16-set-default-location-crash.diff : Remove,
+ upstream
* patches/gnome-panel-17-disable-shave.diff : Remove, upstream
2009-08-26 Christian Kelly <[email protected]>
@@ -431,9 +438,9 @@
2009-08-26 Jerry Tan <[email protected]>
- * SUNWlibtheora.spec:
- * base-specs/libtheora.spec:
- fix build error
+ * SUNWlibtheora.spec:
+ * base-specs/libtheora.spec:
+ fix build error
2009-08-24 Laszlo (Laca) Peter <[email protected]>
@@ -442,7 +449,7 @@
* patches/Python-01-solaris-lib-dirs.diff: update to find ncurses
* patches/Python26-01-solaris-lib-dirs.diff: update to find ncurses
* patches/Python26-06-write_compiled_module-atomic.diff: merge for 2.6.2
- Fixes 6833157, 6872653 and 6873157.
+ Fixes 6833157, 6872653 and 6873157.
2009-08-26 Halton Huo <[email protected]>
@@ -453,11 +460,11 @@
* SUNWgnome-cd-burner.spec:
* patches/brasero-02-load-by-gksu.diff:
- Add a desktop file to open brasero in nautilus when an medium is
- inserted.
+ Add a desktop file to open brasero in nautilus when an medium is
+ inserted.
* patches/nautilus-14-interface-changes.diff:
- Updated, removed "CD/DVD creator" entry of the sidepanel of nautilus
- because this will be replaced by brasero nautilus extension.
+ Updated, removed "CD/DVD creator" entry of the sidepanel of nautilus
+ because this will be replaced by brasero nautilus extension.
2009-08-26 Jerry Tan <[email protected]>
@@ -475,9 +482,9 @@
* base-specs/nautilus.spec: Bump to 2.27.91
* patches/nautilus-06-frame-buffer.diff,
- patches/nautilus-07-lockdown.diff,
- patches/nautilus-13-zfs-snapshot.diff,
- patches/nautilus-14-interface-changes.diff: Update for 2.27.91
+ patches/nautilus-07-lockdown.diff,
+ patches/nautilus-13-zfs-snapshot.diff,
+ patches/nautilus-14-interface-changes.diff: Update for 2.27.91
2009-08-26 Padraig O'Briain <[email protected]>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gdm-09-include-exclude.diff Tue Sep 01 00:51:45 2009 +0000
@@ -0,0 +1,386 @@
+--- gdm-2.27.90/gui/simple-greeter/gdm-simple-greeter.schemas.in-orig 2009-08-31 14:24:08.587186000 -0500
++++ gdm-2.27.90/gui/simple-greeter/gdm-simple-greeter.schemas.in 2009-08-31 16:34:50.675703131 -0500
+@@ -281,6 +281,41 @@
+ <long></long>
+ </locale>
+ </schema>
++ <schema>
++ <key>/schemas/apps/gdm/simple-greeter/include_all</key>
++ <applyto>/apps/gdm/simple-greeter/include_all</applyto>
++ <owner>gdm-simple-greeter</owner>
++ <type>bool</type>
++ <default>TRUE</default>
++ <locale name="C">
++ <short>Include local users in Face Browser</short>
++ <long>Set to true to include system local users in Face Browser</long>
++ </locale>
++ </schema>
++ <schema>
++ <key>/schemas/apps/gdm/simple-greeter/include</key>
++ <applyto>/apps/gdm/simple-greeter/include</applyto>
++ <owner>gdm-simple-greeter</owner>
++ <type>list</type>
++ <list_type>string</list_type>
++ <default>[]</default>
++ <locale name="C">
++ <short>Users to include in the Face Browser</short>
++ <long>Set to a list of users to be shown by default in the Face Browser.</long>
++ </locale>
++ </schema>
++ <schema>
++ <key>/schemas/apps/gdm/simple-greeter/exclude</key>
++ <applyto>/apps/gdm/simple-greeter/exclude</applyto>
++ <owner>gdm-simple-greeter</owner>
++ <type>list</type>
++ <list_type>string</list_type>
++ <default>[bin,root,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp,operator,nobody,nobody4,noaccess,postgres,pvm,rpm,nfsnobody,pcap]</default>
++ <locale name="C">
++ <short>Users to exclude in the Face Browser</short>
++ <long>Set to a list of users not to be shown in the Face Browser.</long>
++ </locale>
++ </schema>
+
+ </schemalist>
+ </gconfschemafile>
+--- gdm-2.27.90/gui/simple-greeter/gdm-user-manager.c-orig 2009-08-31 19:36:34.005827775 -0500
++++ gdm-2.27.90/gui/simple-greeter/gdm-user-manager.c 2009-08-31 19:38:45.136149154 -0500
+@@ -40,6 +40,8 @@
+ #include <glib-object.h>
+ #include <gio/gio.h>
+
++#include <gconf/gconf-client.h>
++
+ #include <dbus/dbus.h>
+ #include <dbus/dbus-glib.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+@@ -76,34 +78,14 @@
+
+ #define DEFAULT_GLOBAL_FACE_DIR DATADIR "/faces"
+ #define DEFAULT_USER_ICON "stock_person"
+-#define DEFAULT_EXCLUDE { "bin", \
+- "root", \
+- "daemon", \
+- "adm", \
+- "lp", \
+- "sync", \
+- "shutdown", \
+- "halt", \
+- "mail", \
+- "news", \
+- "uucp", \
+- "operator", \
+- "nobody", \
+- "nobody4", \
+- "noaccess", \
+- GDM_USERNAME, \
+- "postgres", \
+- "pvm", \
+- "rpm", \
+- "nfsnobody", \
+- "pcap", \
+- NULL }
++#define KEY_INCLUDE_ALL "/apps/gdm/simple-greeter/include_all"
++#define KEY_INCLUDE "/apps/gdm/simple-greeter/include"
++#define KEY_EXCLUDE "/apps/gdm/simple-greeter/exclude"
+
+ struct GdmUserManagerPrivate
+ {
+ GHashTable *users;
+ GHashTable *sessions;
+- GHashTable *exclusions;
+ GHashTable *shells;
+ DBusGConnection *connection;
+ DBusGProxy *seat_proxy;
+@@ -112,6 +94,10 @@ struct GdmUserManagerPrivate
+ GFileMonitor *passwd_monitor;
+ GFileMonitor *shells_monitor;
+
++ GSList *exclude;
++ GSList *include;
++ gboolean include_all;
++
+ guint reload_id;
+ guint ck_history_id;
+
+@@ -571,6 +557,39 @@ get_x11_display_for_session (DBusGConnec
+ return x11_display;
+ }
+
++static gint
++match_name_cmpfunc (gconstpointer a,
++ gconstpointer b)
++{
++ if (a == NULL || b == NULL)
++ return -1;
++
++ return g_strcmp0 ((char *) a,
++ (char *) b);
++}
++
++static gboolean
++check_excludes (GdmUserManager *manager, const char *user)
++{
++ GSList *found;
++ gboolean ret = FALSE;
++
++ g_debug ("checking exclude list");
++
++ /* always exclude the "gdm" user. */
++ if (user == NULL || (strcmp (user, GDM_USERNAME) == 0))
++ return TRUE;
++
++ if (manager->priv->exclude != NULL) {
++ found = g_slist_find_custom (manager->priv->exclude,
++ user,
++ match_name_cmpfunc);
++ if (found != NULL)
++ ret = TRUE;
++ }
++ return ret;
++}
++
+ static gboolean
+ maybe_add_session_for_user (GdmUserManager *manager,
+ GdmUser *user,
+@@ -600,7 +619,7 @@ maybe_add_session_for_user (GdmUserManag
+ goto out;
+ }
+
+- if (g_hash_table_lookup (manager->priv->exclusions, gdm_user_get_user_name (user))) {
++ if (check_excludes (manager, gdm_user_get_user_name (user))) {
+ g_debug ("GdmUserManager: excluding user '%s'", gdm_user_get_user_name (user));
+ goto out;
+ }
+@@ -866,7 +885,7 @@ seat_session_added (DBusGProxy *seat
+ }
+
+ /* check exclusions up front */
+- if (g_hash_table_lookup (manager->priv->exclusions, pwent->pw_name)) {
++ if (check_excludes (manager, pwent->pw_name)) {
+ g_debug ("GdmUserManager: excluding user '%s'", pwent->pw_name);
+ return;
+ }
+@@ -1169,7 +1188,7 @@ process_ck_history_line (GdmUserManager
+ return;
+ }
+
+- if (g_hash_table_lookup (manager->priv->exclusions, username)) {
++ if (check_excludes (manager, username)) {
+ g_debug ("GdmUserManager: excluding user '%s'", username);
+ g_free (username);
+ return;
+@@ -1298,6 +1317,20 @@ reload_ck_history (GdmUserManager *manag
+ }
+
+ static void
++add_included_user (char *username, GdmUserManager *manager)
++{
++ GdmUser *user;
++
++ g_debug ("Adding included user %s", username);
++ user = gdm_user_manager_get_user (manager, username);
++ if (user == NULL) {
++ g_debug ("GdmUserManager: unable to lookup user '%s'", username);
++ g_free (username);
++ return;
++ }
++}
++
++static void
+ reload_passwd (GdmUserManager *manager)
+ {
+ struct passwd *pwent;
+@@ -1329,7 +1362,12 @@ reload_passwd (GdmUserManager *manager)
+ }
+ }
+
+- for (pwent = fgetpwent (fp); pwent != NULL; pwent = fgetpwent (fp)) {
++ if (manager->priv->include_all == TRUE)
++ g_debug ("GdmUserManager: include_all is TRUE");
++ else
++ g_debug ("GdmUserManager: include_all is FALSE");
++
++ for (pwent = fgetpwent (fp); (pwent != NULL && manager->priv->include_all == TRUE); pwent = fgetpwent (fp)) {
+ GdmUser *user;
+
+ user = NULL;
+@@ -1347,7 +1385,7 @@ reload_passwd (GdmUserManager *manager)
+ }
+
+ /* ...And explicitly excluded users */
+- if (g_hash_table_lookup (manager->priv->exclusions, pwent->pw_name)) {
++ if (check_excludes (manager, pwent->pw_name)) {
+ g_debug ("GdmUserManager: explicitly skipping user: %s", pwent->pw_name);
+ continue;
+ }
+@@ -1397,6 +1435,13 @@ reload_passwd (GdmUserManager *manager)
+ }
+ }
+
++ /* Add users who are specifically included */
++ if (manager->priv->include != NULL) {
++ g_slist_foreach (manager->priv->include,
++ (GFunc)add_included_user,
++ (gpointer)manager);
++ }
++
+ out:
+ /* Cleanup */
+
+@@ -1557,71 +1602,91 @@ gdm_user_manager_init (GdmUserManager *m
+ int i;
+ GFile *file;
+ GError *error;
+- const char *exclude_default[] = DEFAULT_EXCLUDE;
++ GConfClient *client;
+
+ manager->priv = GDM_USER_MANAGER_GET_PRIVATE (manager);
+
+- /* sessions */
+- manager->priv->sessions = g_hash_table_new_full (g_str_hash,
+- g_str_equal,
+- g_free,
+- g_free);
++ /* exclude/include */
++ error = NULL;
++ client = gconf_client_get_default ();
++ manager->priv->exclude = gconf_client_get_list (client, KEY_EXCLUDE, GCONF_VALUE_STRING, &error);
++ if (error != NULL) {
++ g_debug ("GdmUserManager: unable to get exclude configuration: %s", error->message);
++ g_error_free (error);
++ manager->priv->exclude = NULL;
++ }
+
+- /* exclusions */
+- manager->priv->exclusions = g_hash_table_new_full (g_str_hash,
+- g_str_equal,
+- g_free,
+- NULL);
+- for (i = 0; exclude_default[i] != NULL; i++) {
+- g_hash_table_insert (manager->priv->exclusions,
+- g_strdup (exclude_default [i]),
+- GUINT_TO_POINTER (TRUE));
++ error = NULL;
++ manager->priv->include = gconf_client_get_list (client, KEY_INCLUDE, GCONF_VALUE_STRING, &error);
++ if (error != NULL) {
++ g_debug ("GdmUserManager: unable to get include configuration: %s", error->message);
++ g_error_free (error);
++ manager->priv->include = NULL;
+ }
+
+- /* /etc/shells */
+- manager->priv->shells = g_hash_table_new_full (g_str_hash,
+- g_str_equal,
+- g_free,
+- NULL);
+- reload_shells (manager);
+- file = g_file_new_for_path (_PATH_SHELLS);
+ error = NULL;
+- manager->priv->shells_monitor = g_file_monitor_file (file,
+- G_FILE_MONITOR_NONE,
+- NULL,
+- &error);
+- if (manager->priv->shells_monitor != NULL) {
+- g_signal_connect (manager->priv->shells_monitor,
+- "changed",
+- G_CALLBACK (on_shells_monitor_changed),
+- manager);
+- } else {
+- g_warning ("Unable to monitor %s: %s", _PATH_SHELLS, error->message);
++ manager->priv->include_all = gconf_client_get_bool (client, KEY_INCLUDE_ALL, &error);
++
++ if (error != NULL) {
++ g_debug ("GdmUserManager: unable to get include_all configuration: %s", error->message);
+ g_error_free (error);
++ manager->priv->include_all = TRUE;
+ }
+- g_object_unref (file);
++ g_object_unref (client);
++
++ /* sessions */
++ manager->priv->sessions = g_hash_table_new_full (g_str_hash,
++ g_str_equal,
++ g_free,
++ g_free);
+
+- /* /etc/passwd */
++ /* users */
+ manager->priv->users = g_hash_table_new_full (g_str_hash,
+ g_str_equal,
+ g_free,
+ (GDestroyNotify) g_object_run_dispose);
+- file = g_file_new_for_path (PATH_PASSWD);
+- manager->priv->passwd_monitor = g_file_monitor_file (file,
+- G_FILE_MONITOR_NONE,
+- NULL,
+- &error);
+- if (manager->priv->passwd_monitor != NULL) {
+- g_signal_connect (manager->priv->passwd_monitor,
+- "changed",
+- G_CALLBACK (on_passwd_monitor_changed),
+- manager);
+- } else {
+- g_warning ("Unable to monitor %s: %s", PATH_PASSWD, error->message);
+- g_error_free (error);
+- }
+- g_object_unref (file);
+
++ if (manager->priv->include_all == TRUE) {
++ /* /etc/shells */
++ manager->priv->shells = g_hash_table_new_full (g_str_hash,
++ g_str_equal,
++ g_free,
++ NULL);
++ reload_shells (manager);
++ file = g_file_new_for_path (_PATH_SHELLS);
++ error = NULL;
++ manager->priv->shells_monitor = g_file_monitor_file (file,
++ G_FILE_MONITOR_NONE,
++ NULL,
++ &error);
++ if (manager->priv->shells_monitor != NULL) {
++ g_signal_connect (manager->priv->shells_monitor,
++ "changed",
++ G_CALLBACK (on_shells_monitor_changed),
++ manager);
++ } else {
++ g_warning ("Unable to monitor %s: %s", _PATH_SHELLS, error->message);
++ g_error_free (error);
++ }
++ g_object_unref (file);
++
++ /* /etc/passwd */
++ file = g_file_new_for_path (PATH_PASSWD);
++ manager->priv->passwd_monitor = g_file_monitor_file (file,
++ G_FILE_MONITOR_NONE,
++ NULL,
++ &error);
++ if (manager->priv->passwd_monitor != NULL) {
++ g_signal_connect (manager->priv->passwd_monitor,
++ "changed",
++ G_CALLBACK (on_passwd_monitor_changed),
++ manager);
++ } else {
++ g_warning ("Unable to monitor %s: %s", PATH_PASSWD, error->message);
++ g_error_free (error);
++ }
++ g_object_unref (file);
++ }
+
+ get_seat_proxy (manager);
+
+@@ -1642,6 +1707,14 @@ gdm_user_manager_finalize (GObject *obje
+
+ g_return_if_fail (manager->priv != NULL);
+
++ if (manager->priv->exclude != NULL) {
++ g_slist_free (manager->priv->exclude);
++ }
++
++ if (manager->priv->include != NULL) {
++ g_slist_free (manager->priv->include);
++ }
++
+ if (manager->priv->seat_proxy != NULL) {
+ g_object_unref (manager->priv->seat_proxy);
+ }