Hello community,

here is the log from the commit of package gdm for openSUSE:Factory checked in 
at 2018-03-14 19:33:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gdm (Old)
 and      /work/SRC/openSUSE:Factory/.gdm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gdm"

Wed Mar 14 19:33:25 2018 rev:206 rq:586754 version:3.28.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/gdm/gdm.changes  2018-03-05 13:33:13.989984602 
+0100
+++ /work/SRC/openSUSE:Factory/.gdm.new/gdm.changes     2018-03-14 
19:33:25.409166728 +0100
@@ -1,0 +2,98 @@
+Wed Mar 14 01:59:30 CET 2018 - h...@suse.com
+
+- Add gdm-xwayland-xauth.patch (bsc#1084737): Creates an Xauthority
+  file and exports XAUTHORITY for Xwayland.
+
+-------------------------------------------------------------------
+Tue Mar 13 14:29:24 UTC 2018 - dims...@opensuse.org
+
+- Update to version 3.28.0:
+  + Updated translations.
+
+-------------------------------------------------------------------
+Mon Mar 12 04:46:37 UTC 2018 - yfji...@suse.com
+
+- Add gdm-disable-wayland-on-mgag200-chipsets.patch: by falling
+  back GNOME to X, the patch targets to provide a better user
+  experiences for servers with mgag200 graphic chips, which suffer
+  the sluggish keyboard/mouse issues running GNOME on wayland
+  (bsc#1073550  bsc#1077802). Some of the servers could not
+  initiate GNOME in a similar context (bsc#1070933).
+
+  With the complexity of the problem, Wayland probably needs
+  further track to get the specific hardware adapted. At the
+  same time the issue itself is tracked in upstream
+  (glgo#GNOME/mutter/issues/59), the better way for now to make
+  SLE-15 working smoothly is to disable the chipset on Wayland
+  (bsc#1083609, bgo#794106).
+
+  In addition, the patch updates the comments section in
+  data/61-gdm.rules to make the context easier to append.
+
+-------------------------------------------------------------------
+Wed Mar  7 16:44:02 UTC 2018 - dims...@opensuse.org
+
+- Update to version 3.27.92:
+  + Updated translations.
+
+-------------------------------------------------------------------
+Thu Mar  2 16:26:00 UTC 2018 - dims...@opensuse.org
+
+- Modernize spec-file by calling spec-cleaner
+
+-------------------------------------------------------------------
+Thu Mar  2 03:27:51 UTC 2018 - dims...@opensuse.org
+
+- Update to version 3.27.91:
+  + Ensure default session for user gets reported to login screen
+    up front.
+  + Updated translations.
+- Drop
+  gdm-Revert-session-don-t-call-gdm_session_defaults_chang.patch:
+  fixed upstream.
+
+-------------------------------------------------------------------
+Thu Mar  2 03:27:50 UTC 2018 - luc1...@linuxmail.org
+
+- Update to version 3.27.90:
+  + Add support for configuration from /run.
+  + Add udev rule to disable wayland with cirrus.
+  + Remove obsolete stuff about Xnest from configure.
+  + Adjust for g-s-d plugin removal.
+  + Segfault fix in error condition for session wrappers.
+  + Misc warning fixes.
+  + Updated translations.
+- Drop gdm-disable-wayland-on-unsupported-chipsets.patch: fixed
+  upstream.
+
+-------------------------------------------------------------------
+Thu Mar  2 03:27:04 UTC 2018 - dims...@opensuse.org
+
+- Update to version 3.27.4:
+  + Fix for invalid DISPLAY/XAUTHORITY in session scripts.
+  + Fix for keyring integration on multidisk systems.
+  + Set GROUP environment variable.
+  + Deprecation fixes.
+  + Updated translations.
+- Drop gdm-not-run-with-bogus-DISPLAY-XAUTHORITY.patch and
+  gdm-nb-translations.patch: fixed upstream.
+- Drop gdm-passwordless-login.patch: This patch has been disabled
+  since GDM 3.5.4 (July 2012).
+- Drop: gdm-workaround-boo971852.patch: patch has been disabled
+  since May 2016.
+
+-------------------------------------------------------------------
+Thu Mar  2 03:27:03 UTC 2018 - luc1...@linuxmail.org
+
+- Update to version 3.27.3:
+  + Don't call gdm_session_defaults_changed from setup.
+- Adopt the use of %make_build macro rather than raw make command,
+  following the best practices.
+- Remove obsolete %clean section as RPM already do this kind of
+  work itself.
+- Update typelib-1_0-Gdm-1_0 package's summary to make it shorter
+  but still meaningful.
+- Update gdmflexiserver package's summary to avoid redundancies and
+  correct name case in the description.
+
+-------------------------------------------------------------------

Old:
----
  gdm-3.26.2.1.tar.xz
  gdm-Revert-session-don-t-call-gdm_session_defaults_chang.patch
  gdm-disable-wayland-on-unsupported-chipsets.patch
  gdm-nb-translations.patch
  gdm-not-run-with-bogus-DISPLAY-XAUTHORITY.patch
  gdm-passwordless-login.patch
  gdm-workaround-boo971852.patch

New:
----
  gdm-3.28.0.tar.xz
  gdm-disable-wayland-on-mgag200-chipsets.patch
  gdm-xwayland-xauth.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gdm.spec ++++++
--- /var/tmp/diff_new_pack.eCdTor/_old  2018-03-14 19:33:26.609124111 +0100
+++ /var/tmp/diff_new_pack.eCdTor/_new  2018-03-14 19:33:26.613123969 +0100
@@ -16,46 +16,37 @@
 #
 
 
-# Allow to disable wayland components
-%bcond_without wayland
-
 %define systemdsystemunitdir %(pkg-config --variable=systemdsystemunitdir 
systemd)
-
 # FIXME: need to check what should be done to enable this (at least adapt the 
pam files). See bnc#699999
 %define enable_split_authentication 0
-
+# Allow to disable wayland components
+%bcond_without wayland
 Name:           gdm
-Version:        3.26.2.1
+Version:        3.28.0
 Release:        0
 Summary:        The GNOME Display Manager
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          System/GUI/GNOME
-Url:            https://wiki.gnome.org/Projects/GDM
-Source:         
https://download.gnome.org/sources/gdm/3.26/%{name}-%{version}.tar.xz
+URL:            https://wiki.gnome.org/Projects/GDM
+Source:         
http://download.gnome.org/sources/gdm/3.28/%{name}-%{version}.tar.xz
 Source1:        gdm.pamd
 Source2:        gdm-autologin.pamd
 Source3:        gdm-launch-environment.pamd
-Source6:        gdm-fingerprint.pamd
-Source7:        gdm-smartcard.pamd
+Source4:        gdm-fingerprint.pamd
+Source5:        gdm-smartcard.pamd
 # gdmflexiserver wrapper, to enable other display managers to abuse the 
gdmflexiserver namespace (like lightdm)
-Source4:        gdmflexiserver-wrapper
+Source6:        gdmflexiserver-wrapper
 # /etc/xinit.d/xdm integration script
-Source5:        X11-displaymanager-gdm
+Source7:        X11-displaymanager-gdm
 # GDM does not boostrap using gnome-autogen.sh, but has it's own bootstrap 
script
 Source8:        autogen.sh
-# PATCH-FEATURE-OPENSUSE gdm-workaround-boo971852.patch zai...@opensuse.org -- 
Work around boo971852 - xsessions is just not going to happen for a gdm user - 
Those users ALL have gnome-shell installed (which is mandatory for gdm to 
operate) - openSUSE only
-Patch0:         gdm-workaround-boo971852.patch
-# PATCH-FIX-UPSTREAM gdm-nb-translations.patch zai...@opensuse.org -- Update 
Norwegian Bokmål translations.
-Patch1:         gdm-nb-translations.patch
-# PATCH-FIX-UPSTREAM gdm-disable-wayland-on-unsupported-chipsets.patch 
boo#1059356 bgo#789081 fezh...@suse.com -- Disable Wayland on Cirrus chipsets
-Patch2:         gdm-disable-wayland-on-unsupported-chipsets.patch
+# PATCH-FIX-UPSTREAM gdm-disable-wayland-on-mgag200-chipsets.patch bgo#794106 
bsc#1083609 yfji...@suse.com -- Disable Wayland on mgag200 chipsets
+Patch1:         gdm-disable-wayland-on-mgag200-chipsets.patch
 # WARNING: do not remove/significantly change patch3 without updating the 
relevant patch in accountsservice too
 # PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 bsc#919723 
h...@novell.com -- Read autologin options from /etc/sysconfig/displaymanager; 
note that accountsservice has a similar patch (accountsservice-sysconfig.patch)
 Patch3:         gdm-sysconfig-settings.patch
 # PATCH-FIX-OPENSUSE gdm-suse-xsession.patch vu...@novell.com -- Use the 
/etc/X11/xdm/* scripts
 Patch7:         gdm-suse-xsession.patch
-# PATCH-NEEDS-REBASE PATCH-FEATURE-OPENSUSE gdm-passwordless-login.patch 
vu...@opensuse.org -- Support DISPLAYMANAGER_PASSWORD_LESS_LOGIN sysconfig 
option
-Patch9:         gdm-passwordless-login.patch
 # PATCH-FIX-OPENSUSE gdm-default-wm.patch vu...@novell.com -- Use sysconfig to 
know to which desktop to use by default
 Patch34:        gdm-default-wm.patch
 # PATCH-FIX-OPENSUSE gdm-xauthlocalhostname.patch bnc#538064 vu...@novell.com 
-- Set XAUTHLOCALHOSTNAME to current hostname when we authenticate, for local 
logins, to avoid issues in the session in case the hostname changes later one. 
See comment 24 in the bug.
@@ -66,29 +57,25 @@
 Patch41:        gdm-plymouth-vt1.patch
 # PATCH-FIX-UPSTREAM gdm-fails-to-restart-gnome-shell.patch bsc#981976 
bgo#769969 ty...@suse.com -- Gdm should stop after a few times fails
 Patch42:        gdm-fails-to-restart-gnome-shell.patch
-# PATCH-FIX-UPSTREAM gdm-not-run-with-bogus-DISPLAY-XAUTHORITY.patch 
bsc#1068016 bgo#792150 xw...@suse.com -- When run PreSession script, don't set 
DISPLAY and XAUTHORITY environment variable
-Patch43:        gdm-not-run-with-bogus-DISPLAY-XAUTHORITY.patch
-# PATCH-FIX-SLE gdm-disable-gnome-initial-setup.patch bnc#1067976 
qz...@suse.com -- Disable gnome-initial-setup runs before gdm, g-i-s will only 
serve for CJK people to choose the input-method after login.
-Patch52:        gdm-disable-gnome-initial-setup.patch
 # PATCH-FIX-UPSTREAM 
gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch bnc#1075805 
bgo#793255 m...@suse.com -- Add runtime option to start X under root instead of 
regular user. Necessary if no DRI drivers are present.
-Patch53:        gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch
-# PATCH-FIX-UPSTREAM 
gdm-Revert-session-don-t-call-gdm_session_defaults_chang.patch bsc#1082958 
bgo#793609 xw...@suse.com -- Show right active session of user in login dialog.
-Patch54:        gdm-Revert-session-don-t-call-gdm_session_defaults_chang.patch
+Patch43:        gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch
+# PATCH-FIX-OPENSUSE gdm-xwayland-xauth.patch h...@suse.com bsc#1084737 -- 
Create Xauthority file and export XAUTHORITY for Xwayland
+Patch44:        gdm-xwayland-xauth.patch
+### NOTE: Keep please SLE-only patches at bottom (starting on 1000).
+# PATCH-FIX-SLE gdm-disable-gnome-initial-setup.patch bnc#1067976 
qz...@suse.com -- Disable gnome-initial-setup runs before gdm, g-i-s will only 
serve for CJK people to choose the input-method after login.
+Patch1002:      gdm-disable-gnome-initial-setup.patch
 BuildRequires:  check-devel
 # needed for directory ownership
 BuildRequires:  dconf
-BuildRequires:  gnome-common
 # needed for directory ownership
 BuildRequires:  fdupes
+BuildRequires:  gnome-common
 BuildRequires:  gnome-session-core
 BuildRequires:  keyutils-devel
 BuildRequires:  pam-devel
 BuildRequires:  pkgconfig
 BuildRequires:  pwdutils
 BuildRequires:  tcpd-devel
-%if !0%{?is_opensuse}
-BuildRequires:  translation-update-upstream
-%endif
 BuildRequires:  update-desktop-files
 BuildRequires:  xorg-x11-server
 BuildRequires:  xorg-x11-server-extra
@@ -111,28 +98,32 @@
 BuildRequires:  pkgconfig(xdmcp)
 BuildRequires:  pkgconfig(xi)
 BuildRequires:  pkgconfig(xinerama)
-%ifnarch s390 s390x
-BuildRequires:  pkgconfig(xorg-server)
-%endif
 BuildRequires:  pkgconfig(xrandr)
-Requires(pre):  group(video)
 Requires:       %{name}-branding = %{version}
 Requires:       gdmflexiserver
 Requires:       gnome-session-core
 Requires:       gnome-settings-daemon
 Requires:       gnome-shell
-Requires(post): dconf
-# accessibility
-Recommends:     orca
+# FIXME: use proper Requires(pre/post/preun/...)
 # For groupadd, useradd, usermod
 PreReq:         pwdutils
+Requires(post): dconf
+Requires(pre):  group(video)
 Recommends:     %{name}-lang
 Recommends:     iso-codes
+# accessibility
+Recommends:     orca
 Provides:       gdm2 = %{version}
 Obsoletes:      gdm2 < %{version}
 Provides:       gnome-applets-gdm = %{version}
 Obsoletes:      gnome-applets-gdm < %{version}
 DocDir:         %{_defaultdocdir}
+%if !0%{?is_opensuse}
+BuildRequires:  translation-update-upstream
+%endif
+%ifnarch s390 s390x
+BuildRequires:  pkgconfig(xorg-server)
+%endif
 
 %description
 The GNOME Display Manager is a system service that is responsible for
@@ -172,9 +163,9 @@
 Summary:        The GNOME Display Manager -- Upstream default configuration
 Group:          System/GUI/GNOME
 Requires:       %{name} = %{version}
-Provides:       %{name}-branding = %{version}
-Conflicts:      otherproviders(%{name}-branding)
 Supplements:    packageand(%{name}:branding-upstream)
+Conflicts:      %{name}-branding
+Provides:       %{name}-branding = %{version}
 BuildArch:      noarch
 #BRAND: Provide one file:
 #BRAND: /etc/gdm/custom.conf
@@ -193,38 +184,30 @@
 BuildArch:      noarch
 
 %description -n gdmflexiserver
-The gdmflexiserver tool interacts with the display manager to
+The GDMFlexiServer tool interacts with the display manager to
 enable fast user switching. This package contains a wrapper that
-selects the correct gdmflexiserver implementatoin, based on the
+selects the correct Gdmflexiserver implementation, based on the
 running display manager.
 
 %lang_package
+
 %prep
 %setup -q
-cp %{S:8} .
-%if !0%{?is_opensuse}
-translation-update-upstream
-%endif
-%if 0%{?is_opensuse}
-# Disabled for now, see boo#981372 and boo#971852
-#patch0 -p1
-%endif
+cp %{SOURCE8} .
 %patch1 -p1
-%patch2 -p1
 %patch3 -p1
 %patch7 -p1
-%patch9 -p1
 %patch34 -p1
 %patch35 -p1
 %patch36 -p1
 %patch41 -p1
 %patch42 -p1
 %patch43 -p1
+%patch44 -p1
+# SLE-only patches start at 1000
 %if !0%{?is_opensuse}
-%patch52 -p1
+%patch1002 -p1
 %endif
-%patch53 -p1
-%patch54 -p1
 
 %build
 NOCONFIGURE=1 sh autogen.sh
@@ -257,42 +240,42 @@
 %endif
         --with-initial-vt=7 \
         --with-run-dir=/run/gdm
-%__make %{?jobs:-j%jobs} V=1
+%make_build V=1
 
 %install
 %make_install
-find %{buildroot} -name '*.la' -type f -delete -print
+find %{buildroot} -type f -name "*.la" -delete -print
 # Do not ship the systemd.service file: openSUSE uses xdm, which enables the 
DM based on sysconfig.
 rm %{buildroot}%{systemdsystemunitdir}/gdm.service
 ## Install PAM files.
-mkdir -p %{buildroot}/etc/pam.d
+mkdir -p %{buildroot}%{_sysconfdir}/pam.d
 # Generic pam config
-cp %{SOURCE1} %{buildroot}/etc/pam.d/gdm
+cp %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/gdm
 # Pam config for autologin
-cp %{SOURCE2} %{buildroot}/etc/pam.d/gdm-autologin
+cp %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/gdm-autologin
 # Pam config for the greeter session
-cp %{SOURCE3} %{buildroot}/etc/pam.d/gdm-launch-environment
+cp %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/gdm-launch-environment
 %if %{enable_split_authentication}
 # Pam config for fingerprint authentication
-cp %{SOURCE6} %{buildroot}/etc/pam.d/gdm-fingerprint
+cp %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/gdm-fingerprint
 # Pam config for smartcard authentication
-cp %{SOURCE7} %{buildroot}/etc/pam.d/gdm-smartcard
+cp %{SOURCE5} %{buildroot}%{_sysconfdir}/pam.d/gdm-smartcard
 %endif
 # The default gdm pam configuration is the one to be used as pam-password too
 %if %{enable_split_authentication}
-rm %{buildroot}/etc/pam.d/gdm-password
+rm %{buildroot}%{_sysconfdir}/pam.d/gdm-password
 echo "We are not ready for this, we need to know what to put in 
gdm-fingerprint and gdm-smartcard pam config files."
 false
 %endif
-ln -s gdm %{buildroot}/etc/pam.d/gdm-password
+ln -s gdm %{buildroot}%{_sysconfdir}/pam.d/gdm-password
 ## Install other files
 # Install PostLogin script.
 mv %{buildroot}%{_sysconfdir}/gdm/PostLogin/Default.sample 
%{buildroot}%{_sysconfdir}/gdm/PostLogin/Default
 # Move gdmflexiserver to libexecdir and replace it with the compatibility 
wrapper
 mv %{buildroot}%{_bindir}/gdmflexiserver 
%{buildroot}%{_libexecdir}/gdm/gdmflexiserver
-install -m 755 %{SOURCE4} %{buildroot}%{_bindir}/gdmflexiserver
+install -m 755 %{SOURCE6} %{buildroot}%{_bindir}/gdmflexiserver
 #Install /etc/xinit.d/xdm integration script
-install -D -m 644 %{SOURCE5} %{buildroot}%{_libexecdir}/X11/displaymanagers/gdm
+install -D -m 644 %{SOURCE7} %{buildroot}%{_libexecdir}/X11/displaymanagers/gdm
 mkdir -p %{buildroot}%{_sysconfdir}/alternatives
 touch %{buildroot}%{_sysconfdir}/alternatives/default-displaymanager
 ln -s %{_sysconfdir}/alternatives/default-displaymanager 
%{buildroot}%{_libexecdir}/X11/displaymanagers/default-displaymanager
@@ -305,14 +288,11 @@
 %find_lang %{name} %{?no_lang_C}
 %fdupes -s %{buildroot}%{_datadir}/help
 
-%clean
-rm -rf %{buildroot}
-
 %pre
-/usr/sbin/groupadd -r gdm 2> /dev/null || :
-/usr/sbin/useradd -r -g gdm -G video -s /bin/false \
--c "Gnome Display Manager daemon" -d /var/lib/gdm gdm 2> /dev/null || :
-/usr/sbin/usermod -g gdm -G video -s /bin/false gdm 2> /dev/null
+%{_sbindir}/groupadd -r gdm 2> /dev/null || :
+%{_sbindir}/useradd -r -g gdm -G video -s /bin/false \
+-c "Gnome Display Manager daemon" -d %{_localstatedir}/lib/gdm gdm 2> 
/dev/null || :
+%{_sbindir}/usermod -g gdm -G video -s /bin/false gdm 2> /dev/null
 # Fix incorrect interpretation of DISPLAYMANAGER_PASSWORD_LESS_LOGIN (#307566).
 # Last done in SLED10&10.1, first fixed in 10.3.
 # Can be removed after SLES12:
@@ -329,10 +309,10 @@
 # Fix how DISPLAYMANAGER_PASSWORD_LESS_LOGIN is used. Before 11.4,
 # /etc/pam.d/gdm was changed to use pam_permit. We don't want this anymore.
 if test -f /sbin/conf.d/SuSEconfig.gdm; then
-    grep -q pam_permit.so /etc/pam.d/gdm
+    grep -q pam_permit.so %{_sysconfdir}/pam.d/gdm
     if test $? -eq 0; then
         # We'll just use the file from the new package
-        mv /etc/pam.d/gdm /etc/pam.d/gdm.rpmold
+        mv %{_sysconfdir}/pam.d/gdm %{_sysconfdir}/pam.d/gdm.rpmold
     fi
 fi
 
@@ -352,7 +332,8 @@
 %postun -n libgdm1 -p /sbin/ldconfig
 
 %files
-%doc AUTHORS COPYING ChangeLog NEWS README
+%license COPYING
+%doc AUTHORS ChangeLog NEWS README
 %doc %{_datadir}/help/C/%{name}/
 %dir %config %{_sysconfdir}/gdm
 %config %{_sysconfdir}/gdm/[IPXl]*
@@ -375,14 +356,14 @@
 %attr(711,root,gdm) %dir %{_localstatedir}/log/gdm
 %dir %{_localstatedir}/cache/gdm
 %ghost %attr(711,root,gdm) %dir /run/gdm
-%config /etc/pam.d/gdm
-%config /etc/pam.d/gdm-autologin
+%config %{_sysconfdir}/pam.d/gdm
+%config %{_sysconfdir}/pam.d/gdm-autologin
 %if %{enable_split_authentication}
-%config /etc/pam.d/gdm-fingerprint
-%config /etc/pam.d/gdm-smartcard
+%config %{_sysconfdir}/pam.d/gdm-fingerprint
+%config %{_sysconfdir}/pam.d/gdm-smartcard
 %endif
-%config /etc/pam.d/gdm-password
-%config /etc/pam.d/gdm-launch-environment
+%config %{_sysconfdir}/pam.d/gdm-password
+%config %{_sysconfdir}/pam.d/gdm-launch-environment
 %config %{_sysconfdir}/dbus-1/system.d/gdm.conf
 # /etc/xinit.d/xdm integration
 %dir %{_libexecdir}/X11/displaymanagers

++++++ gdm-3.26.2.1.tar.xz -> gdm-3.28.0.tar.xz ++++++
++++ 12765 lines of diff (skipped)

++++++ gdm-disable-wayland-on-mgag200-chipsets.patch ++++++
Index: gdm-3.28.0/data/61-gdm.rules
===================================================================
--- gdm-3.28.0.orig/data/61-gdm.rules
+++ gdm-3.28.0/data/61-gdm.rules
@@ -1,2 +1,14 @@
-# disable Wayland on Cirrus chipsets
+# Disable Wayland on specific chipsets
+
+# Cirrus Logic
 ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", 
ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", 
RUN+="/bin/sh -c '/bin/mkdir /run/gdm ; /usr/bin/printf 
\"[daemon]\nWaylandEnable=false\" >> /run/gdm/custom.conf'"
+
+# Matrox Electronics Systems Ltd. MGA G200 server engines
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0522", RUN+="/bin/sh -c '/bin/mkdir 
/run/gdm ; /usr/bin/printf \"[daemon]\nWaylandEnable=false\" >> 
/run/gdm/custom.conf'"
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0524", RUN+="/bin/sh -c '/bin/mkdir 
/run/gdm ; /usr/bin/printf \"[daemon]\nWaylandEnable=false\" >> 
/run/gdm/custom.conf'"
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0530", RUN+="/bin/sh -c '/bin/mkdir 
/run/gdm ; /usr/bin/printf \"[daemon]\nWaylandEnable=false\" >> 
/run/gdm/custom.conf'"
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0532", RUN+="/bin/sh -c '/bin/mkdir 
/run/gdm ; /usr/bin/printf \"[daemon]\nWaylandEnable=false\" >> 
/run/gdm/custom.conf'"
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0533", RUN+="/bin/sh -c '/bin/mkdir 
/run/gdm ; /usr/bin/printf \"[daemon]\nWaylandEnable=false\" >> 
/run/gdm/custom.conf'"
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0534", RUN+="/bin/sh -c '/bin/mkdir 
/run/gdm ; /usr/bin/printf \"[daemon]\nWaylandEnable=false\" >> 
/run/gdm/custom.conf'"
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0536", RUN+="/bin/sh -c '/bin/mkdir 
/run/gdm ; /usr/bin/printf \"[daemon]\nWaylandEnable=false\" >> 
/run/gdm/custom.conf'"
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0538", RUN+="/bin/sh -c '/bin/mkdir 
/run/gdm ; /usr/bin/printf \"[daemon]\nWaylandEnable=false\" >> 
/run/gdm/custom.conf'"
++++++ gdm-xwayland-xauth.patch ++++++
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 5e9eb5e..80cce87 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -147,11 +147,13 @@ nodist_gdm_session_worker_SOURCES =               \
        gdm-session-enum-types.h                \
        $(NULL)
 
+## We need XLIB_LIBS for Xauth.
 gdm_wayland_session_LDADD =            \
        $(top_builddir)/common/libgdmcommon.la  \
        $(GTK_LIBS)             \
        $(COMMON_LIBS)          \
        $(SYSTEMD_LIBS)         \
+       $(XLIB_LIBS)            \
        $(NULL)
 
 gdm_wayland_session_SOURCES =  \
diff --git a/daemon/gdm-wayland-session.c b/daemon/gdm-wayland-session.c
index b648e9d..bfadf9b 100644
--- a/daemon/gdm-wayland-session.c
+++ b/daemon/gdm-wayland-session.c
@@ -36,6 +36,8 @@
 
 #include <gio/gunixinputstream.h>
 
+#include <X11/Xauth.h>
+
 #define BUS_ADDRESS_FILENO (STDERR_FILENO + 1)
 
 typedef struct
@@ -47,6 +49,8 @@ typedef struct
         GDBusConnection *bus_connection;
         char            *bus_address;
 
+        char            *x_auth_file;
+
         char           **environment;
 
         GSubprocess  *session_subprocess;
@@ -58,6 +62,102 @@ typedef struct
         guint32       debug_enabled : 1;
 } State;
 
+static FILE *
+create_auth_file (char **filename)
+{
+        char *auth_dir = NULL;
+        char *auth_file = NULL;
+        int fd;
+        FILE *fp = NULL;
+
+        auth_dir = g_build_filename (g_get_user_runtime_dir (),
+                                     "gdm",
+                                     NULL);
+
+        g_mkdir_with_parents (auth_dir, 0711);
+        auth_file = g_build_filename (auth_dir, "Xauthority", NULL);
+        g_clear_pointer (&auth_dir, g_free);
+
+        fd = g_open (auth_file, O_RDWR | O_CREAT | O_TRUNC, 0700);
+
+        if (fd < 0) {
+                g_debug ("could not open %s to store auth cookie: %m",
+                         auth_file);
+                g_clear_pointer (&auth_file, g_free);
+                goto out;
+        }
+
+        fp = fdopen (fd, "w+");
+
+        if (fp == NULL) {
+                g_debug ("could not set up stream for auth cookie file: %m");
+                g_clear_pointer (&auth_file, g_free);
+                close (fd);
+                goto out;
+        }
+
+        *filename = auth_file;
+out:
+        return fp;
+}
+
+static char *
+prepare_auth_file (void)
+{
+        FILE     *fp = NULL;
+        char     *filename = NULL;
+        GError   *error = NULL;
+        gboolean  prepared = FALSE;
+        Xauth     auth_entry = { 0 };
+        char      localhost[HOST_NAME_MAX + 1] = "";
+
+        g_debug ("Preparing auth file for X server");
+
+        fp = create_auth_file (&filename);
+
+        if (fp == NULL) {
+                return NULL;
+        }
+
+        if (gethostname (localhost, HOST_NAME_MAX) < 0) {
+                strncpy (localhost, "localhost", sizeof (localhost) - 1);
+        }
+
+        auth_entry.family = FamilyLocal;
+        auth_entry.address = localhost;
+        auth_entry.address_length = strlen (auth_entry.address);
+        auth_entry.name = "MIT-MAGIC-COOKIE-1";
+        auth_entry.name_length = strlen (auth_entry.name);
+
+        auth_entry.data_length = 16;
+        auth_entry.data = gdm_generate_random_bytes (auth_entry.data_length, 
&error);
+
+        if (error != NULL) {
+                goto out;
+        }
+
+        if (!XauWriteAuth (fp, &auth_entry) || fflush (fp) == EOF) {
+                goto out;
+        }
+
+        auth_entry.family = FamilyWild;
+        if (!XauWriteAuth (fp, &auth_entry) || fflush (fp) == EOF) {
+                goto out;
+        }
+
+        prepared = TRUE;
+
+out:
+        g_clear_pointer (&auth_entry.data, g_free);
+        g_clear_pointer (&fp, fclose);
+
+        if (!prepared) {
+                g_clear_pointer (&filename, g_free);
+        }
+
+        return filename;
+}
+
 static void
 on_bus_finished (GSubprocess  *subprocess,
                  GAsyncResult *result,
@@ -333,6 +433,8 @@ spawn_session (State        *state,
                 g_subprocess_launcher_setenv (launcher, 
"DBUS_SESSION_BUS_ADDRESS", state->bus_address, TRUE);
         }
 
+        g_subprocess_launcher_setenv (launcher, "XAUTHORITY", 
state->x_auth_file, TRUE);
+
         subprocess = g_subprocess_launcher_spawnv (launcher,
                                                    (const char * const *) argv,
                                                    &error);
@@ -510,6 +612,8 @@ main (int    argc,
 
         g_unix_signal_add (SIGTERM, (GSourceFunc) on_sigterm, state);
 
+        state->x_auth_file = prepare_auth_file ();
+
         ret = spawn_bus (state, state->cancellable);
 
         if (!ret) {

Reply via email to