- Update to 2.26.1

This commit is contained in:
Ray Strode 2009-04-14 14:41:47 +00:00
parent c8d9d840f5
commit 68c0f7b84b
9 changed files with 5 additions and 14731 deletions

View File

@ -1,36 +0,0 @@
diff -up gdm-2.25.2/daemon/gdm-server.c.append-logs gdm-2.25.2/daemon/gdm-server.c
--- gdm-2.25.2/daemon/gdm-server.c.append-logs 2009-01-22 10:42:10.043245824 -0500
+++ gdm-2.25.2/daemon/gdm-server.c 2009-01-22 10:42:30.770530113 -0500
@@ -421,7 +421,7 @@ server_child_setup (GdmServer *server)
g_debug ("GdmServer: Opening logfile for server %s", log_path);
VE_IGNORE_EINTR (g_unlink (log_path));
- VE_IGNORE_EINTR (logfd = open (log_path, O_CREAT|O_TRUNC|O_WRONLY|O_EXCL, 0644));
+ VE_IGNORE_EINTR (logfd = open (log_path, O_CREAT|O_APPEND|O_TRUNC|O_WRONLY|O_EXCL, 0644));
g_free (log_path);
diff -up gdm-2.25.2/daemon/gdm-slave-proxy.c.append-logs gdm-2.25.2/daemon/gdm-slave-proxy.c
--- gdm-2.25.2/daemon/gdm-slave-proxy.c.append-logs 2009-01-22 10:44:33.915495761 -0500
+++ gdm-2.25.2/daemon/gdm-slave-proxy.c 2009-01-22 10:44:41.753495939 -0500
@@ -139,7 +139,7 @@ spawn_child_setup (SpawnChildData *data)
rotate_logs (data->log_file, MAX_LOGS);
VE_IGNORE_EINTR (g_unlink (data->log_file));
- VE_IGNORE_EINTR (logfd = open (data->log_file, O_CREAT|O_TRUNC|O_WRONLY|O_EXCL, 0644));
+ VE_IGNORE_EINTR (logfd = open (data->log_file, O_CREAT|O_APPEND|O_TRUNC|O_WRONLY|O_EXCL, 0644));
if (logfd != -1) {
VE_IGNORE_EINTR (dup2 (logfd, 1));
diff -up gdm-2.25.2/daemon/gdm-welcome-session.c.append-logs gdm-2.25.2/daemon/gdm-welcome-session.c
--- gdm-2.25.2/daemon/gdm-welcome-session.c.append-logs 2009-01-22 10:44:05.300495464 -0500
+++ gdm-2.25.2/daemon/gdm-welcome-session.c 2009-01-22 10:44:14.903494653 -0500
@@ -482,7 +482,7 @@ spawn_child_setup (SpawnChildData *data)
rotate_logs (data->log_file, MAX_LOGS);
VE_IGNORE_EINTR (g_unlink (data->log_file));
- VE_IGNORE_EINTR (logfd = open (data->log_file, O_CREAT|O_TRUNC|O_WRONLY|O_EXCL, 0644));
+ VE_IGNORE_EINTR (logfd = open (data->log_file, O_CREAT|O_APPEND|O_TRUNC|O_WRONLY|O_EXCL, 0644));
if (logfd != -1) {
VE_IGNORE_EINTR (dup2 (logfd, 1));

View File

@ -1,229 +0,0 @@
commit c8ff53ab9bd73dd6f752afbf7f7d541ec5e4514e
Author: Ray Strode <rstrode@redhat.com>
Date: Sat Mar 14 22:11:10 2009 -0400
Make GetX11Cookie dbus method work
We were trying to send a binary blob as a utf-8 string.
Now we use an ugly GArray.
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 323d941..671857a 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -416,19 +416,16 @@ gdm_display_remove_user_authorization (GdmDisplay *display,
gboolean
gdm_display_get_x11_cookie (GdmDisplay *display,
- char **x11_cookie,
- gsize *x11_cookie_size,
+ GArray **x11_cookie,
GError **error)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
if (x11_cookie != NULL) {
- *x11_cookie = g_memdup (display->priv->x11_cookie,
- display->priv->x11_cookie_size);
- }
-
- if (x11_cookie_size != NULL) {
- *x11_cookie_size = display->priv->x11_cookie_size;
+ *x11_cookie = g_array_new (FALSE, FALSE, sizeof (char));
+ g_array_append_vals (*x11_cookie,
+ display->priv->x11_cookie,
+ display->priv->x11_cookie_size);
}
return TRUE;
diff --git a/daemon/gdm-display.h b/daemon/gdm-display.h
index 2914c81..607ea1d 100644
--- a/daemon/gdm-display.h
+++ b/daemon/gdm-display.h
@@ -125,8 +125,7 @@ gboolean gdm_display_get_timed_login_details (GdmDisplay *disp
/* exported but protected */
gboolean gdm_display_get_x11_cookie (GdmDisplay *display,
- char **x11_cookie,
- gsize *cookie_size,
+ GArray **x11_cookie,
GError **error);
gboolean gdm_display_get_x11_authority_file (GdmDisplay *display,
char **filename,
diff --git a/daemon/gdm-display.xml b/daemon/gdm-display.xml
index e8a2369..a92e37f 100644
--- a/daemon/gdm-display.xml
+++ b/daemon/gdm-display.xml
@@ -11,7 +11,7 @@
<arg name="name" direction="out" type="i"/>
</method>
<method name="GetX11Cookie">
- <arg name="x11_cookie" direction="out" type="s"/>
+ <arg name="x11_cookie" direction="out" type="ay"/>
</method>
<method name="GetX11AuthorityFile">
<arg name="filename" direction="out" type="s"/>
diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c
index 58cdf59..b12b726 100644
--- a/daemon/gdm-xdmcp-display-factory.c
+++ b/daemon/gdm-xdmcp-display-factory.c
@@ -2277,19 +2277,17 @@ gdm_xdmcp_handle_request (GdmXdmcpDisplayFactory *factory,
ARRAY8 authorization_name;
ARRAY8 authorization_data;
gint32 session_number;
- char *cookie;
- gsize cookie_size;
+ GArray *cookie;
char *name;
- gdm_display_get_x11_cookie (display, &cookie,
- &cookie_size, NULL);
+ gdm_display_get_x11_cookie (display, &cookie, NULL);
gdm_display_get_x11_display_name (display, &name, NULL);
g_debug ("GdmXdmcpDisplayFactory: Sending authorization key for display %s", name);
g_free (name);
- g_debug ("GdmXdmcpDisplayFactory: cookie len %d", (int) cookie_size);
+ g_debug ("GdmXdmcpDisplayFactory: cookie len %d", (int) cookie->len);
session_number = gdm_xdmcp_display_get_session_number (GDM_XDMCP_DISPLAY (display));
@@ -2304,8 +2302,10 @@ gdm_xdmcp_handle_request (GdmXdmcpDisplayFactory *factory,
authorization_name.data = (CARD8 *) "MIT-MAGIC-COOKIE-1";
authorization_name.length = strlen ((char *) authorization_name.data);
- authorization_data.data = (CARD8 *) cookie;
- authorization_data.length = cookie_size;
+ authorization_data.data = (CARD8 *) cookie->data;
+ authorization_data.length = cookie->len;
+
+ g_array_free (cookie, TRUE);
/* the addrs are NOT copied */
gdm_xdmcp_send_accept (factory,
commit 8d141425bed92140b866c1a83e460aa74d97760f
Author: Ray Strode <rstrode@redhat.com>
Date: Sat Mar 14 22:11:58 2009 -0400
Don't make slave and greeter display authorization dependent on hostname
The hostname can get changed out from under us at any
point, so we need to give the slave (and its helpers)
and the greeter access to the display based solely on the
X11 cookie, without any hostname constraints.
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 19432dc..a241f73 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -89,6 +89,8 @@ struct GdmSlavePrivate
char *parent_display_name;
char *parent_display_x11_authority_file;
+ GArray *display_x11_cookie;
+
DBusGProxy *display_proxy;
DBusGConnection *connection;
};
@@ -449,6 +451,12 @@ gdm_slave_connect_to_x11_display (GdmSlave *slave)
sigaddset (&mask, SIGCHLD);
sigprocmask (SIG_BLOCK, &mask, &omask);
+ /* Give slave access to the display independent of current hostname */
+ XSetAuthorization ("MIT-MAGIC-COOKIE-1",
+ strlen ("MIT-MAGIC-COOKIE-1"),
+ slave->priv->display_x11_cookie->data,
+ slave->priv->display_x11_cookie->len);
+
slave->priv->server_display = XOpenDisplay (slave->priv->display_name);
sigprocmask (SIG_SETMASK, &omask, NULL);
@@ -458,8 +466,35 @@ gdm_slave_connect_to_x11_display (GdmSlave *slave)
g_warning ("Unable to connect to display %s", slave->priv->display_name);
ret = FALSE;
} else {
+ XHostAddress host_entries[2] = {
+ { FamilyServerInterpreted },
+ { FamilyServerInterpreted }
+ };
+ XServerInterpretedAddress si_entries[2];
+
g_debug ("GdmSlave: Connected to display %s", slave->priv->display_name);
ret = TRUE;
+
+ /* Give programs run by the slave and greeter access to the display
+ * independent of current hostname
+ */
+ si_entries[0].type = "localuser";
+ si_entries[0].typelength = strlen ("localuser");
+ si_entries[1].type = "localuser";
+ si_entries[1].typelength = strlen ("localuser");
+
+ si_entries[0].value = "root";
+ si_entries[0].valuelength = strlen ("root");
+ si_entries[1].value = GDM_USERNAME;
+ si_entries[1].valuelength = strlen (GDM_USERNAME);
+
+ host_entries[0].address = (char *) &si_entries[0];
+ host_entries[0].length = sizeof (XServerInterpretedAddress);
+ host_entries[1].address = (char *) &si_entries[1];
+ host_entries[1].length = sizeof (XServerInterpretedAddress);
+
+ XAddHosts (slave->priv->server_display, host_entries,
+ G_N_ELEMENTS (host_entries));
}
return ret;
@@ -639,6 +674,25 @@ gdm_slave_real_start (GdmSlave *slave)
error = NULL;
res = dbus_g_proxy_call (slave->priv->display_proxy,
+ "GetX11Cookie",
+ &error,
+ G_TYPE_INVALID,
+ dbus_g_type_get_collection ("GArray", G_TYPE_CHAR),
+ &slave->priv->display_x11_cookie,
+ G_TYPE_INVALID);
+ if (! res) {
+ if (error != NULL) {
+ g_warning ("Failed to get value: %s", error->message);
+ g_error_free (error);
+ } else {
+ g_warning ("Failed to get value");
+ }
+
+ return FALSE;
+ }
+
+ error = NULL;
+ res = dbus_g_proxy_call (slave->priv->display_proxy,
"GetX11AuthorityFile",
&error,
G_TYPE_INVALID,
@@ -1475,6 +1529,7 @@ gdm_slave_finalize (GObject *object)
g_free (slave->priv->display_x11_authority_file);
g_free (slave->priv->parent_display_name);
g_free (slave->priv->parent_display_x11_authority_file);
+ g_array_free (slave->priv->display_x11_cookie, TRUE);
G_OBJECT_CLASS (gdm_slave_parent_class)->finalize (object);
}
--- a/daemon/gdm-display-access-file.c (revision 6790)
+++ b/daemon/gdm-display-access-file.c (working copy)
@@ -438,8 +438,13 @@ _get_auth_info_for_display (GdmDisplayAc
gdm_display_is_local (display, &is_local, NULL);
if (is_local) {
+ char localhost[HOST_NAME_MAX + 1] = "";
*family = FamilyLocal;
- *address = g_strdup (g_get_host_name ());
+ if (gethostname (localhost, HOST_NAME_MAX) == 0) {
+ *address = g_strdup (localhost);
+ } else {
+ *address = g_strdup ("localhost");
+ }
} else {
*family = FamilyWild;
gdm_display_get_remote_hostname (display, address, NULL);

View File

@ -1,27 +0,0 @@
diff -up gdm-2.25.2/gui/simple-greeter/gdm-chooser-widget.c.maybe-work-around-gcc-bug gdm-2.25.2/gui/simple-greeter/gdm-chooser-widget.c
--- gdm-2.25.2/gui/simple-greeter/gdm-chooser-widget.c.maybe-work-around-gcc-bug 2009-03-12 15:19:51.102176587 -0400
+++ gdm-2.25.2/gui/simple-greeter/gdm-chooser-widget.c 2009-03-12 15:20:57.411172890 -0400
@@ -2311,6 +2311,7 @@ stop_timer (GdmChooserWidget *widget,
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
+ volatile double zero = 0.0;
model = GTK_TREE_MODEL (widget->priv->list_store);
@@ -2320,12 +2321,12 @@ stop_timer (GdmChooserWidget *widget,
gtk_list_store_set (widget->priv->list_store, &iter,
CHOOSER_TIMER_START_TIME_COLUMN,
- 0.0, -1);
+ zero, -1);
gtk_list_store_set (widget->priv->list_store, &iter,
CHOOSER_TIMER_DURATION_COLUMN,
- 0.0, -1);
+ zero, -1);
gtk_list_store_set (widget->priv->list_store, &iter,
- CHOOSER_TIMER_VALUE_COLUMN, 0.0, -1);
+ CHOOSER_TIMER_VALUE_COLUMN, zero, -1);
widget->priv->number_of_active_timers--;
if (widget->priv->number_of_active_timers == 0) {

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
diff -up gdm-2.25.2/data/greeter-autostart/gnome-power-manager.desktop.in.in.start-faster gdm-2.25.2/data/greeter-autostart/gnome-power-manager.desktop.in
--- gdm-2.25.2/data/greeter-autostart/gnome-power-manager.desktop.in.in.start-faster 2009-03-03 17:16:56.209495297 -0500
+++ gdm-2.25.2/data/greeter-autostart/gnome-power-manager.desktop.in.in 2009-03-03 17:17:07.493469010 -0500
@@ -8,7 +8,6 @@ Terminal=false
Type=Application
Categories=
OnlyShowIn=GNOME;XFCE;
-X-GNOME-Autostart-Phase=Initialization
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-power-manager
X-GNOME-Bugzilla-Component=gnome-power-manager

View File

@ -1,44 +0,0 @@
--- a/daemon/gdm-display-access-file.c (revision 6783)
+++ b/daemon/gdm-display-access-file.c (working copy)
@@ -220,6 +220,31 @@ _get_uid_and_gid_for_user (const char *u
return TRUE;
}
+static void
+clean_up_stale_auth_subdirs (void)
+{
+ GDir *dir;
+ const char *filename;
+
+ dir = g_dir_open (GDM_XAUTH_DIR, 0, NULL);
+
+ if (dir == NULL) {
+ return;
+ }
+
+ while ((filename = g_dir_read_name (dir)) != NULL) {
+ char *path;
+
+ path = g_build_filename (GDM_XAUTH_DIR, filename, NULL);
+
+ /* Will only succeed if the directory is empty
+ */
+ g_rmdir (path);
+ g_free (path);
+ }
+ g_dir_close (dir);
+}
+
static FILE *
_create_xauth_file_for_user (const char *username,
char **filename,
@@ -262,6 +287,9 @@ _create_xauth_file_for_user (const char
} else {
/* if it does exist make sure it has correct mode 01775 */
g_chmod (GDM_XAUTH_DIR, S_ISVTX | S_IRWXU |S_IRWXG | S_IROTH | S_IXOTH);
+
+ /* and clean up any stale auth subdirs */
+ clean_up_stale_auth_subdirs ();
}
if (!_get_uid_and_gid_for_user (username, &uid, &gid)) {

View File

@ -1,38 +0,0 @@
Index: daemon/gdm-session-worker.c
===================================================================
--- a/daemon/gdm-session-worker.c (revision 6793)
+++ b/daemon/gdm-session-worker.c (working copy)
@@ -637,16 +637,6 @@ gdm_session_worker_update_username (GdmS
gdm_session_auditor_set_username (worker->priv->auditor, worker->priv->username);
- /* We have a new username to try. If we haven't been able to
- * read user settings up until now, then give it a go now
- * (see the comment in do_setup for rationale on why it's useful
- * to keep trying to read settings)
- */
- if (username != NULL &&
- !gdm_session_settings_is_loaded (worker->priv->user_settings)) {
- attempt_to_load_user_settings (worker, username);
- }
-
if ((worker->priv->username == username) ||
((worker->priv->username != NULL) && (username != NULL) &&
(strcmp (worker->priv->username, username) == 0)))
@@ -661,6 +651,16 @@ gdm_session_worker_update_username (GdmS
send_dbus_string_method (worker->priv->connection,
"UsernameChanged",
worker->priv->username);
+
+ /* We have a new username to try. If we haven't been able to
+ * read user settings up until now, then give it a go now
+ * (see the comment in do_setup for rationale on why it's useful
+ * to keep trying to read settings)
+ */
+ if (worker->priv->username != NULL &&
+ !gdm_session_settings_is_loaded (worker->priv->user_settings)) {
+ attempt_to_load_user_settings (worker, worker->priv->username);
+ }
}
out:

View File

@ -15,8 +15,8 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.26.0
Release: 8%{?dist}
Version: 2.26.1
Release: 1%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@ -91,20 +91,11 @@ Provides: service(graphical-login)
Requires: audit-libs >= %{libauditver}
Patch2: gdm-2.26.0-force-active-vt.patch
Patch3: gdm-2.23.92-save-root-window.patch
Patch4: gdm-2.25.2-append-logs.patch
# uses /etc/sysconfig/keyboard and is thus not directly upstreamable
# should probably be changed to get the system layout from the X server
Patch13: gdm-system-keyboard.patch
Patch15: gdm-2.25.2-start-faster.patch
Patch16: gdm-2.25.2-dont-depend-on-hostname.patch
# http://bugzilla.redhat.com/show_bug.cgi?id=485974
Patch17: gdm-2.26.0-clean-up-auth-entries.patch
Patch18: gdm-2.26.0-load-settings-for-other-user.patch
Patch19: gdm-2.26.0-multistack.patch
# Fedora-specific
@ -145,13 +136,8 @@ The GDM fingerprint plugin provides functionality necessary to use a fingerprint
%setup -q
%patch2 -p1 -b .force-active-vt
%patch3 -p1 -b .save-root-window
%patch4 -p1 -b .append-logs
%patch13 -p1 -b .system-keyboard
%patch15 -p1 -b .start-faster
%patch16 -p1 -b .dont-depend-on-hostname
%patch17 -p1 -b .clean-up-auth-entries
%patch18 -p1 -b .load-settings-for-other-user
%patch19 -p1 -b .multistack
%patch99 -p1 -b .fedora-logo
@ -394,6 +380,9 @@ fi
%{_libdir}/gdm/simple-greeter/plugins/fingerprint.so
%changelog
* Tue Apr 14 2009 Ray Strode <rstrode@redhat.com> - 1:2.26.1-1
- Update to 2.26.1
* Mon Apr 13 2009 Ray Strode <rstrode@redhat.com> - 1:2.26.0-8
- Add less boring multistack patch for testing

View File

@ -1,14 +0,0 @@
diff -up gdm-2.21.10/data/PreSession.in.xkb-groups gdm-2.21.10/data/PreSession.in
--- gdm-2.21.10/data/PreSession.in.xkb-groups 2008-04-10 16:55:23.000000000 -0400
+++ gdm-2.21.10/data/PreSession.in 2008-04-10 16:57:09.000000000 -0400
@@ -79,6 +79,10 @@ if [ "x$SESSREG" != "x" ] ; then
# this is not reached
fi
+# Workaround for an X problem where the initial XKB configuration has
+# and extra group without an associated layout.
+setxkbmap
+
# some output for easy debugging
echo "$0: could not find the sessreg utility, cannot update wtmp and utmp"
exit 0