![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package lightdm.1364 for openSUSE:12.2:Update checked in at 2013-02-27 10:30:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.2:Update/lightdm.1364 (Old) and /work/SRC/openSUSE:12.2:Update/.lightdm.1364.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "lightdm.1364", Maintainer is "" Changes: -------- New Changes file: --- /dev/null 2013-02-26 18:15:11.936010755 +0100 +++ /work/SRC/openSUSE:12.2:Update/.lightdm.1364.new/lightdm.changes 2013-02-27 10:30:10.000000000 +0100 @@ -0,0 +1,390 @@ +------------------------------------------------------------------- +Thu Feb 21 15:34:32 UTC 2013 - vdziewiecki@suse.com + +-Backport lightdm-fix-language-setting.patch from factory +(bnc#805000 - Selecting locale in lightdm-gtk-greeter has no +effect) + +------------------------------------------------------------------- +Thu Apr 19 09:14:12 UTC 2012 - gber@opensuse.org + +- update to version 1.2.2 + - fix wrapper path in AppArmor profile (broken since 1.1.1) + - add show-manual-login and allow-guest options to + lightdm-set-defaults + - add missing regression test script +- dropped lightdm-use-pkglibexecdir.patch which has been + incorporated upstream + +------------------------------------------------------------------- +Fri Apr 6 22:42:43 UTC 2012 - gber@opensuse.org + +- update to version 1.2.0 + - new major release, please see the included NEWS for a detailed + list of changes +- dropped lightdm-desktop-session-env-pam.patch since + DESKTOP_SESSION is now in the PAM environment before + pam_open_session() is called +- dropped lightdm-remove-xauthority-ownership-fix.patch since the + code has been removed by upstream +- dropped lightdm-call-g_thread_init-conditionally.patch since the + problem has been fixed by upstream +- removed lightdm-gtk-greeter and lightdm-qt-greeter which are now + separate projects + +------------------------------------------------------------------- +Wed Mar 21 08:24:34 UTC 2012 - gber@opensuse.org + +- update to version 1.0.10 + - fix compilation failure in liblightdm-qt with GCC 4.7 +- dropped obsolete lightdm-fix-missing-includes.patch + +------------------------------------------------------------------- +Sat Mar 17 18:50:38 UTC 2012 - boris@steki.net + +- add lightdm-fix-missing-includes.patch which adds missing + includes (lp#958097) + +------------------------------------------------------------------- +Fri Mar 2 11:10:07 UTC 2012 - gber@opensuse.org + +- update to version 1.0.9 + - stop file descriptors leaking into the session processes + (bnc#745339, lp#927060, CVE-2012-1111) + - fix compilation against gthread + - change session directory once user permissions are set so it + works on NFS filesystems that don't allow root to access files + - fix object cleanup on exit + - fix lightdm --debug not working on newer GLib + - drop privileges when reading ~/.dmrc (CVE-2011-3153) + - fix crash calling lightdm_get_layout +- drop lightdm-CVE-2011-3153.patch which has been included upstream + +------------------------------------------------------------------- +Sun Jan 8 10:11:16 UTC 2012 - gber@opensuse.org + +- added lightdm-call-g_thread_init-conditionally.patch in order to + call g_thread_init() only on glib < 2.31.0 +- no need to own %{_libexecdir}/X11/ + +------------------------------------------------------------------- +Sat Dec 3 11:43:28 UTC 2011 - gber@opensuse.org + +- regenerate moc files + +------------------------------------------------------------------- +Tue Nov 15 16:29:15 UTC 2011 - prusnak@opensuse.org + +- fix .dmrc handling (CVE-2011-3153) [bnc#728627] + +------------------------------------------------------------------- +Thu Nov 10 08:53:40 UTC 2011 - gber@opensuse.org + +- added lightdm-remove-xauthority-ownership-fix.patch which removes + the code correcting the ownership of .Xauthority files, it is + still not secure and the buggy LightDM version writing + .Xauthority as root never was in a released openSUSE version + anyway (bnc#730062) + +------------------------------------------------------------------- +Wed Nov 2 16:38:24 UTC 2011 - gber@opensuse.org + +- Update to version 1.0.6 + - use lchown for correcting ownership of ~/.Xauthority instead of + chown, this fixes a security issue where using ~/.Xauthority as + a symlink would cause LightDM to set the destination of the + link to user ownership (CVE-2011-4105) + +------------------------------------------------------------------- +Sun Oct 30 19:05:10 UTC 2011 - gber@opensuse.org + +- added dependency on gnome-themes-accessibility to + lightdm-gtk-greeter in order to make it high contrast + accessibility option work + +------------------------------------------------------------------- +Thu Oct 27 16:28:08 UTC 2011 - gber@opensuse.org + +- update to version 1.0.5 + - relax AppArmor guest profile to allow compiz to start + - connect up VNC settings for width, height, depth +- dropped lightdm-vnc-configuration.patch which has been integrated + +------------------------------------------------------------------- +Wed Oct 26 09:47:23 UTC 2011 - gber@opensuse.org + +- update to version 1.0.4 + - fix --enable-gtk-greeter=yes not working + - fix X sessions with arguments in Exec not working + - use previous session for automatic login or if greeter does not + request one + - correct ownership of ~/.Xauthority if upgrading from buggy + version of LightDM that had it root owned + - set default resolution of VNC to 1024x768, add settings for + width, height, depth into lightdm.conf + - AppArmor profile: Fix broken gnome-keyring and dbus/gwibber, + and quiesce annoying kernel audit messages for privileges that + we definitively do not want to grant + - set LOGNAME environment variable + +------------------------------------------------------------------- +Tue Oct 18 17:09:01 UTC 2011 - gber@opensuse.org + +- added lighdm-vnc-configuration.patch in order to set the default + resolution of VNC to 1024x768, add settings for width, height, + depth into lightdm.conf + +------------------------------------------------------------------- +Sat Oct 8 11:24:00 UTC 2011 - gber@opensuse.org + +- update to version 1.0.3 + - fix reference counting issue in ConsoleKit code + - really add the lightdm-guest-session-wrapper +- added lightdm-use-pkglibexecdir.patch in order to use + pkglibexecdir instead of libexecdir for helper binaries/scripts + +------------------------------------------------------------------- +Thu Oct 6 09:04:51 UTC 2011 - gber@opensuse.org + +- update to version 1.0.2 + - fix daemon from blocking if Accounts Service does not exist + - fix greeter log file not being written + - don't set LANG environment variable if using Accounts Service + - fix gdmflexiserver not working due to it not being in PATH + - don't authenticate the greeter user + - allow greeters to be disabled in configure flags + - fix over allocation of read buffer in greeter protocol + - make sure objects are cleaned up on exit + - fix minor memory leaks + - fix hugely oversized allocation in greeter buffer, can trigger + crashes when entering very long passwords + +------------------------------------------------------------------- +Wed Oct 5 23:07:19 UTC 2011 - gber@opensuse.org + +- update to version 1.0.1 + - GTK greeter now remembers last user + - GTK greeter now initializes i18n + - start authentication for automatically selected user in GTK + greeter + - link liblightdm-qt against QtGui + - fix liblightdm-qt crashing when face images are installed + - set correct permissions on session log files + - prefer a locale with a codeset over one without for setting + LANG + - introduce a lightdm-guest-session-wrapper session command + which MAC systems like AppArmor and SELinux can use for + attaching a restrictive policy to guest sessions + - provide an AppArmor profile for guest session lockdown + +------------------------------------------------------------------- +Mon Oct 3 17:14:41 UTC 2011 - gber@opensuse.org + +- add dependency on ConsoleKit-x11 +- add optional dependency on accountsservice to + liblightdm-gobject-1-0 + +------------------------------------------------------------------- +Wed Sep 28 09:22:46 UTC 2011 - gber@opensuse.org + +- update to version 1.0.0 + - explicitly grab keyboard focus in GTK greeter + - fix removed power and a11y menu items in GTK greeter + - put system binary directory into path when running in test mode + - call pam_getenvlist after pam_setcred + +------------------------------------------------------------------- +Mon Sep 26 14:07:55 UTC 2011 - gber@opensuse.org ++++ 193 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:12.2:Update/.lightdm.1364.new/lightdm.changes New: ---- X11-displaymanagers-lightdm lightdm-1.2.2.tar.gz lightdm-autologin.pamd lightdm-default-configuration.patch lightdm-fix-language-setting.patch lightdm-lock-screen-before-switch.patch lightdm-rpmlintrc lightdm-set-gdmflexiserver-envvar.patch lightdm-sysconfig-support.patch lightdm-xauthlocalhostname-support.patch lightdm.changes lightdm.pamd lightdm.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lightdm.spec ++++++ # # spec file for package lightdm # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2011 Guido Berhoerster. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define gobject_libname lightdm-gobject-1 %define gobject_lib lib%{gobject_libname}-0 %define qt_libname lightdm-qt-2 %define qt_lib lib%{qt_libname}-0 Name: lightdm Version: 1.2.2 Release: 0 Summary: Lightweight, Cross-desktop Display Manager License: GPL-3.0+ Group: System/X11/Displaymanagers Url: http://www.freedesktop.org/wiki/Software/LightDM Source0: %{name}-%{version}.tar.gz Source1: %{name}.pamd Source2: %{name}-autologin.pamd Source3: X11-displaymanagers-%{name} Source100: %{name}-rpmlintrc # PATCH-FEATURE-OPENSUSE lightdm-sysconfig-support.patch gber@opensuse.org -- Adds support for reading configuration options from /etc/sysconfig/displaymanager and /etc/sysconfig/windowmanager Patch1: lightdm-sysconfig-support.patch # PATCH-FEATURE-OPENSUSE lightdm-xauthlocalhostname-support.patch gber@opensuse.org -- Set XAUTHLOCALHOSTNAME to localhost for local logins to avoid issues in the session in case the hostname changes Patch2: lightdm-xauthlocalhostname-support.patch # PATCH-FEATURE-OPENSUSE lightdm-set-gdmflexiserver-envvar.patch gber@opensuse.org -- Sets the GDMFLEXISERVER environment variable for the gdmflexiserver wrapper Patch4: lightdm-set-gdmflexiserver-envvar.patch # PATCH-FEATURE-OPENSUSE lightdm-default-configuration.patch gber@opensuse.org -- Modifies configuration with suitable defaults for openSUSE Patch5: lightdm-default-configuration.patch # PATCH-FIX-UPSTREAM lightdm-lock-screen-before-switch.patch gber@opensuse.org -- Try to lock the screen before switching users Patch7: lightdm-lock-screen-before-switch.patch # PATCH-FIX-UPSTREAM vdziewiecki@suse.cz fix selecting locale in lightdm-gtk-greeter Patch8: lightdm-fix-language-setting.patch BuildRequires: gcc-c++ BuildRequires: gnome-common BuildRequires: gtk-doc BuildRequires: intltool BuildRequires: pam-devel BuildRequires: pkgconfig(QtCore) BuildRequires: pkgconfig(QtDBus) BuildRequires: pkgconfig(QtGui) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(libxklavier) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xdmcp) Requires(pre): pwdutils # 3rd party greeters don't have to follow # the same versioning of lightdm Requires: ConsoleKit-x11 Requires: gdmflexiserver Requires: lightdm-greeter Recommends: %{name}-lang BuildRoot: %{_tmppath}/%{name}-%{version}-build %description LightDM is a lightweight, cross-desktop display manager. Its main features are a well-defined greeter API allowing multiple GUIs, support for all display manager use cases, with plugins where appropriate, low code complexity, and fast performance. Due to its cross-platform nature greeters can be written in several toolkits such as Qt and GTK. %lang_package %package -n %{gobject_lib} Summary: LightDM GObject-based Client Library Group: System/Libraries Recommends: accountsservice %description -n %{gobject_lib} A GObject-based library for LightDM clients to use to interface with LightDM. %package gobject-devel Summary: Development Files for %{gobject_lib} Group: Development/Libraries/C and C++ Requires: %{gobject_lib} = %{version} %description gobject-devel This package contains development files needed for developing GObject-based LightDM clients. %package -n %{qt_lib} Summary: LightDM Qt-based Client Library Group: System/Libraries %description -n %{qt_lib} A Qt-based library for LightDM clients to use to interface with LightDM. %package qt-devel Summary: Development Files for %{qt_lib} Group: Development/Libraries/C and C++ Requires: %{qt_lib} = %{version} %description qt-devel This package contains development files needed for developing Qt-based LightDM clients. %prep %setup -q %patch1 -p1 %patch2 -p1 %patch4 -p1 %patch5 -p1 %patch7 -p1 %patch8 -p1 %build ./autogen.sh %configure \ --libexecdir=%{_libexecdir} \ --disable-static \ --enable-gtk-doc \ --with-user-session=twm \ --with-greeter-session=lightdm-default-greeter \ --with-greeter-user=lightdm make %{?_smp_mflags} V=1 %install %make_install rm -f %{buildroot}%{_libdir}/*.la rm -rf %{buildroot}%{_sysconfdir}/init/ install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/lightdm install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/lightdm-autologin install -D -m 644 %{SOURCE3} %{buildroot}%{_libexecdir}/X11/displaymanagers/lightdm install -d %{buildroot}%{_localstatedir}/log/lightdm install -d %{buildroot}%{_localstatedir}/run/lightdm install -d %{buildroot}%{_localstatedir}/lib/lightdm install -d %{buildroot}%{_datadir}/xgreeters %find_lang %{name} %{?no_lang_C} %clean rm -rf %{buildroot} %pre /usr/sbin/groupadd -r lightdm 2> /dev/null || : /usr/sbin/useradd -r -o -g lightdm -s /bin/false -c "LightDM daemon" \ -d /var/lib/lightdm lightdm 2> /dev/null || : /usr/sbin/usermod -g lightdm -G lightdm -s /bin/false lightdm 2> /dev/null %post -n %{gobject_lib} -p /sbin/ldconfig %postun -n %{gobject_lib} -p /sbin/ldconfig %post -n %{qt_lib} -p /sbin/ldconfig %postun -n %{qt_lib} -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc COPYING ChangeLog NEWS README %{_bindir}/dm-tool %{_sbindir}/lightdm %dir %{_libexecdir}/lightdm/ %{_libexecdir}/%{name}/lightdm-set-defaults %{_libexecdir}/%{name}/gdmflexiserver %{_libexecdir}/%{name}/lightdm-guest-session-wrapper %dir %{_sysconfdir}/lightdm/ %config %{_sysconfdir}/lightdm/lightdm.conf %config %{_sysconfdir}/lightdm/users.conf %config %{_sysconfdir}/lightdm/keys.conf %config %{_sysconfdir}/pam.d/lightdm* %config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.DisplayManager.conf %dir %{_sysconfdir}/apparmor.d/ %{_sysconfdir}/apparmor.d/lightdm-guest-session %dir %{_libexecdir}/X11/displaymanagers/ %{_libexecdir}/X11/displaymanagers/lightdm %dir %{_datadir}/xgreeters/ %ghost %attr(751,lightdm,lightdm) %dir %{_localstatedir}/run/lightdm %attr(750,lightdm,lightdm) %dir %{_localstatedir}/log/lightdm %attr(750,lightdm,lightdm) %dir %{_localstatedir}/lib/lightdm %doc %{_mandir}/man1/lightdm.1* %files lang -f %{name}.lang %files -n %{gobject_lib} %defattr(-,root,root,-) %{_libdir}/lib%{gobject_libname}.so.* %files gobject-devel %defattr(-,root,root,-) %{_libdir}/lib%{gobject_libname}.so %{_libdir}/pkgconfig/lib%{gobject_libname}.pc %{_includedir}/%{gobject_libname}/ %{_libdir}/girepository-1.0/LightDM-1.typelib %{_datadir}/gir-1.0/LightDM-1.gir %dir %{_datadir}/vala %dir %{_datadir}/vala/vapi %{_datadir}/vala/vapi/liblightdm-gobject-1.vapi %doc %{_datadir}/gtk-doc/html/%{gobject_libname}/ %files -n %{qt_lib} %defattr(-,root,root,-) %{_libdir}/lib%{qt_libname}.so.* %files qt-devel %defattr(-,root,root,-) %{_libdir}/lib%{qt_libname}.so %{_libdir}/pkgconfig/lib%{qt_libname}.pc %{_includedir}/%{qt_libname}/ %changelog ++++++ X11-displaymanagers-lightdm ++++++ lightdm_reload_proc() { /etc/init.d/xdm restart exit $? } lightdm_vars() { case $1 in lightdm) DISPLAYMANAGER=/usr/sbin/lightdm RELOADPROC=lightdm_reload_proc ;; *) return 1 ;; esac return 0 } ++++++ lightdm-autologin.pamd ++++++ #%PAM-1.0 auth required pam_permit.so account include common-account password include common-password session required pam_loginuid.so session include common-session ++++++ lightdm-default-configuration.patch ++++++ openSUSE-specific default configuration diff --git a/data/lightdm.conf b/data/lightdm.conf --- a/data/lightdm.conf +++ b/data/lightdm.conf @@ -47,7 +47,7 @@ #greeter-user=lightdm #minimum-display-number=0 #minimum-vt=7 -#user-authority-in-system-dir=false +user-authority-in-system-dir=true #guest-account-script=guest-account #log-directory=/var/log/lightdm #run-directory=/var/run/lightdm @@ -84,7 +84,7 @@ # exit-on-failure = True if the daemon should exit if this seat fails # [SeatDefaults] -#xserver-command=X +xserver-command=/usr/bin/X #xserver-layout= #xserver-config= #xserver-allow-tcp=false @@ -98,11 +98,11 @@ #user-session=default #allow-guest=true #guest-session=UNIMPLEMENTED -#session-wrapper=lightdm-session +session-wrapper=/etc/X11/xdm/Xsession #display-setup-script= -#greeter-setup-script= -#session-setup-script= -#session-cleanup-script= +greeter-setup-script=/etc/X11/xdm/Xsetup +session-setup-script=/etc/X11/xdm/Xstartup +session-cleanup-script=/etc/X11/xdm/Xreset #autologin-guest=false #autologin-user= #autologin-user-timeout=0 diff --git a/data/users.conf b/data/users.conf --- a/data/users.conf +++ b/data/users.conf @@ -9,6 +9,6 @@ # hidden-shells = Shells that indicate a user cannot login # [UserAccounts] -minimum-uid=500 -hidden-users=nobody nobody4 noaccess -hidden-shells=/bin/false /usr/sbin/nologin +minimum-uid=1000 +hidden-users=nobody +hidden-shells=/bin/false /sbin/nologin ++++++ lightdm-fix-language-setting.patch ++++++ # HG changeset patch # Parent 914564e535f0a132b097bc5a066908c04892180d Fix saving/retrieving of the language setting Add user_get_language() for retrieving the language setting. Remove unused user_get_locale(). Always save the language to both accountsservice and dmrc. Actually retrieve the language setting and export the locale via LANG and GDM_LANG environment variables. diff --git a/src/accounts.c b/src/accounts.c --- a/src/accounts.c +++ b/src/accounts.c @@ -44,9 +44,6 @@ struct UserPrivate /* Language */ gchar *language; - /* Locale */ - gchar *locale; - /* X session */ gchar *xsession; }; @@ -332,36 +329,59 @@ user_get_shell (User *user) return user->priv->shell; } -const gchar * -user_get_locale (User *user) -{ - g_return_val_if_fail (user != NULL, NULL); - - g_free (user->priv->locale); - if (user->priv->proxy) - user->priv->locale = NULL; - else - user->priv->locale = get_string_from_dmrc (user->priv->name, "Desktop", "Language"); - - /* Treat a blank locale as unset */ - if (g_strcmp0 (user->priv->locale, "") == 0) - { - g_free (user->priv->locale); - user->priv->locale = NULL; - } - - return user->priv->locale; -} - void user_set_language (User *user, const gchar *language) { g_return_if_fail (user != NULL); + call_method (user->priv->proxy, "SetLanguage", g_variant_new ("(s)", language), "()", NULL); + save_string_to_dmrc (user->priv->name, "Desktop", "Language", language); +} + +const gchar * +user_get_language (User *user) +{ + GVariant *variant, *inner; + gboolean success; + + g_return_val_if_fail (user != NULL, NULL); + + g_free (user->priv->language); if (user->priv->proxy) - call_method (user->priv->proxy, "SetLanguage", g_variant_new ("(s)", language), "()", NULL); + { + /* get_property () uses g_dbus_proxy_get_cached_property () which would + * return the previous (cached) value of the "Language" property */ +#if 0 + if (get_property (user->priv->proxy, "Language", "s", &variant)) + { + g_variant_get (variant, "s", &user->priv->language); + g_variant_unref (variant); + } + else + user->priv->language = NULL; +#endif + success = call_method (user->priv->proxy, "org.freedesktop.DBus.Properties.Get", g_variant_new ("(ss)", g_dbus_proxy_get_interface_name(user->priv->proxy), "Language"), "(v)", &variant); + if (success) + { + g_variant_get (variant, "(v)", &inner); + user->priv->language = g_variant_dup_string (inner, NULL); + g_variant_unref (inner); + g_variant_unref (variant); + } + else + user->priv->language = NULL; + } else - save_string_to_dmrc (user->priv->name, "Desktop", "Language", language); + user->priv->language = get_string_from_dmrc (user->priv->name, "Desktop", "Language"); + + /* Treat a blank language as unset */ + if (g_strcmp0 (user->priv->language, "") == 0) + { + g_free (user->priv->language); + user->priv->language = NULL; + } + + return user->priv->language; } void @@ -436,6 +456,7 @@ user_finalize (GObject *object) g_free (self->priv->gecos); g_free (self->priv->home_directory); g_free (self->priv->shell); + g_free (self->priv->language); G_OBJECT_CLASS (user_parent_class)->finalize (object); } diff --git a/src/accounts.h b/src/accounts.h --- a/src/accounts.h +++ b/src/accounts.h @@ -58,7 +58,7 @@ const gchar *user_get_xsession (User *us void user_set_xsession (User *user, const gchar *session); -const gchar *user_get_locale (User *user); +const gchar *user_get_language (User *user); void user_set_language (User *user, const gchar *language); diff --git a/src/display.c b/src/display.c --- a/src/display.c +++ b/src/display.c @@ -704,6 +704,7 @@ display_start_session (Display *display) { User *user; gchar *filename, *sessions_dir, *path; + const gchar *language; gchar **argv; user = session_get_user (display->priv->session); @@ -727,6 +728,14 @@ display_start_session (Display *display) if (!argv) return TRUE; + /* Retrieve language setting */ + language = user_get_language (user); + if (language != NULL && language != '\0') + { + session_set_env (display->priv->session, "LANG", language); + session_set_env (display->priv->session, "GDM_LANG", language); + } + session_set_env (display->priv->session, "DESKTOP_SESSION", display->priv->user_session); // FIXME: Apparently deprecated? session_set_env (display->priv->session, "GDMSESSION", display->priv->user_session); // FIXME: Not cross-desktop ++++++ lightdm-lock-screen-before-switch.patch ++++++ try to lock the screen before switching users diff --git a/utils/gdmflexiserver b/utils/gdmflexiserver --- a/utils/gdmflexiserver +++ b/utils/gdmflexiserver @@ -9,9 +9,47 @@ # # See http://www.gnu.org/copyleft/gpl.html for the full text of the license. +PATH=/usr/local/bin:/bin:/usr/bin +export PATH + if [ -z "$XDG_SEAT_PATH" ]; then # something went wrong exit 1 fi +find_command () { + cmd="$1" + oIFS="${IFS}"; IFS=: + set -- ${PATH} + IFS="${oIFS}" + + for part; do + [ -x "${part}/${cmd}" ] && return 0 + done + return 1 +} + +lock_screen () { + for lock_cmd in \ + "xscreensaver-command -lock" \ + "gnome-screensaver-command --lock" \ + "dbus-send --session --dest=org.freedesktop.ScreenSaver --type=method_call /ScreenSaver org.freedesktop.ScreenSaver.Lock" + do + ${lock_cmd} >/dev/null 2>&1 && return + done + + for lock_cmd in \ + "slock" \ + "xlock -mode blank" + do + set -- ${lock_cmd} + if find_command "$1"; then + ${lock_cmd} >/dev/null 2>&1 & + return + fi + done +} + +lock_screen + dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter ++++++ lightdm-rpmlintrc ++++++ addFilter ('untranslated-desktop-file /usr/share/xgreeters/') ++++++ lightdm-set-gdmflexiserver-envvar.patch ++++++ set the GDMFLEXISERVER environment variable for the gdmflexiserver wrapper diff --git a/src/session-child.c b/src/session-child.c --- a/src/session-child.c +++ b/src/session-child.c @@ -453,10 +453,7 @@ session_child_run (int argc, char **argv g_free (value); } - /* Put our tools directory in the path as a hack so we can use the legacy gdmflexiserver interface */ - path = pam_getenv (pam_handle, "PATH"); - if (path) - pam_putenv (pam_handle, g_strdup_printf ("PATH=%s:%s", PKGLIBEXEC_DIR, path)); + pam_putenv (pam_handle, g_strdup_printf ("GDMFLEXISERVER=%s", PKGLIBEXEC_DIR "/gdmflexiserver")); /* Catch terminate signal and pass it to the child */ signal (SIGTERM, signal_cb); ++++++ lightdm-sysconfig-support.patch ++++++ ++++ 644 lines (skipped) ++++++ lightdm-xauthlocalhostname-support.patch ++++++ set XAUTHLOCALHOSTNAME to localhost for local logins to avoid issues in the session in case the hostname changes diff --git a/src/seat-xlocal.c b/src/seat-xlocal.c --- a/src/seat-xlocal.c +++ b/src/seat-xlocal.c @@ -141,6 +141,7 @@ seat_xlocal_run_script (Seat *seat, Disp path = xserver_local_get_authority_file_path (xserver); process_set_env (script, "DISPLAY", xserver_get_address (XSERVER (xserver))); process_set_env (script, "XAUTHORITY", path); + process_set_env (script, "XAUTHLOCALHOSTNAME", "localhost"); g_free (path); SEAT_CLASS (seat_xlocal_parent_class)->run_script (seat, display, script); diff --git a/src/xserver-local.c b/src/xserver-local.c --- a/src/xserver-local.c +++ b/src/xserver-local.c @@ -397,7 +397,8 @@ xserver_local_start (DisplayServer *disp XServerLocal *server = XSERVER_LOCAL (display_server); gboolean result; gchar *filename, *dir, *absolute_command; - gchar hostname[1024], *number; + gchar hostname[] = "localhost"; + gchar *number; GString *command; g_return_val_if_fail (server->priv->xserver_process == NULL, FALSE); @@ -438,7 +439,6 @@ xserver_local_start (DisplayServer *disp if (server->priv->layout) g_string_append_printf (command, " -layout %s", server->priv->layout); - gethostname (hostname, 1024); number = g_strdup_printf ("%d", xserver_get_display_number (XSERVER (server))); if (!server->priv->xdmcp_key) xserver_set_authority (XSERVER (server), xauth_new_cookie (XAUTH_FAMILY_LOCAL, (guint8*) hostname, strlen (hostname), number)); diff --git a/src/xsession.c b/src/xsession.c --- a/src/xsession.c +++ b/src/xsession.c @@ -15,6 +15,7 @@ #include <sys/stat.h> #include "xsession.h" +#include "xserver-local.h" #include "configuration.h" #include "privileges.h" @@ -35,6 +36,8 @@ xsession_new (XServer *xserver) session = g_object_new (XSESSION_TYPE, NULL); session->priv->xserver = g_object_ref (xserver); + if (IS_XSERVER_LOCAL (XSESSION (session)->priv->xserver)) + session_set_env (SESSION (session), "XAUTHLOCALHOSTNAME", "localhost"); session_set_env (SESSION (session), "DISPLAY", xserver_get_address (xserver)); session_set_tty (SESSION (session), xserver_get_address (xserver)); session_set_xdisplay (SESSION (session), xserver_get_address (xserver)); ++++++ lightdm.pamd ++++++ #%PAM-1.0 auth include common-auth account include common-account password include common-password session required pam_loginuid.so session include common-session -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org