diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2013-06-28 20:22:31 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2013-06-28 20:22:31 +1200 |
commit | d7ab0d7189fb8cc97da8cbcd4703ce1bc672874e (patch) | |
tree | 54419255434f62a1912253a5470d32bd93b9e5e7 | |
parent | 3a5ef12d624d2667d83d91876d1edaf7e106ca22 (diff) | |
parent | a70d767edebcec3e7c629e4d7b685d59347c08ec (diff) | |
download | lightdm-d7ab0d7189fb8cc97da8cbcd4703ce1bc672874e.tar.gz |
Merge with trunk
254 files changed, 1446 insertions, 533 deletions
@@ -28,6 +28,7 @@ Makefile.in.in ./mkinstalldirs ./omf.make ./xmldocs.make +data/apparmor/lightdm-guest-session doc/html doc/lightdm-gobject-*.* doc/*.stamp @@ -56,6 +57,8 @@ src/ldm-marshal.c src/ldm-marshal.h src/lightdm src/lightdm-guest-session-wrapper +tests/*.log +tests/*.trs tests/data/passwd tests/src/*_moc*.cpp tests/src/dbus-env @@ -1,3 +1,24 @@ +Overview of changes in lightdm 1.7.3 + + * Load configuration from /etc/lightdm/lightdm.conf.d. + * Fix compile warnings + * Fix tests not running from install directory inside checkout. + +Overview of changes in lightdm 1.7.2 + + * Fix incorrectly distributed guest-session apparmor data + +Overview of changes in lightdm 1.7.1 + + * Fix .pc file for liblightdm-qt5-3 + * Add a new option "autologin-in-background" which lets an autologin happen + in a second display while still showing the greeter. + * Stop if fail to create default seat + * Add option to set seat type in lightdm-set-defaults + * Stop using g_file_set_contents - it can leave intermediate files around + * Make tests work without installing them + * Fix distcheck + Overview of changes in lightdm 1.7.0 * Use logind instead of ConsoleKit if it is available diff --git a/configure.ac b/configure.ac index 58f8ff21..32488aa4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(lightdm, 1.7.0) +AC_INIT(lightdm, 1.7.3) AC_CONFIG_MACRO_DIR(m4) AC_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign]) @@ -193,7 +193,6 @@ dnl ########################################################################### AC_CONFIG_FILES([ Makefile data/Makefile -data/init/Makefile doc/Makefile help/Makefile liblightdm-gobject/liblightdm-gobject-1.pc diff --git a/data/Makefile.am b/data/Makefile.am index ee183ac6..ff69580f 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,4 +1,5 @@ -SUBDIRS = init +initdir = ${sysconfdir}/init +dist_init_DATA = init/lightdm.conf confdir = $(sysconfdir)/lightdm dist_conf_DATA = lightdm.conf users.conf keys.conf @@ -11,24 +12,23 @@ dist_pam_DATA = pam/lightdm \ pam/lightdm-autologin \ pam/lightdm-greeter -EXTRA_DIST = guest-session.apparmor \ - guest-session.apparmor_abstraction \ - guest-session.apparmor_chromium_abstraction +lightdm-guest-session: $(srcdir)/apparmor/lightdm-guest-session.in + sed -e 's|@pkglibexecdir[@]|$(pkglibexecdir)|g' $< >$@ apparmor_profiledir = $(sysconfdir)/apparmor.d +apparmor_profile_DATA = \ + lightdm-guest-session -install-data-hook: - install -d $(DESTDIR)$(apparmor_profiledir) - sed 's!PKGLIBEXECDIR!$(pkglibexecdir)!g' < $(srcdir)/guest-session.apparmor \ - > $(DESTDIR)$(apparmor_profiledir)/lightdm-guest-session - install -d $(DESTDIR)$(apparmor_profiledir)/abstractions - install $(srcdir)/guest-session.apparmor_abstraction \ - $(DESTDIR)$(apparmor_profiledir)/abstractions/lightdm - install $(srcdir)/guest-session.apparmor_chromium_abstraction \ - $(DESTDIR)$(apparmor_profiledir)/abstractions/lightdm_chromium-browser +apparmor_profile_abstractionsdir = $(apparmor_profiledir)/abstractions +dist_apparmor_profile_abstractions_DATA = \ + apparmor/abstractions/lightdm \ + apparmor/abstractions/lightdm_chromium-browser dist_man1_MANS = lightdm.1 \ lightdm-set-defaults.1 +EXTRA_DIST = apparmor/lightdm-guest-session.in +CLEANFILES = lightdm-guest-session + DISTCLEANFILES = \ Makefile.in diff --git a/data/guest-session.apparmor_abstraction b/data/apparmor/abstractions/lightdm index bd60f90f..bd60f90f 100644 --- a/data/guest-session.apparmor_abstraction +++ b/data/apparmor/abstractions/lightdm diff --git a/data/guest-session.apparmor_chromium_abstraction b/data/apparmor/abstractions/lightdm_chromium-browser index cb4878f8..cb4878f8 100644 --- a/data/guest-session.apparmor_chromium_abstraction +++ b/data/apparmor/abstractions/lightdm_chromium-browser diff --git a/data/guest-session.apparmor b/data/apparmor/lightdm-guest-session.in index 7b43f77d..937a75d9 100644 --- a/data/guest-session.apparmor +++ b/data/apparmor/lightdm-guest-session.in @@ -3,7 +3,7 @@ #include <tunables/global> -PKGLIBEXECDIR/lightdm-guest-session-wrapper { +@pkglibexecdir@/lightdm-guest-session-wrapper { # Most applications are confined via the main abstraction #include <abstractions/lightdm> diff --git a/data/init/Makefile.am b/data/init/Makefile.am deleted file mode 100644 index 5383af38..00000000 --- a/data/init/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -initdir = ${sysconfdir}/init -dist_init_DATA = lightdm.conf - -DISTCLEANFILES = \ - Makefile.in diff --git a/data/lightdm.conf b/data/lightdm.conf index b8b3f560..6fcc86db 100644 --- a/data/lightdm.conf +++ b/data/lightdm.conf @@ -14,6 +14,7 @@ # xsessions-directory = Directory to find X sessions # remote-sessions-directory = Directory to find remote sessions # xgreeters-directory = Directory to find X greeters +# disable-guest-wrapper = Disable using guest session wrapper (temporary? required to make tests work without installing) # [LightDM] #start-default-seat=true @@ -29,6 +30,7 @@ #xsessions-directory=/usr/share/xsessions #remote-sessions-directory=/usr/share/lightdm/remote-sessions #xgreeters-directory=/usr/share/xgreeters +#disable-guest-wrapper=false # # Seat defaults diff --git a/liblightdm-gobject/greeter.c b/liblightdm-gobject/greeter.c index 1db708f2..8f90308f 100644 --- a/liblightdm-gobject/greeter.c +++ b/liblightdm-gobject/greeter.c @@ -119,7 +119,7 @@ timed_login_cb (gpointer data) } static guint32 -int_length () +int_length (void) { return 4; } diff --git a/liblightdm-qt/Makefile.am b/liblightdm-qt/Makefile.am index 70456b36..5889356d 100644 --- a/liblightdm-qt/Makefile.am +++ b/liblightdm-qt/Makefile.am @@ -1,15 +1,3 @@ -AM_V_MOC4 = $(am__v_MOC4_$(V)) -am__v_MOC4_ = $(am__v_MOC4_$(AM_DEFAULT_VERBOSITY)) -am__v_MOC4_0 = @echo " MOC4 " $@; -%_moc4.cpp: QLightDM/%.h - $(AM_V_MOC4) $(MOC4) $< -o $@ - -AM_V_MOC5 = $(am__v_MOC5_$(V)) -am__v_MOC5_ = $(am__v_MOC5_$(AM_DEFAULT_VERBOSITY)) -am__v_MOC5_0 = @echo " MOC5 " $@; -%_moc5.cpp: QLightDM/%.h - $(AM_V_MOC5) $(MOC5) $< -o $@ - common_libadd = \ -L$(top_builddir)/liblightdm-gobject \ -llightdm-gobject-1 @@ -85,3 +73,16 @@ liblightdm_qt5_3include_HEADERS = $(common_headers) BUILT_SOURCES += $(common_sources:.cpp=_moc5.cpp) pkgconfig_DATA += liblightdm-qt5-3.pc endif + +# Support pretty printing MOC +AM_V_MOC4 = $(am__v_MOC4_$(V)) +am__v_MOC4_ = $(am__v_MOC4_$(AM_DEFAULT_VERBOSITY)) +am__v_MOC4_0 = @echo " MOC4 " $@; +%_moc4.cpp: QLightDM/%.h + $(AM_V_MOC4) $(MOC4) $< -o $@ + +AM_V_MOC5 = $(am__v_MOC5_$(V)) +am__v_MOC5_ = $(am__v_MOC5_$(AM_DEFAULT_VERBOSITY)) +am__v_MOC5_0 = @echo " MOC5 " $@; +%_moc5.cpp: QLightDM/%.h + $(AM_V_MOC5) $(MOC5) $< -o $@ @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" diff --git a/po/ca@valencia.po b/po/ca@valencia.po index 53e2b533..85c27988 100644 --- a/po/ca@valencia.po +++ b/po/ca@valencia.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -15,8 +15,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" diff --git a/po/en_AU.po b/po/en_AU.po index 8b6007a1..cb25e41c 100644 --- a/po/en_AU.po +++ b/po/en_AU.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" diff --git a/po/en_CA.po b/po/en_CA.po index b7c31bf2..cc433432 100644 --- a/po/en_CA.po +++ b/po/en_CA.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" diff --git a/po/en_GB.po b/po/en_GB.po index 3d21be9f..7ec0655c 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" diff --git a/po/pt_BR.po b/po/pt_BR.po index 8bd597b9..9d1c4685 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" "Language: sr\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" diff --git a/po/zh_CN.po b/po/zh_CN.po index bcf7a6b5..67d66d39 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" diff --git a/po/zh_HK.po b/po/zh_HK.po index b25d8493..795879cb 100644 --- a/po/zh_HK.po +++ b/po/zh_HK.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" diff --git a/po/zh_TW.po b/po/zh_TW.po index 11aa888b..880b093b 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-17 05:37+0000\n" -"X-Generator: Launchpad (build 16626)\n" +"X-Launchpad-Export-Date: 2013-06-24 04:49+0000\n" +"X-Generator: Launchpad (build 16677)\n" #: ../greeters/gtk/lightdm-gtk-greeter.c:409 msgid "Are you sure you want to close all programs and restart the computer?" diff --git a/src/accounts.c b/src/accounts.c index 0fba5640..63d8a40d 100644 --- a/src/accounts.c +++ b/src/accounts.c @@ -151,7 +151,7 @@ get_string_from_dmrc (const gchar *username, const gchar *group, } static GDBusProxy * -get_accounts_service_proxy () +get_accounts_service_proxy (void) { GError *error = NULL; diff --git a/src/configuration.c b/src/configuration.c index 4d2fca66..e3b15df8 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -31,7 +31,32 @@ config_get_instance (void) gboolean config_load_from_file (Configuration *config, const gchar *path, GError **error) { - return g_key_file_load_from_file (config->priv->key_file, path, G_KEY_FILE_NONE, error); + GKeyFile *key_file; + gchar **groups; + int i; + + key_file = g_key_file_new (); + if (!g_key_file_load_from_file (key_file, path, G_KEY_FILE_NONE, error)) + return FALSE; + + groups = g_key_file_get_groups (key_file, NULL); + for (i = 0; groups[i]; i++) + { + gchar **keys; + int j; + + keys = g_key_file_get_keys (key_file, groups[i], NULL, error); + if (!keys) + break; + + for (j = 0; keys[j]; j++) + g_key_file_set_value (config->priv->key_file, groups[i], keys[j], g_key_file_get_value (key_file, groups[i], keys[j], NULL)); + + g_strfreev (keys); + } + g_strfreev (groups); + + return TRUE; } gchar ** diff --git a/src/display.c b/src/display.c index db7f2211..deab9f40 100644 --- a/src/display.c +++ b/src/display.c @@ -714,6 +714,7 @@ display_start_session (Display *display) gchar *filename, *sessions_dir, *path; const gchar *language; gchar **argv; + gboolean disable_guest_wrapper; user = session_get_user (display->priv->session); @@ -748,7 +749,8 @@ display_start_session (Display *display) session_set_env (display->priv->session, "GDMSESSION", display->priv->user_session); // FIXME: Not cross-desktop /* Run a guest session through the wrapper covered by MAC */ - if (display->priv->autologin_guest) + disable_guest_wrapper = config_get_boolean (config_get_instance (), "LightDM", "disable-guest-wrapper"); + if (display->priv->autologin_guest && !disable_guest_wrapper) { gchar *wrapper = g_build_filename (PKGLIBEXEC_DIR, "lightdm-guest-session-wrapper", NULL); g_debug ("Running guest session through wrapper: %s", wrapper); @@ -107,7 +107,8 @@ dmrc_save (GKeyFile *dmrc_file, const gchar *username) /* Update the .dmrc cache */ cache_dir = config_get_string (config_get_instance (), "LightDM", "cache-directory"); dmrc_cache_dir = g_build_filename (cache_dir, "dmrc", NULL); - g_mkdir_with_parents (dmrc_cache_dir, 0700); + if (g_mkdir_with_parents (dmrc_cache_dir, 0700) < 0) + g_warning ("Failed to make DMRC cache directory %s: %s", dmrc_cache_dir, strerror (errno)); filename = g_strdup_printf ("%s.dmrc", username); path = g_build_filename (dmrc_cache_dir, filename, NULL); diff --git a/src/greeter.c b/src/greeter.c index 9601c093..60cf8cb2 100644 --- a/src/greeter.c +++ b/src/greeter.c @@ -152,7 +152,7 @@ secure_free (Greeter *greeter, void *ptr) } static guint32 -int_length () +int_length (void) { return 4; } diff --git a/src/lightdm.c b/src/lightdm.c index db4406a1..11a51e3c 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -19,6 +19,7 @@ #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> +#include <errno.h> #include "configuration.h" #include "display-manager.h" @@ -787,6 +788,12 @@ vnc_connection_cb (VNCServer *server, GSocket *connection) g_object_unref (seat); } +static int +compare_strings (gconstpointer a, gconstpointer b) +{ + return strcmp (a, b); +} + int main (int argc, char **argv) { @@ -801,7 +808,7 @@ main (int argc, char **argv) gchar *xsessions_dir = NULL; gchar *remote_sessions_dir = NULL; gchar *xgreeters_dir = NULL; - gchar *config_dir; + gchar *config_dir, *config_d_dir = NULL; gchar *log_dir = NULL; gchar *run_dir = NULL; gchar *cache_dir = NULL; @@ -809,6 +816,7 @@ main (int argc, char **argv) gchar *default_run_dir = g_strdup (RUN_DIR); gchar *default_cache_dir = g_strdup (CACHE_DIR); gboolean show_version = FALSE; + GList *link, *messages = NULL; GOptionEntry options[] = { { "config", 'c', 0, G_OPTION_ARG_STRING, &config_path, @@ -857,6 +865,8 @@ main (int argc, char **argv) #endif loop = g_main_loop_new (NULL, FALSE); + messages = g_list_append (messages, g_strdup_printf ("Starting Light Display Manager %s, UID=%i PID=%i", VERSION, getuid (), getpid ())); + g_signal_connect (process_get_current (), "got-signal", G_CALLBACK (signal_cb), NULL); option_context = g_option_context_new (/* Arguments and description for --help test */ @@ -891,6 +901,7 @@ main (int argc, char **argv) else { config_dir = g_strdup (CONFIG_DIR); + config_d_dir = g_build_filename (config_dir, "lightdm.conf.d", NULL); config_path = g_build_filename (config_dir, "lightdm.conf", NULL); } config_set_string (config_get_instance (), "LightDM", "config-directory", config_dir); @@ -954,7 +965,8 @@ main (int argc, char **argv) default_cache_dir = g_build_filename (g_get_user_cache_dir (), "lightdm", "cache", NULL); } - /* Load config file */ + /* Load config file(s) */ + messages = g_list_append (messages, g_strdup_printf ("Loading configuration from %s", config_path)); if (!config_load_from_file (config_get_instance (), config_path, &error)) { gboolean is_empty; @@ -969,6 +981,49 @@ main (int argc, char **argv) } } g_clear_error (&error); + g_free (config_path); + if (config_d_dir) + { + GDir *dir; + GList *files, *link; + GKeyFile *f; + + /* Find configuration files */ + dir = g_dir_open (config_d_dir, 0, &error); + if (error && !g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) + g_printerr ("Failed to open configuration directory %s: %s\n", config_d_dir, error->message); + g_clear_error (&error); + if (dir) + { + const gchar *name; + while ((name = g_dir_read_name (dir))) + files = g_list_append (files, g_strdup (name)); + g_dir_close (dir); + } + + /* Sort alphabetically and load onto existing configuration */ + files = g_list_sort (files, compare_strings); + for (link = files; link; link = link->next) + { + gchar *filename = link->data; + gchar *path; + + path = g_build_filename (config_d_dir, filename, NULL); + if (g_str_has_suffix (filename, ".conf")) + { + messages = g_list_append (messages, g_strdup_printf ("Loading configuration from %s", path)); + config_load_from_file (config_get_instance (), path, &error); + if (error && !g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) + g_printerr ("Failed to load configuration from %s: %s\n", filename, error->message); + g_clear_error (&error); + } + else + g_debug ("Ignoring configuration file %s, it does not have .conf suffix", path); + g_free (path); + } + g_list_free_full (files, g_free); + } + g_free (config_d_dir); /* Set default values */ if (!config_has_key (config_get_instance (), "LightDM", "start-default-seat")) @@ -1037,21 +1092,24 @@ main (int argc, char **argv) /* Create run and cache directories */ dir = config_get_string (config_get_instance (), "LightDM", "log-directory"); - g_mkdir_with_parents (dir, S_IRWXU | S_IXGRP | S_IXOTH); + if (g_mkdir_with_parents (dir, S_IRWXU | S_IXGRP | S_IXOTH) < 0) + g_warning ("Failed to make log directory %s: %s", dir, strerror (errno)); g_free (dir); dir = config_get_string (config_get_instance (), "LightDM", "run-directory"); - g_mkdir_with_parents (dir, S_IRWXU | S_IXGRP | S_IXOTH); + if (g_mkdir_with_parents (dir, S_IRWXU | S_IXGRP | S_IXOTH) < 0) + g_warning ("Failed to make run directory %s: %s", dir, strerror (errno)); g_free (dir); dir = config_get_string (config_get_instance (), "LightDM", "cache-directory"); - g_mkdir_with_parents (dir, S_IRWXU | S_IXGRP | S_IXOTH); + if (g_mkdir_with_parents (dir, S_IRWXU | S_IXGRP | S_IXOTH) < 0) + g_warning ("Failed to make cache directory %s: %s", dir, strerror (errno)); g_free (dir); log_init (); - g_debug ("Starting Light Display Manager %s, UID=%i PID=%i", VERSION, getuid (), getpid ()); - - g_debug ("Loaded configuration from %s", config_path); - g_free (config_path); + /* Show queued messages once logging is complete */ + for (link = messages; link; link = link->next) + g_debug ("%s", link->data); + g_list_free_full (messages, g_free); g_debug ("Using D-Bus name %s", LIGHTDM_BUS_NAME); bus_id = g_bus_own_name (getuid () == 0 ? G_BUS_TYPE_SYSTEM : G_BUS_TYPE_SESSION, diff --git a/src/seat-xlocal.c b/src/seat-xlocal.c index 52d5e60a..d1c240c4 100644 --- a/src/seat-xlocal.c +++ b/src/seat-xlocal.c @@ -109,14 +109,20 @@ seat_xlocal_create_session (Seat *seat, Display *display) { XServerLocal *xserver; XSession *session; - gchar *tty; + gchar *t; xserver = XSERVER_LOCAL (display_get_display_server (display)); session = xsession_new (XSERVER (xserver)); - tty = g_strdup_printf ("/dev/tty%d", xserver_local_get_vt (xserver)); - session_set_tty (SESSION (session), tty); - g_free (tty); + t = g_strdup_printf ("/dev/tty%d", xserver_local_get_vt (xserver)); + session_set_tty (SESSION (session), t); + g_free (t); + + /* Set variables for logind */ + session_set_env (SESSION (session), "XDG_SEAT", "seat0"); + t = g_strdup_printf ("%d", xserver_local_get_vt (xserver)); + session_set_env (SESSION (session), "XDG_VTNR", t); + g_free (t); return SESSION (session); } diff --git a/src/seat-xvnc.c b/src/seat-xvnc.c index 0053bb3f..c063a3c6 100644 --- a/src/seat-xvnc.c +++ b/src/seat-xvnc.c @@ -72,6 +72,7 @@ seat_xvnc_create_session (Seat *seat, Display *display) XSession *session; GInetSocketAddress *address; gchar *hostname; + gchar *t; xserver = XSERVER_XVNC (display_get_display_server (display)); diff --git a/src/session.c b/src/session.c index 653429ae..1b877ad5 100644 --- a/src/session.c +++ b/src/session.c @@ -539,7 +539,8 @@ session_run (Session *session, gchar **argv) dir = g_build_filename (run_dir, session->priv->username, NULL); g_free (run_dir); - g_mkdir_with_parents (dir, S_IRWXU); + if (g_mkdir_with_parents (dir, S_IRWXU) < 0) + g_warning ("Failed to set create system authority dir %s: %s", dir, strerror (errno)); if (getuid () == 0) { if (chown (dir, user_get_uid (session_get_user (session)), user_get_gid (session_get_user (session))) < 0) diff --git a/src/xauthority.c b/src/xauthority.c index 31871665..08a56886 100644 --- a/src/xauthority.c +++ b/src/xauthority.c @@ -10,6 +10,7 @@ */ #include <string.h> +#include <stdio.h> #include <errno.h> #include <unistd.h> #include <sys/stat.h> @@ -210,37 +211,37 @@ read_string (gchar *data, gsize data_length, gsize *offset, gchar **value) } static void -write_uint16 (GByteArray *data, guint16 value) +write_uint16 (FILE *file, guint16 value) { guint8 v[2]; v[0] = value >> 8; v[1] = value & 0xFF; - g_byte_array_append (data, v, 2); + fwrite (v, 2, 1, file); } static void -write_data (GByteArray *data, const guint8 *value, gsize value_length) +write_data (FILE *file, const guint8 *value, gsize value_length) { - g_byte_array_append (data, value, value_length); + fwrite (value, value_length, 1, file); } static void -write_string (GByteArray *data, const gchar *value) +write_string (FILE *file, const gchar *value) { - write_uint16 (data, strlen (value)); - write_data (data, (guint8 *) value, strlen (value)); + write_uint16 (file, strlen (value)); + write_data (file, (guint8 *) value, strlen (value)); } gboolean xauth_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename, GError **error) { gchar *input; - gsize input_length = 0, input_offset = 0; + gsize input_length = 0, input_offset = 0, offset; GList *link, *records = NULL; XAuthority *a; gboolean result; gboolean matched = FALSE; - GByteArray *output; + FILE *output; g_return_val_if_fail (auth != NULL, FALSE); g_return_val_if_fail (filename != NULL, FALSE); @@ -311,8 +312,19 @@ xauth_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename, GErro records = g_list_append (records, g_object_ref (auth)); /* Write records back */ - result = TRUE; - output = g_byte_array_new (); + errno = 0; + output = fopen (filename, "w"); + if (output == NULL) + { + g_set_error (error, + G_FILE_ERROR, + g_file_error_from_errno (errno), + "Failed to write X authority %s: %s", + filename, + g_strerror (errno)); + return FALSE; + } + for (link = records; link && result; link = link->next) { XAuthority *a = link->data; @@ -329,10 +341,9 @@ xauth_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename, GErro } g_list_free (records); - result = g_file_set_contents (filename, (gchar *)output->data, output->len, error); - g_byte_array_free (output, TRUE); + fclose (output); - return result; + return TRUE; } static void diff --git a/src/xdmcp-server.c b/src/xdmcp-server.c index 59a38a65..b92df9c9 100644 --- a/src/xdmcp-server.c +++ b/src/xdmcp-server.c @@ -237,7 +237,7 @@ decode_key (const gchar *key, guint8 *data) { gint i; - memset (data, 0, sizeof (data)); + memset (data, 0, 8); if (strncmp (key, "0x", 2) == 0 || strncmp (key, "0X", 2) == 0) { for (i = 0; i < 8; i++) diff --git a/src/xserver-local.c b/src/xserver-local.c index 68ab5e03..dc9295ca 100644 --- a/src/xserver-local.c +++ b/src/xserver-local.c @@ -387,7 +387,8 @@ write_authority_file (XServerLocal *server) run_dir = config_get_string (config_get_instance (), "LightDM", "run-directory"); dir = g_build_filename (run_dir, "root", NULL); g_free (run_dir); - g_mkdir_with_parents (dir, S_IRWXU); + if (g_mkdir_with_parents (dir, S_IRWXU) < 0) + g_warning ("Failed to make authority directory %s: %s", dir, strerror (errno)); server->priv->authority_file = g_build_filename (dir, xserver_get_address (XSERVER (server)), NULL); g_free (dir); diff --git a/src/xserver-xvnc.c b/src/xserver-xvnc.c index 29512d1b..f3654901 100644 --- a/src/xserver-xvnc.c +++ b/src/xserver-xvnc.c @@ -234,7 +234,8 @@ xserver_xvnc_start (DisplayServer *display_server) run_dir = config_get_string (config_get_instance (), "LightDM", "run-directory"); dir = g_build_filename (run_dir, "root", NULL); g_free (run_dir); - g_mkdir_with_parents (dir, S_IRWXU); + if (g_mkdir_with_parents (dir, S_IRWXU) < 0) + g_warning ("Failed to make authority directory %s: %s", dir, strerror (errno)); server->priv->authority_file = g_build_filename (dir, xserver_get_address (XSERVER (server)), NULL); g_free (dir); diff --git a/tests/Makefile.am b/tests/Makefile.am index ffb38656..d69aac1c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -6,6 +6,7 @@ TESTS = \ test-greeter-not-installed \ test-greeter-xserver-crash \ test-no-config \ + test-additional-config \ test-headless \ test-autologin \ test-autologin-in-background \ @@ -49,6 +50,8 @@ TESTS = \ test-system-xauthority \ test-user-renamed \ test-user-renamed-invalid \ + test-users-gobject \ + test-users-python \ test-keyboard-layout \ test-no-keyboard-layout \ test-language \ @@ -136,6 +139,7 @@ TESTS = \ test-no-accounts-service \ test-console-kit \ test-no-console-kit \ + test-login1 \ test-no-login1 \ test-no-console-kit-or-login1 \ test-gobject-power \ @@ -182,6 +186,7 @@ TESTS += \ test-login-qt4-guest-fail-setup-script \ test-login-qt4-guest-logout \ test-login-qt4-remote-session \ + test-users-qt4 \ test-qt4-power \ test-qt4-power-no-console-kit \ test-qt4-power-no-login1 \ @@ -215,10 +220,11 @@ TESTS += \ test-login-qt5-guest-fail-setup-script \ test-login-qt5-guest-logout \ test-login-qt5-remote-session \ - test-qt4-power \ - test-qt4-power-no-console-kit \ - test-qt4-power-no-login1 \ - test-qt4-power-no-services + test-users-qt5 \ + test-qt5-power \ + test-qt5-power-no-console-kit \ + test-qt5-power-no-login1 \ + test-qt5-power-no-services endif EXTRA_DIST = \ @@ -232,6 +238,9 @@ EXTRA_DIST = \ data/xgreeters/test-qt5-greeter.desktop \ data/xsessions/alternative.desktop \ data/xsessions/default.desktop \ + scripts/0-additional.conf \ + scripts/1-additional.conf \ + scripts/additional-config.conf \ scripts/autologin.conf \ scripts/autologin-guest.conf \ scripts/autologin-guest-fail-setup-script.conf \ @@ -274,6 +283,7 @@ EXTRA_DIST = \ scripts/lock-session.conf \ scripts/lock-session-no-password.conf \ scripts/lock-session-return-session.conf \ + scripts/login1.conf \ scripts/login.conf \ scripts/login-crash-authenticate.conf \ scripts/login-guest.conf \ @@ -339,6 +349,7 @@ EXTRA_DIST = \ scripts/switch-to-user-logout.conf \ scripts/switch-to-user-no-password.conf \ scripts/system-xauthority.conf \ + scripts/users.conf \ scripts/util-path.conf \ scripts/user-renamed.conf \ scripts/user-renamed-invalid.conf \ diff --git a/tests/scripts/0-additional.conf b/tests/scripts/0-additional.conf new file mode 100644 index 00000000..16dd53c5 --- /dev/null +++ b/tests/scripts/0-additional.conf @@ -0,0 +1,2 @@ +[SeatDefaults] +autologin-user=have-password1 diff --git a/tests/scripts/1-additional.conf b/tests/scripts/1-additional.conf new file mode 100644 index 00000000..07fa3d93 --- /dev/null +++ b/tests/scripts/1-additional.conf @@ -0,0 +1,2 @@ +[SeatDefaults] +autologin-user=have-password2 diff --git a/tests/scripts/additional-config.conf b/tests/scripts/additional-config.conf new file mode 100644 index 00000000..204ab890 --- /dev/null +++ b/tests/scripts/additional-config.conf @@ -0,0 +1,29 @@ +# +# Check LightDM runs without a config.d configuration +# + +[test-runner-config] +additional-config=0-additional.conf 1-additional.conf + +[SeatDefaults] +user-session=default + +#?RUNNER DAEMON-START + +# X server starts +#?XSERVER-0 START VT=7 +#?XSERVER-0 INDICATE-READY + +# LightDM connects to X server +#?XSERVER-0 ACCEPT-CONNECT + +# Session starts +#?SESSION-X-0 START USER=have-password2 +#?XSERVER-0 ACCEPT-CONNECT +#?SESSION-X-0 CONNECT-XSERVER + +# Cleanup +#?*STOP-DAEMON +#?SESSION-X-0 TERMINATE SIGNAL=15 +#?XSERVER-0 TERMINATE SIGNAL=15 +#?RUNNER DAEMON-EXIT STATUS=0 diff --git a/tests/scripts/autologin-guest-fail-setup-script.conf b/tests/scripts/autologin-guest-fail-setup-script.conf index f23b3f5f..c9573c9b 100644 --- a/tests/scripts/autologin-guest-fail-setup-script.conf +++ b/tests/scripts/autologin-guest-fail-setup-script.conf @@ -11,7 +11,7 @@ autologin-guest=true #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-guest-in-background.conf b/tests/scripts/autologin-guest-in-background.conf index 6048a03b..7dcea539 100644 --- a/tests/scripts/autologin-guest-in-background.conf +++ b/tests/scripts/autologin-guest-in-background.conf @@ -2,14 +2,18 @@ # Check automatically logs in guest while keeping a greeter up # +[LightDM] +disable-guest-wrapper=true + [SeatDefaults] autologin-guest=true autologin-in-background=true +user-session=default #?RUNNER DAEMON-START # Greeter starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT #?GREETER-X-0 START @@ -19,7 +23,7 @@ autologin-in-background=true #?GREETER-X-0 CONNECTED-TO-DAEMON # Guest session starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY #?XSERVER-1 ACCEPT-CONNECT #?GUEST-ACCOUNT ADD USERNAME=guest-.* diff --git a/tests/scripts/autologin-guest-logout.conf b/tests/scripts/autologin-guest-logout.conf index 2f643185..aefb7fd4 100644 --- a/tests/scripts/autologin-guest-logout.conf +++ b/tests/scripts/autologin-guest-logout.conf @@ -2,13 +2,17 @@ # Check automatically logs in default user # +[LightDM] +disable-guest-wrapper=true + [SeatDefaults] autologin-guest=true +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -32,7 +36,7 @@ autologin-guest=true #?GUEST-ACCOUNT REMOVE USERNAME=guest-.* # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-guest-timeout.conf b/tests/scripts/autologin-guest-timeout.conf index 1d449618..7342c5a2 100644 --- a/tests/scripts/autologin-guest-timeout.conf +++ b/tests/scripts/autologin-guest-timeout.conf @@ -2,14 +2,18 @@ # Check automatically logs in default user # +[LightDM] +disable-guest-wrapper=true + [SeatDefaults] autologin-guest=true autologin-user-timeout=1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-guest.conf b/tests/scripts/autologin-guest.conf index 0095af55..e7a1723b 100644 --- a/tests/scripts/autologin-guest.conf +++ b/tests/scripts/autologin-guest.conf @@ -2,13 +2,17 @@ # Check automatically logs in default user # +[LightDM] +disable-guest-wrapper=true + [SeatDefaults] autologin-guest=true +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-in-background.conf b/tests/scripts/autologin-in-background.conf index 9ec4f359..74f8b994 100644 --- a/tests/scripts/autologin-in-background.conf +++ b/tests/scripts/autologin-in-background.conf @@ -5,11 +5,12 @@ [SeatDefaults] autologin-user=have-password1 autologin-in-background=true +user-session=default #?RUNNER DAEMON-START # Greeter starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT #?GREETER-X-0 START @@ -19,7 +20,7 @@ autologin-in-background=true #?GREETER-X-0 CONNECTED-TO-DAEMON # Autologin session starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY #?XSERVER-1 ACCEPT-CONNECT #?SESSION-X-1 START USER=have-password1 diff --git a/tests/scripts/autologin-invalid-session.conf b/tests/scripts/autologin-invalid-session.conf index 62fe206d..8e881a8b 100644 --- a/tests/scripts/autologin-invalid-session.conf +++ b/tests/scripts/autologin-invalid-session.conf @@ -9,7 +9,7 @@ user-session=invalid #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-invalid-user.conf b/tests/scripts/autologin-invalid-user.conf index 25a8329d..7ce9cc20 100644 --- a/tests/scripts/autologin-invalid-user.conf +++ b/tests/scripts/autologin-invalid-user.conf @@ -8,7 +8,7 @@ autologin-user=invalid #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-logout.conf b/tests/scripts/autologin-logout.conf index ba841c7c..9588c9dc 100644 --- a/tests/scripts/autologin-logout.conf +++ b/tests/scripts/autologin-logout.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -26,7 +27,7 @@ autologin-user=have-password1 #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-new-authtok.conf b/tests/scripts/autologin-new-authtok.conf index 4407f49b..1f66bfc8 100644 --- a/tests/scripts/autologin-new-authtok.conf +++ b/tests/scripts/autologin-new-authtok.conf @@ -8,7 +8,7 @@ autologin-user=new-authtok #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-password.conf b/tests/scripts/autologin-password.conf index 8f1c3f45..e742456f 100644 --- a/tests/scripts/autologin-password.conf +++ b/tests/scripts/autologin-password.conf @@ -8,7 +8,7 @@ autologin-user=always-password #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-previous-session.conf b/tests/scripts/autologin-previous-session.conf index 3cad3cf5..aba2eb04 100644 --- a/tests/scripts/autologin-previous-session.conf +++ b/tests/scripts/autologin-previous-session.conf @@ -8,7 +8,7 @@ autologin-user=have-session #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-session-crash.conf b/tests/scripts/autologin-session-crash.conf index f843fc55..242dc7c2 100644 --- a/tests/scripts/autologin-session-crash.conf +++ b/tests/scripts/autologin-session-crash.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -26,7 +27,7 @@ autologin-user=have-password1 #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-session-error.conf b/tests/scripts/autologin-session-error.conf index 0b72aacc..c0e2a26f 100644 --- a/tests/scripts/autologin-session-error.conf +++ b/tests/scripts/autologin-session-error.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=session-error +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -20,7 +21,7 @@ autologin-user=session-error #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-timeout-in-background.conf b/tests/scripts/autologin-timeout-in-background.conf index 356c5623..9e3d8b6d 100644 --- a/tests/scripts/autologin-timeout-in-background.conf +++ b/tests/scripts/autologin-timeout-in-background.conf @@ -6,11 +6,12 @@ autologin-user=have-password1 autologin-user-timeout=1 autologin-in-background=true +user-session=default #?RUNNER DAEMON-START # Greeter starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT #?GREETER-X-0 START @@ -20,7 +21,7 @@ autologin-in-background=true #?GREETER-X-0 CONNECTED-TO-DAEMON # Autologin session starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY #?XSERVER-1 ACCEPT-CONNECT #?SESSION-X-1 START USER=have-password1 diff --git a/tests/scripts/autologin-timeout.conf b/tests/scripts/autologin-timeout.conf index abb99c2e..31f7f608 100644 --- a/tests/scripts/autologin-timeout.conf +++ b/tests/scripts/autologin-timeout.conf @@ -5,11 +5,12 @@ [SeatDefaults] autologin-user=have-password1 autologin-user-timeout=1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/autologin-xserver-crash.conf b/tests/scripts/autologin-xserver-crash.conf index 6fc24321..36ca845a 100644 --- a/tests/scripts/autologin-xserver-crash.conf +++ b/tests/scripts/autologin-xserver-crash.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # XServer starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -26,7 +27,7 @@ autologin-user=have-password1 #?SESSION-X-0 TERMINATE SIGNAL=15 # X server restarts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT diff --git a/tests/scripts/autologin.conf b/tests/scripts/autologin.conf index 10c5388c..6484f70d 100644 --- a/tests/scripts/autologin.conf +++ b/tests/scripts/autologin.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/cancel-authentication.conf b/tests/scripts/cancel-authentication.conf index 27213175..94f5e60c 100644 --- a/tests/scripts/cancel-authentication.conf +++ b/tests/scripts/cancel-authentication.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/change-authentication.conf b/tests/scripts/change-authentication.conf index f2ec30e5..a7b8fe6f 100644 --- a/tests/scripts/change-authentication.conf +++ b/tests/scripts/change-authentication.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/console-kit.conf b/tests/scripts/console-kit.conf index 38eaa9ea..890770d5 100644 --- a/tests/scripts/console-kit.conf +++ b/tests/scripts/console-kit.conf @@ -7,11 +7,12 @@ disable-login1=true [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/crash-authenticate.conf b/tests/scripts/crash-authenticate.conf index 84cc3a3d..5d9143d7 100644 --- a/tests/scripts/crash-authenticate.conf +++ b/tests/scripts/crash-authenticate.conf @@ -8,7 +8,7 @@ autologin-user=crash-authenticate #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/cred-error.conf b/tests/scripts/cred-error.conf index fe1c2458..9d44b3e1 100644 --- a/tests/scripts/cred-error.conf +++ b/tests/scripts/cred-error.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=cred-error +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -20,7 +21,7 @@ autologin-user=cred-error #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/cred-expired.conf b/tests/scripts/cred-expired.conf index 99e3bb42..98cb0c3b 100644 --- a/tests/scripts/cred-expired.conf +++ b/tests/scripts/cred-expired.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=cred-expired +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -20,7 +21,7 @@ autologin-user=cred-expired #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/cred-unavail.conf b/tests/scripts/cred-unavail.conf index 2cd0e088..82fcdb4b 100644 --- a/tests/scripts/cred-unavail.conf +++ b/tests/scripts/cred-unavail.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=cred-unavail +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -20,7 +21,7 @@ autologin-user=cred-unavail #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/denied.conf b/tests/scripts/denied.conf index 8ba7d6a4..0ead01e0 100644 --- a/tests/scripts/denied.conf +++ b/tests/scripts/denied.conf @@ -8,7 +8,7 @@ autologin-user=denied #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/expired.conf b/tests/scripts/expired.conf index b08e5c0e..11eed1d3 100644 --- a/tests/scripts/expired.conf +++ b/tests/scripts/expired.conf @@ -8,7 +8,7 @@ autologin-user=expired #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/greeter-fail-start.conf b/tests/scripts/greeter-fail-start.conf index 5e131d7a..aa49ba43 100644 --- a/tests/scripts/greeter-fail-start.conf +++ b/tests/scripts/greeter-fail-start.conf @@ -8,7 +8,7 @@ return-value=1 #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/greeter-not-installed.conf b/tests/scripts/greeter-not-installed.conf index b0590713..a8ad842b 100644 --- a/tests/scripts/greeter-not-installed.conf +++ b/tests/scripts/greeter-not-installed.conf @@ -8,7 +8,7 @@ return-value=1 #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/greeter-xserver-crash.conf b/tests/scripts/greeter-xserver-crash.conf index 251b1bc6..8930e897 100644 --- a/tests/scripts/greeter-xserver-crash.conf +++ b/tests/scripts/greeter-xserver-crash.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -25,7 +25,7 @@ #?GREETER-X-0 TERMINATE SIGNAL=15 # X server restarts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/group-membership.conf b/tests/scripts/group-membership.conf index 82873727..63a82a13 100644 --- a/tests/scripts/group-membership.conf +++ b/tests/scripts/group-membership.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=group-member +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/home-dir-on-authenticate.conf b/tests/scripts/home-dir-on-authenticate.conf index f440bfe2..851ec0c2 100644 --- a/tests/scripts/home-dir-on-authenticate.conf +++ b/tests/scripts/home-dir-on-authenticate.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=mount-home-dir +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/home-dir-on-session.conf b/tests/scripts/home-dir-on-session.conf index cdd3254e..c65892ef 100644 --- a/tests/scripts/home-dir-on-session.conf +++ b/tests/scripts/home-dir-on-session.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=make-home-dir +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/keyboard-layout.conf b/tests/scripts/keyboard-layout.conf index d7e83611..2830b579 100644 --- a/tests/scripts/keyboard-layout.conf +++ b/tests/scripts/keyboard-layout.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/language-no-accounts-service.conf b/tests/scripts/language-no-accounts-service.conf index 195dcdc8..53090872 100644 --- a/tests/scripts/language-no-accounts-service.conf +++ b/tests/scripts/language-no-accounts-service.conf @@ -8,7 +8,7 @@ disable-accounts-service=true #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/language.conf b/tests/scripts/language.conf index e5dc220a..bb395695 100644 --- a/tests/scripts/language.conf +++ b/tests/scripts/language.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/lock-seat-return-session.conf b/tests/scripts/lock-seat-return-session.conf index de3e2baa..e32b3597 100644 --- a/tests/scripts/lock-seat-return-session.conf +++ b/tests/scripts/lock-seat-return-session.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -24,7 +25,7 @@ autologin-user=have-password1 #?SESSION-X-0 LOCK-SEAT # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/lock-seat.conf b/tests/scripts/lock-seat.conf index 1ffc41ed..37a15b52 100644 --- a/tests/scripts/lock-seat.conf +++ b/tests/scripts/lock-seat.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -24,7 +25,7 @@ autologin-user=have-password1 #?SESSION-X-0 LOCK-SEAT # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/lock-session-no-password.conf b/tests/scripts/lock-session-no-password.conf index 87c2810b..84aa7a13 100644 --- a/tests/scripts/lock-session-no-password.conf +++ b/tests/scripts/lock-session-no-password.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=no-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -24,7 +25,7 @@ autologin-user=no-password1 #?SESSION-X-0 LOCK-SESSION # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/lock-session-return-session.conf b/tests/scripts/lock-session-return-session.conf index 08d29d17..0b9061f9 100644 --- a/tests/scripts/lock-session-return-session.conf +++ b/tests/scripts/lock-session-return-session.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -24,7 +25,7 @@ autologin-user=have-password1 #?SESSION-X-0 LOCK-SESSION # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/lock-session.conf b/tests/scripts/lock-session.conf index c832110b..f2969f35 100644 --- a/tests/scripts/lock-session.conf +++ b/tests/scripts/lock-session.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -24,7 +25,7 @@ autologin-user=have-password1 #?SESSION-X-0 LOCK-SESSION # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-crash-authenticate.conf b/tests/scripts/login-crash-authenticate.conf index f12a11f5..7edf3e23 100644 --- a/tests/scripts/login-crash-authenticate.conf +++ b/tests/scripts/login-crash-authenticate.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-guest-disabled.conf b/tests/scripts/login-guest-disabled.conf index cb53acff..a278be53 100644 --- a/tests/scripts/login-guest-disabled.conf +++ b/tests/scripts/login-guest-disabled.conf @@ -8,7 +8,7 @@ allow-guest=false #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-guest-fail-setup-script.conf b/tests/scripts/login-guest-fail-setup-script.conf index 4d15aed0..5738e265 100644 --- a/tests/scripts/login-guest-fail-setup-script.conf +++ b/tests/scripts/login-guest-fail-setup-script.conf @@ -8,7 +8,7 @@ guest-account-script=false #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -33,7 +33,7 @@ guest-account-script=false #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-guest-logout.conf b/tests/scripts/login-guest-logout.conf index 4be92480..c69c7b9b 100644 --- a/tests/scripts/login-guest-logout.conf +++ b/tests/scripts/login-guest-logout.conf @@ -2,10 +2,16 @@ # Check automatically logs in default user # +[LightDM] +disable-guest-wrapper=true + +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -42,7 +48,7 @@ #?GUEST-ACCOUNT REMOVE USERNAME=guest-.* # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-guest-no-setup-script.conf b/tests/scripts/login-guest-no-setup-script.conf index cdad799b..86324588 100644 --- a/tests/scripts/login-guest-no-setup-script.conf +++ b/tests/scripts/login-guest-no-setup-script.conf @@ -8,7 +8,7 @@ guest-account-script= #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-guest.conf b/tests/scripts/login-guest.conf index 020ddcaf..804c3272 100644 --- a/tests/scripts/login-guest.conf +++ b/tests/scripts/login-guest.conf @@ -2,10 +2,16 @@ # Check can login as guest (not prompted for password) # +[LightDM] +disable-guest-wrapper=true + +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-info-prompt.conf b/tests/scripts/login-info-prompt.conf index d4b0b38d..1a12c036 100644 --- a/tests/scripts/login-info-prompt.conf +++ b/tests/scripts/login-info-prompt.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-invalid-session.conf b/tests/scripts/login-invalid-session.conf index 058ea64d..f08eb2e4 100644 --- a/tests/scripts/login-invalid-session.conf +++ b/tests/scripts/login-invalid-session.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -30,7 +30,7 @@ #?XSERVER-0 TERMINATE SIGNAL=15 # X server restarts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-invalid-user.conf b/tests/scripts/login-invalid-user.conf index 04ba79be..231b9fd7 100644 --- a/tests/scripts/login-invalid-user.conf +++ b/tests/scripts/login-invalid-user.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-logout.conf b/tests/scripts/login-logout.conf index 5b50d7fa..31210264 100644 --- a/tests/scripts/login-logout.conf +++ b/tests/scripts/login-logout.conf @@ -2,10 +2,13 @@ # Check logging out returns to the greeter # +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -38,7 +41,7 @@ #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-long-password.conf b/tests/scripts/login-long-password.conf index 74ac5c95..9a6d6f6a 100644 --- a/tests/scripts/login-long-password.conf +++ b/tests/scripts/login-long-password.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-long-username.conf b/tests/scripts/login-long-username.conf index 85b77271..9da48179 100644 --- a/tests/scripts/login-long-username.conf +++ b/tests/scripts/login-long-username.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-manual-previous-session.conf b/tests/scripts/login-manual-previous-session.conf index 9de99876..929ec67f 100644 --- a/tests/scripts/login-manual-previous-session.conf +++ b/tests/scripts/login-manual-previous-session.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-manual.conf b/tests/scripts/login-manual.conf index 6baa8052..22a0a4fc 100644 --- a/tests/scripts/login-manual.conf +++ b/tests/scripts/login-manual.conf @@ -2,10 +2,13 @@ # Check can login without a username, and is prompted for one # +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-multi-info-prompt.conf b/tests/scripts/login-multi-info-prompt.conf index 469c4add..f823b6a9 100644 --- a/tests/scripts/login-multi-info-prompt.conf +++ b/tests/scripts/login-multi-info-prompt.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-multi-prompt.conf b/tests/scripts/login-multi-prompt.conf index 6178eeb3..321bbbee 100644 --- a/tests/scripts/login-multi-prompt.conf +++ b/tests/scripts/login-multi-prompt.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-new-authtok.conf b/tests/scripts/login-new-authtok.conf index af7ce220..c1234d45 100644 --- a/tests/scripts/login-new-authtok.conf +++ b/tests/scripts/login-new-authtok.conf @@ -2,10 +2,13 @@ # Check prompted to change password # +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-no-password.conf b/tests/scripts/login-no-password.conf index ab4aa81d..a309f2ae 100644 --- a/tests/scripts/login-no-password.conf +++ b/tests/scripts/login-no-password.conf @@ -2,10 +2,13 @@ # Check can login without password for accounts that do not have a password # +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-pam.conf b/tests/scripts/login-pam.conf index de0e4371..2ba4eab9 100644 --- a/tests/scripts/login-pam.conf +++ b/tests/scripts/login-pam.conf @@ -2,10 +2,13 @@ # Check we handle conversations during each PAM method # +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-pick-session.conf b/tests/scripts/login-pick-session.conf index ae50986a..bc566557 100644 --- a/tests/scripts/login-pick-session.conf +++ b/tests/scripts/login-pick-session.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-previous-session.conf b/tests/scripts/login-previous-session.conf index 7caf0a8c..fc46bd31 100644 --- a/tests/scripts/login-previous-session.conf +++ b/tests/scripts/login-previous-session.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-remote-session.conf b/tests/scripts/login-remote-session.conf index 44f48ceb..12dd9ddb 100644 --- a/tests/scripts/login-remote-session.conf +++ b/tests/scripts/login-remote-session.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-session-crash.conf b/tests/scripts/login-session-crash.conf index 935673f9..867dc25d 100644 --- a/tests/scripts/login-session-crash.conf +++ b/tests/scripts/login-session-crash.conf @@ -2,10 +2,13 @@ # Check if session crashes then returned to greeter # +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -38,7 +41,7 @@ #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-two-factor.conf b/tests/scripts/login-two-factor.conf index 762e0bb7..2aae4da6 100644 --- a/tests/scripts/login-two-factor.conf +++ b/tests/scripts/login-two-factor.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-wrong-password.conf b/tests/scripts/login-wrong-password.conf index 27bc938c..6cdd19ee 100644 --- a/tests/scripts/login-wrong-password.conf +++ b/tests/scripts/login-wrong-password.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login-xserver-crash.conf b/tests/scripts/login-xserver-crash.conf index 2c18b145..01d779b1 100644 --- a/tests/scripts/login-xserver-crash.conf +++ b/tests/scripts/login-xserver-crash.conf @@ -2,10 +2,13 @@ # Check LightDM returns to the greeter if the X server crashes inside a session # +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # XServer starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -38,7 +41,7 @@ #?SESSION-X-0 TERMINATE SIGNAL=15 # X server restarts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT diff --git a/tests/scripts/login.conf b/tests/scripts/login.conf index 4b2aefbc..5a09050e 100644 --- a/tests/scripts/login.conf +++ b/tests/scripts/login.conf @@ -2,10 +2,13 @@ # Check can login # +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/login1.conf b/tests/scripts/login1.conf new file mode 100644 index 00000000..f00950dc --- /dev/null +++ b/tests/scripts/login1.conf @@ -0,0 +1,33 @@ +# +# Check logind variables are set in session +# + +[SeatDefaults] +autologin-user=have-password1 +user-session=default + +#?RUNNER DAEMON-START + +# X server starts +#?XSERVER-0 START VT=7 +#?XSERVER-0 INDICATE-READY + +# LightDM connects to X server +#?XSERVER-0 ACCEPT-CONNECT + +# Session starts +#?SESSION-X-0 START USER=have-password1 +#?XSERVER-0 ACCEPT-CONNECT +#?SESSION-X-0 CONNECT-XSERVER + +# Check environment variables +#?*SESSION-X-0 READ-ENV NAME=XDG_SEAT +#?SESSION-X-0 READ-ENV NAME=XDG_SEAT VALUE=seat0 +#?*SESSION-X-0 READ-ENV NAME=XDG_VTNR +#?SESSION-X-0 READ-ENV NAME=XDG_VTNR VALUE=7 + +# Cleanup +#?*STOP-DAEMON +#?SESSION-X-0 TERMINATE SIGNAL=15 +#?XSERVER-0 TERMINATE SIGNAL=15 +#?RUNNER DAEMON-EXIT STATUS=0 diff --git a/tests/scripts/no-accounts-service.conf b/tests/scripts/no-accounts-service.conf index f6653f5c..b519fdc1 100644 --- a/tests/scripts/no-accounts-service.conf +++ b/tests/scripts/no-accounts-service.conf @@ -7,11 +7,12 @@ disable-accounts-service=true [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/no-config.conf b/tests/scripts/no-config.conf index 1b431b47..6419a7d8 100644 --- a/tests/scripts/no-config.conf +++ b/tests/scripts/no-config.conf @@ -8,7 +8,7 @@ have-config=false #?RUNNER DAEMON-START # One X server should start by default -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/no-console-kit-or-login1.conf b/tests/scripts/no-console-kit-or-login1.conf index 07d80c77..cd938768 100644 --- a/tests/scripts/no-console-kit-or-login1.conf +++ b/tests/scripts/no-console-kit-or-login1.conf @@ -8,11 +8,12 @@ disable-login1=true [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/no-console-kit.conf b/tests/scripts/no-console-kit.conf index 8ce8c5a2..de916d1c 100644 --- a/tests/scripts/no-console-kit.conf +++ b/tests/scripts/no-console-kit.conf @@ -7,11 +7,12 @@ disable-console-kit=true [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/no-keyboard-layout.conf b/tests/scripts/no-keyboard-layout.conf index d6a871f8..eeb0f5ca 100644 --- a/tests/scripts/no-keyboard-layout.conf +++ b/tests/scripts/no-keyboard-layout.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/no-language.conf b/tests/scripts/no-language.conf index 492922e7..c619978e 100644 --- a/tests/scripts/no-language.conf +++ b/tests/scripts/no-language.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/no-login1.conf b/tests/scripts/no-login1.conf index e908c817..3780bee4 100644 --- a/tests/scripts/no-login1.conf +++ b/tests/scripts/no-login1.conf @@ -7,11 +7,12 @@ disable-login1=true [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/open-file-descriptors.conf b/tests/scripts/open-file-descriptors.conf index cee5ee93..62613088 100644 --- a/tests/scripts/open-file-descriptors.conf +++ b/tests/scripts/open-file-descriptors.conf @@ -3,10 +3,13 @@ # Use a greeter so its file descriptors are around at the time the session starts. # +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/pam.conf b/tests/scripts/pam.conf index 35655ef3..04177326 100644 --- a/tests/scripts/pam.conf +++ b/tests/scripts/pam.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=log-pam +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/plymouth-active-vt.conf b/tests/scripts/plymouth-active-vt.conf index 905b3d20..43daef1f 100644 --- a/tests/scripts/plymouth-active-vt.conf +++ b/tests/scripts/plymouth-active-vt.conf @@ -15,7 +15,7 @@ active=true #?PLYMOUTH DEACTIVATE # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # Plymouth quits but keeps image in framebuffer diff --git a/tests/scripts/plymouth-inactive-vt.conf b/tests/scripts/plymouth-inactive-vt.conf index 017cdcce..d1fd2a6d 100644 --- a/tests/scripts/plymouth-inactive-vt.conf +++ b/tests/scripts/plymouth-inactive-vt.conf @@ -12,7 +12,7 @@ active=true #?PLYMOUTH PING ACTIVE=TRUE #?PLYMOUTH HAS-ACTIVE-VT=FALSE #?PLYMOUTH QUIT RETAIN-SPLASH=FALSE -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/power-no-console-kit.conf b/tests/scripts/power-no-console-kit.conf index e08f7074..77e06412 100644 --- a/tests/scripts/power-no-console-kit.conf +++ b/tests/scripts/power-no-console-kit.conf @@ -8,7 +8,7 @@ disable-console-kit=true #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/power-no-login1.conf b/tests/scripts/power-no-login1.conf index ed996d3c..f5044b18 100644 --- a/tests/scripts/power-no-login1.conf +++ b/tests/scripts/power-no-login1.conf @@ -8,7 +8,7 @@ disable-login1=true #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/power-no-services.conf b/tests/scripts/power-no-services.conf index 613f2a3e..603ced42 100644 --- a/tests/scripts/power-no-services.conf +++ b/tests/scripts/power-no-services.conf @@ -10,7 +10,7 @@ disable-login1=true #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/power.conf b/tests/scripts/power.conf index d909884d..d2ea20bb 100644 --- a/tests/scripts/power.conf +++ b/tests/scripts/power.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/restart-authentication.conf b/tests/scripts/restart-authentication.conf index a7b71164..88755780 100644 --- a/tests/scripts/restart-authentication.conf +++ b/tests/scripts/restart-authentication.conf @@ -5,7 +5,7 @@ #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/script-hook-fail-display-setup.conf b/tests/scripts/script-hook-fail-display-setup.conf index 1b3012c9..e9e39124 100644 --- a/tests/scripts/script-hook-fail-display-setup.conf +++ b/tests/scripts/script-hook-fail-display-setup.conf @@ -8,7 +8,7 @@ display-setup-script=test-script-hook DISPLAY-SETUP 1 #?RUNNER DAEMON-START # One X server should start by default -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/script-hook-fail-greeter-setup.conf b/tests/scripts/script-hook-fail-greeter-setup.conf index 464875e0..701a41a4 100644 --- a/tests/scripts/script-hook-fail-greeter-setup.conf +++ b/tests/scripts/script-hook-fail-greeter-setup.conf @@ -8,7 +8,7 @@ greeter-setup-script=test-script-hook GREETER-SETUP 1 #?RUNNER DAEMON-START # One X server should start by default -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/script-hook-fail-session-setup.conf b/tests/scripts/script-hook-fail-session-setup.conf index 81519cac..7c7f6ea6 100644 --- a/tests/scripts/script-hook-fail-session-setup.conf +++ b/tests/scripts/script-hook-fail-session-setup.conf @@ -9,7 +9,7 @@ autologin-user=have-password1 #?RUNNER DAEMON-START # One X server should start by default -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/script-hooks.conf b/tests/scripts/script-hooks.conf index 984ef3aa..a6e670ba 100644 --- a/tests/scripts/script-hooks.conf +++ b/tests/scripts/script-hooks.conf @@ -8,11 +8,12 @@ greeter-setup-script=test-script-hook GREETER-SETUP session-setup-script=test-script-hook SESSION-SETUP session-cleanup-script=test-script-hook SESSION-CLEANUP autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # One X server should start by default -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -37,7 +38,7 @@ autologin-user=have-password1 #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/session-stderr-backup.conf b/tests/scripts/session-stderr-backup.conf index c0690774..7f7a12a2 100644 --- a/tests/scripts/session-stderr-backup.conf +++ b/tests/scripts/session-stderr-backup.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=no-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -27,7 +28,7 @@ autologin-user=no-password1 # Restart session #?*SESSION-X-0 LOGOUT #?XSERVER-0 TERMINATE SIGNAL=15 -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT #?GREETER-X-0 START @@ -55,7 +56,7 @@ autologin-user=no-password1 # Restart session #?*SESSION-X-0 LOGOUT #?XSERVER-0 TERMINATE SIGNAL=15 -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT #?GREETER-X-0 START diff --git a/tests/scripts/session-stderr-multi-write.conf b/tests/scripts/session-stderr-multi-write.conf index 4b26e161..f107c624 100644 --- a/tests/scripts/session-stderr-multi-write.conf +++ b/tests/scripts/session-stderr-multi-write.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/session-stderr.conf b/tests/scripts/session-stderr.conf index fddea59e..57008242 100644 --- a/tests/scripts/session-stderr.conf +++ b/tests/scripts/session-stderr.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/session-stdout.conf b/tests/scripts/session-stdout.conf index bf3dc97b..37074b67 100644 --- a/tests/scripts/session-stdout.conf +++ b/tests/scripts/session-stdout.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/switch-to-greeter-new-session-logout-new.conf b/tests/scripts/switch-to-greeter-new-session-logout-new.conf index ed59e728..32eb1125 100644 --- a/tests/scripts/switch-to-greeter-new-session-logout-new.conf +++ b/tests/scripts/switch-to-greeter-new-session-logout-new.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT @@ -22,7 +23,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-GREETER # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server @@ -53,7 +54,7 @@ autologin-user=have-password1 #?XSERVER-1 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY #?XSERVER-1 ACCEPT-CONNECT diff --git a/tests/scripts/switch-to-greeter-new-session-logout-old.conf b/tests/scripts/switch-to-greeter-new-session-logout-old.conf index 2fe64f75..b9059fc7 100644 --- a/tests/scripts/switch-to-greeter-new-session-logout-old.conf +++ b/tests/scripts/switch-to-greeter-new-session-logout-old.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT @@ -22,7 +23,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-GREETER # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server @@ -57,7 +58,7 @@ autologin-user=have-password1 #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT diff --git a/tests/scripts/switch-to-greeter-new-session.conf b/tests/scripts/switch-to-greeter-new-session.conf index 83ced4d0..6f0f5e79 100644 --- a/tests/scripts/switch-to-greeter-new-session.conf +++ b/tests/scripts/switch-to-greeter-new-session.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -24,7 +25,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-GREETER # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/switch-to-greeter-return-session-logout.conf b/tests/scripts/switch-to-greeter-return-session-logout.conf index bb62c6f0..91332062 100644 --- a/tests/scripts/switch-to-greeter-return-session-logout.conf +++ b/tests/scripts/switch-to-greeter-return-session-logout.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -24,7 +25,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-GREETER # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server @@ -53,7 +54,7 @@ autologin-user=have-password1 #?XSERVER-0 TERMINATE SIGNAL=15 # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT diff --git a/tests/scripts/switch-to-greeter-return-session.conf b/tests/scripts/switch-to-greeter-return-session.conf index 9c4fdee7..be80d0d2 100644 --- a/tests/scripts/switch-to-greeter-return-session.conf +++ b/tests/scripts/switch-to-greeter-return-session.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -24,7 +25,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-GREETER # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/switch-to-greeter.conf b/tests/scripts/switch-to-greeter.conf index 4ae3e11f..2c19fe3f 100644 --- a/tests/scripts/switch-to-greeter.conf +++ b/tests/scripts/switch-to-greeter.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -24,7 +25,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-GREETER # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/switch-to-guest.conf b/tests/scripts/switch-to-guest.conf index 4a3a899c..b2ae94c2 100644 --- a/tests/scripts/switch-to-guest.conf +++ b/tests/scripts/switch-to-guest.conf @@ -2,14 +2,18 @@ # Check D-Bus interface can trigger/switch to guest session # +[LightDM] +disable-guest-wrapper=true + [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START #?*WAIT # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -25,7 +29,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-GUEST # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/switch-to-user-existing-session.conf b/tests/scripts/switch-to-user-existing-session.conf index 001bb7d7..4ad54882 100644 --- a/tests/scripts/switch-to-user-existing-session.conf +++ b/tests/scripts/switch-to-user-existing-session.conf @@ -4,12 +4,13 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START #?*WAIT # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -25,7 +26,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-USER USERNAME=have-password1 # Nothing happends -#?*WAIT 1 +#?*WAIT # Cleanup #?*STOP-DAEMON diff --git a/tests/scripts/switch-to-user-logout.conf b/tests/scripts/switch-to-user-logout.conf index 0670ce14..fdf3976f 100644 --- a/tests/scripts/switch-to-user-logout.conf +++ b/tests/scripts/switch-to-user-logout.conf @@ -4,12 +4,13 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START #?*WAIT # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -25,7 +26,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-USER USERNAME=no-password1 # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server @@ -43,7 +44,7 @@ autologin-user=have-password1 #?XSERVER-1 TERMINATE SIGNAL=15 # X server starts for greeter -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/switch-to-user-no-password.conf b/tests/scripts/switch-to-user-no-password.conf index 47cc3ebc..d1cde5b8 100644 --- a/tests/scripts/switch-to-user-no-password.conf +++ b/tests/scripts/switch-to-user-no-password.conf @@ -4,12 +4,13 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START #?*WAIT # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -25,7 +26,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-USER USERNAME=no-password1 # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/switch-to-user.conf b/tests/scripts/switch-to-user.conf index e221bc60..f29a43a1 100644 --- a/tests/scripts/switch-to-user.conf +++ b/tests/scripts/switch-to-user.conf @@ -4,12 +4,13 @@ [SeatDefaults] autologin-user=no-password1 +user-session=default #?RUNNER DAEMON-START #?*WAIT # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -25,7 +26,7 @@ autologin-user=no-password1 #?RUNNER SWITCH-TO-USER USERNAME=have-password1 # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/switch-to-users.conf b/tests/scripts/switch-to-users.conf index efe23de6..6a42bc34 100644 --- a/tests/scripts/switch-to-users.conf +++ b/tests/scripts/switch-to-users.conf @@ -4,12 +4,13 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START #?*WAIT # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server @@ -25,7 +26,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-USER USERNAME=no-password1 # New X server starts -#?XSERVER-1 START +#?XSERVER-1 START VT=8 #?XSERVER-1 INDICATE-READY # LightDM connects to X server @@ -41,7 +42,7 @@ autologin-user=have-password1 #?RUNNER SWITCH-TO-USER USERNAME=no-password2 # New X server starts -#?XSERVER-2 START +#?XSERVER-2 START VT=9 #?XSERVER-2 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/system-xauthority.conf b/tests/scripts/system-xauthority.conf index 0e196089..0aa5a672 100644 --- a/tests/scripts/system-xauthority.conf +++ b/tests/scripts/system-xauthority.conf @@ -7,11 +7,12 @@ user-authority-in-system-dir=true [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/user-renamed-invalid.conf b/tests/scripts/user-renamed-invalid.conf index 1d913106..ff9d0d61 100644 --- a/tests/scripts/user-renamed-invalid.conf +++ b/tests/scripts/user-renamed-invalid.conf @@ -8,7 +8,7 @@ autologin-user=change-user-invalid #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/user-renamed.conf b/tests/scripts/user-renamed.conf index 84ee3574..3bddb79b 100644 --- a/tests/scripts/user-renamed.conf +++ b/tests/scripts/user-renamed.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=change-user1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/users.conf b/tests/scripts/users.conf new file mode 100644 index 00000000..db3ddee7 --- /dev/null +++ b/tests/scripts/users.conf @@ -0,0 +1,58 @@ +# +# Check can use greeter user API +# + +[test-runner-config] +accounts-service-user-filter=have-password1 have-password2 + +[test-greeter-config] +log-user-changes=true + +#?RUNNER DAEMON-START + +# X server starts +#?XSERVER-0 START VT=7 +#?XSERVER-0 INDICATE-READY + +# LightDM connects to X server +#?XSERVER-0 ACCEPT-CONNECT + +# Greeter starts +#?GREETER-X-0 START +#?XSERVER-0 ACCEPT-CONNECT +#?GREETER-X-0 CONNECT-XSERVER +#?GREETER-X-0 CONNECT-TO-DAEMON +#?GREETER-X-0 CONNECTED-TO-DAEMON + +# Check user list is as expected +#?*GREETER-X-0 LOG-USER-LIST-LENGTH +#?GREETER-X-0 LOG-USER-LIST-LENGTH N=2 +#?*GREETER-X-0 LOG-USER USERNAME=have-password1 +#?GREETER-X-0 LOG-USER USERNAME=have-password1 +#?*GREETER-X-0 LOG-USER-LIST +#?GREETER-X-0 LOG-USER USERNAME=have-password1 +#?GREETER-X-0 LOG-USER USERNAME=have-password2 + +# Add a user +#?*ADD-USER USERNAME=have-password3 +#?RUNNER ADD-USER USERNAME=have-password3 +#?GREETER-X-0 USER-ADDED USERNAME=have-password3 +#?*GREETER-X-0 LOG-USER-LIST-LENGTH +#?GREETER-X-0 LOG-USER-LIST-LENGTH N=3 +#?*GREETER-X-0 LOG-USER-LIST +#?GREETER-X-0 LOG-USER USERNAME=have-password1 +#?GREETER-X-0 LOG-USER USERNAME=have-password2 +#?GREETER-X-0 LOG-USER USERNAME=have-password3 + +# Remove a user +#?*DELETE-USER USERNAME=have-password3 +#?RUNNER DELETE-USER USERNAME=have-password3 +#?GREETER-X-0 USER-REMOVED USERNAME=have-password3 +#?*GREETER-X-0 LOG-USER-LIST-LENGTH +#?GREETER-X-0 LOG-USER-LIST-LENGTH N=2 + +# Cleanup +#?*STOP-DAEMON +#?GREETER-X-0 TERMINATE SIGNAL=15 +#?XSERVER-0 TERMINATE SIGNAL=15 +#?RUNNER DAEMON-EXIT STATUS=0 diff --git a/tests/scripts/util-path.conf b/tests/scripts/util-path.conf index 0b195a30..53fa4d11 100644 --- a/tests/scripts/util-path.conf +++ b/tests/scripts/util-path.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/vnc-command.conf b/tests/scripts/vnc-command.conf index 5586ac6b..678cd652 100644 --- a/tests/scripts/vnc-command.conf +++ b/tests/scripts/vnc-command.conf @@ -11,7 +11,7 @@ port=9999 command=Xvnc -option #?RUNNER DAEMON-START -#?*WAIT 1 +#?*WAIT # Start a VNC client #?*START-VNC-CLIENT ARGS="::9999" diff --git a/tests/scripts/vnc-dimensions.conf b/tests/scripts/vnc-dimensions.conf index 93b16f0d..16ecab85 100644 --- a/tests/scripts/vnc-dimensions.conf +++ b/tests/scripts/vnc-dimensions.conf @@ -13,7 +13,7 @@ height=900 depth=16 #?RUNNER DAEMON-START -#?*WAIT 1 +#?*WAIT # Start a VNC client #?*START-VNC-CLIENT ARGS="::9999" diff --git a/tests/scripts/vnc-login.conf b/tests/scripts/vnc-login.conf index f62e0a80..b47e052c 100644 --- a/tests/scripts/vnc-login.conf +++ b/tests/scripts/vnc-login.conf @@ -9,8 +9,11 @@ start-default-seat=false enabled=true port=9999 +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START -#?*WAIT 1 +#?*WAIT # Start a VNC client #?*START-VNC-CLIENT ARGS="::9999" diff --git a/tests/scripts/vnc-open-file-descriptors.conf b/tests/scripts/vnc-open-file-descriptors.conf index b77bdb81..57d74832 100644 --- a/tests/scripts/vnc-open-file-descriptors.conf +++ b/tests/scripts/vnc-open-file-descriptors.conf @@ -9,8 +9,11 @@ start-default-seat=false enabled=true port=9999 +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START -#?*WAIT 1 +#?*WAIT # Start a VNC client #?*START-VNC-CLIENT ARGS="::9999" diff --git a/tests/scripts/xauthority.conf b/tests/scripts/xauthority.conf index 790cde14..aa895a55 100644 --- a/tests/scripts/xauthority.conf +++ b/tests/scripts/xauthority.conf @@ -4,11 +4,12 @@ [SeatDefaults] autologin-user=have-password1 +user-session=default #?RUNNER DAEMON-START # X server starts -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 INDICATE-READY # LightDM connects to X server diff --git a/tests/scripts/xdmcp-login.conf b/tests/scripts/xdmcp-login.conf index 13f6d621..e6d54a45 100644 --- a/tests/scripts/xdmcp-login.conf +++ b/tests/scripts/xdmcp-login.conf @@ -9,8 +9,11 @@ start-default-seat=false enabled=true port=9999 +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START -#?*WAIT 1 +#?*WAIT # Start a remote X server to log in with XDMCP #?*START-XSERVER ARGS=":98 -query localhost -port 9999 -nolisten unix" diff --git a/tests/scripts/xdmcp-open-file-descriptors.conf b/tests/scripts/xdmcp-open-file-descriptors.conf index 78073936..ad2fccf8 100644 --- a/tests/scripts/xdmcp-open-file-descriptors.conf +++ b/tests/scripts/xdmcp-open-file-descriptors.conf @@ -9,8 +9,11 @@ start-default-seat=false enabled=true port=9999 +[SeatDefaults] +user-session=default + #?RUNNER DAEMON-START -#?*WAIT 1 +#?*WAIT # Start a remote X server to log in with XDMCP #?*START-XSERVER ARGS=":98 -query localhost -port 9999 -nolisten unix" diff --git a/tests/scripts/xserver-fail-start.conf b/tests/scripts/xserver-fail-start.conf index 1ea8ea42..129fdaad 100644 --- a/tests/scripts/xserver-fail-start.conf +++ b/tests/scripts/xserver-fail-start.conf @@ -8,7 +8,7 @@ return-value=1 #?RUNNER DAEMON-START # X server fails to start -#?XSERVER-0 START +#?XSERVER-0 START VT=7 #?XSERVER-0 EXIT CODE=1 # Daemon stops with error diff --git a/tests/src/Makefile.am b/tests/src/Makefile.am index 586059b2..0e202e94 100644 --- a/tests/src/Makefile.am +++ b/tests/src/Makefile.am @@ -8,6 +8,8 @@ libsystem_la_CFLAGS = \ $(GIO_UNIX_CFLAGS) \ -DSRCDIR=\"$(abs_top_srcdir)\" \ -DBUILDDIR=\"$(abs_top_builddir)\" \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DLOCALSTATEDIR=\"$(localstatedir)\" \ -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" libsystem_la_LIBADD = -ldl $(GLIB_LIBS) $(GIO_UNIX_LIBS) @@ -184,3 +186,16 @@ vnc_client_LDADD = \ CLEANFILES = \ test-qt4-greeter_moc4.cpp \ test-qt5-greeter_moc5.cpp + +# Support pretty printing MOC +AM_V_MOC4 = $(am__v_MOC4_$(V)) +am__v_MOC4_ = $(am__v_MOC4_$(AM_DEFAULT_VERBOSITY)) +am__v_MOC4_0 = @echo " MOC4 " $@; +%_moc4.cpp: QLightDM/%.h + $(AM_V_MOC4) $(MOC4) $< -o $@ + +AM_V_MOC5 = $(am__v_MOC5_$(V)) +am__v_MOC5_ = $(am__v_MOC5_$(AM_DEFAULT_VERBOSITY)) +am__v_MOC5_0 = @echo " MOC5 " $@; +%_moc5.cpp: QLightDM/%.h + $(AM_V_MOC5) $(MOC5) $< -o $@ diff --git a/tests/src/X.c b/tests/src/X.c index 86ae768d..5746d7a0 100644 --- a/tests/src/X.c +++ b/tests/src/X.c @@ -27,6 +27,9 @@ static gchar *auth_path = NULL; /* Display number being served */ static int display_number = 0; +/* VT being run on */ +static int vt_number = -1; + /* X server */ static XServer *xserver = NULL; @@ -38,7 +41,7 @@ static guint16 xdmcp_cookie_length = 0; static guint8 *xdmcp_cookie = NULL; static void -cleanup () +cleanup (void) { if (lock_path) unlink (lock_path); @@ -56,7 +59,7 @@ quit (int status) } static void -indicate_ready () +indicate_ready (void) { void *handler; handler = signal (SIGUSR1, SIG_IGN); @@ -192,13 +195,12 @@ main (int argc, char **argv) { int i; char *pid_string; - gboolean listen_tcp = TRUE; - gboolean listen_unix = TRUE; gboolean do_xdmcp = FALSE; guint xdmcp_port = 0; gchar *xdmcp_host = NULL; gchar *lock_filename; int lock_file; + GString *status_text; signal (SIGINT, signal_cb); signal (SIGTERM, signal_cb); @@ -230,9 +232,9 @@ main (int argc, char **argv) char *protocol = argv[i+1]; i++; if (strcmp (protocol, "tcp") == 0) - listen_tcp = FALSE; + ;//listen_tcp = FALSE; else if (strcmp (protocol, "unix") == 0) - listen_unix = FALSE; + ;//listen_unix = FALSE; } else if (strcmp (arg, "-nr") == 0) { @@ -259,7 +261,7 @@ main (int argc, char **argv) } else if (g_str_has_prefix (arg, "vt")) { - /* Ignore VT args */ + vt_number = atoi (arg + 2); } else if (g_str_has_prefix (arg, "-novtswitch")) { @@ -286,7 +288,12 @@ main (int argc, char **argv) g_signal_connect (xserver, "client-connected", G_CALLBACK (client_connected_cb), NULL); g_signal_connect (xserver, "client-disconnected", G_CALLBACK (client_disconnected_cb), NULL); - status_notify ("XSERVER-%d START", display_number); + status_text = g_string_new (""); + g_string_printf (status_text, "XSERVER-%d START", display_number); + if (vt_number >= 0) + g_string_append_printf (status_text, " VT=%d", vt_number); + status_notify (status_text->str); + g_string_free (status_text, TRUE); config = g_key_file_new (); g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL); diff --git a/tests/src/Xvnc.c b/tests/src/Xvnc.c index 247c5c6e..fd374191 100644 --- a/tests/src/Xvnc.c +++ b/tests/src/Xvnc.c @@ -29,7 +29,7 @@ static int display_number = 0; static XServer *xserver = NULL; static void -indicate_ready () +indicate_ready (void) { void *handler; handler = signal (SIGUSR1, SIG_IGN); @@ -42,7 +42,7 @@ indicate_ready () } static void -cleanup () +cleanup (void) { if (lock_path) unlink (lock_path); @@ -132,8 +132,6 @@ int main (int argc, char **argv) { char *pid_string; - gboolean listen_tcp = TRUE; - gboolean listen_unix = TRUE; gboolean use_inetd = FALSE; gboolean has_option = FALSE; gchar *geometry = g_strdup ("640x480"); @@ -172,9 +170,9 @@ main (int argc, char **argv) char *protocol = argv[i+1]; i++; if (strcmp (protocol, "tcp") == 0) - listen_tcp = FALSE; + ;//listen_tcp = FALSE; else if (strcmp (protocol, "unix") == 0) - listen_unix = FALSE; + ;//listen_unix = FALSE; } else if (strcmp (arg, "-geometry") == 0) { diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c index 77806ede..a30ff89f 100644 --- a/tests/src/libsystem.c +++ b/tests/src/libsystem.c @@ -5,6 +5,7 @@ #include <sys/stat.h> #include <pwd.h> #include <unistd.h> +#include <dirent.h> #include <grp.h> #include <security/pam_appl.h> #include <fcntl.h> @@ -150,15 +151,28 @@ setresuid (uid_t ruid, uid_t uuid, uid_t suid) static gchar * redirect_path (const gchar *path) -{ +{ + size_t offset; + gboolean matches; + + // Don't redirect if inside the running directory if (g_str_has_prefix (path, g_getenv ("LIGHTDM_TEST_ROOT"))) return g_strdup (path); - else if (strcmp (path, CONFIG_DIR "/lightdm.conf") == 0) - return g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "etc", "lightdm", "lightdm.conf", NULL); - else if (g_str_has_prefix (path, "/tmp/")) - return g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "tmp", path + 5, NULL); - else + + if (g_str_has_prefix (path, SYSCONFDIR)) + return g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "etc", path + strlen (SYSCONFDIR), NULL); + + if (g_str_has_prefix (path, LOCALSTATEDIR)) + return g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "var", path + strlen (LOCALSTATEDIR), NULL); + + // Don't redirect if inside the build directory + if (g_str_has_prefix (path, BUILDDIR)) return g_strdup (path); + + if (g_str_has_prefix (path, "/tmp")) + return g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "tmp", path + strlen ("tmp"), NULL); + + return g_strdup (path); } #ifdef __linux__ @@ -196,7 +210,7 @@ open (const char *pathname, int flags, ...) { va_list ap; va_start (ap, flags); - mode = va_arg (ap, int); + mode = va_arg (ap, mode_t); va_end (ap); } return open_wrapper ("open", pathname, flags, mode); @@ -210,12 +224,60 @@ open64 (const char *pathname, int flags, ...) { va_list ap; va_start (ap, flags); - mode = va_arg (ap, int); + mode = va_arg (ap, mode_t); va_end (ap); } return open_wrapper ("open64", pathname, flags, mode); } +FILE * +fopen (const char *path, const char *mode) +{ + FILE *(*_fopen) (const char *pathname, const char *mode); + gchar *new_path = NULL; + FILE *result; + + _fopen = (FILE *(*)(const char *pathname, const char *mode)) dlsym (RTLD_NEXT, "fopen"); + + new_path = redirect_path (path); + result = _fopen (new_path, mode); + g_free (new_path); + + return result; +} + +int +creat (const char *pathname, mode_t mode) +{ + int (*_creat) (const char *pathname, mode_t mode); + gchar *new_path = NULL; + int result; + + _creat = (int (*)(const char *pathname, mode_t mode)) dlsym (RTLD_NEXT, "creat"); + + new_path = redirect_path (pathname); + result = _creat (new_path, mode); + g_free (new_path); + + return result; +} + +int +creat64 (const char *pathname, mode_t mode) +{ + int (*_creat64) (const char *pathname, mode_t mode); + gchar *new_path = NULL; + int result; + + _creat64 = (int (*)(const char *pathname, mode_t mode)) dlsym (RTLD_NEXT, "creat64"); + + new_path = redirect_path (pathname); + result = _creat64 (new_path, mode); + g_free (new_path); + + return result; +} + int access (const char *pathname, int mode) { @@ -233,6 +295,118 @@ access (const char *pathname, int mode) } int +stat (const char *path, struct stat *buf) +{ + int (*_stat) (const char *path, struct stat *buf); + gchar *new_path = NULL; + int ret; + + _stat = (int (*)(const char *path, struct stat *buf)) dlsym (RTLD_NEXT, "stat"); + + new_path = redirect_path (path); + ret = _stat (new_path, buf); + g_free (new_path); + + return ret; +} + +int +stat64 (const char *path, struct stat *buf) +{ + int (*_stat64) (const char *path, struct stat *buf); + gchar *new_path = NULL; + int ret; + + _stat64 = (int (*)(const char *path, struct stat *buf)) dlsym (RTLD_NEXT, "stat64"); + + new_path = redirect_path (path); + ret = _stat (new_path, buf); + g_free (new_path); + + return ret; +} + +int +__xstat (int version, const char *path, struct stat *buf) +{ + int (*___xstat) (int version, const char *path, struct stat *buf); + gchar *new_path = NULL; + int ret; + + ___xstat = (int (*)(int version, const char *path, struct stat *buf)) dlsym (RTLD_NEXT, "__xstat"); + + new_path = redirect_path (path); + ret = ___xstat (version, new_path, buf); + g_free (new_path); + + return ret; +} + +int +__xstat64 (int version, const char *path, struct stat *buf) +{ + int (*___xstat64) (int version, const char *path, struct stat *buf); + gchar *new_path = NULL; + int ret; + + ___xstat64 = (int (*)(int version, const char *path, struct stat *buf)) dlsym (RTLD_NEXT, "__xstat64"); + + new_path = redirect_path (path); + ret = ___xstat64 (version, new_path, buf); + g_free (new_path); + + return ret; +} + +DIR * +opendir (const char *name) +{ + DIR *(*_opendir) (const char *name); + gchar *new_path = NULL; + DIR *result; + + _opendir = (DIR *(*)(const char *name)) dlsym (RTLD_NEXT, "opendir"); + + new_path = redirect_path (name); + result = _opendir (new_path); + g_free (new_path); + + return result; +} + +int +mkdir (const char *pathname, mode_t mode) +{ + int (*_mkdir) (const char *pathname, mode_t mode); + gchar *new_path = NULL; + int result; + + _mkdir = (int (*)(const char *pathname, mode_t mode)) dlsym (RTLD_NEXT, "mkdir"); + + new_path = redirect_path (pathname); + result = _mkdir (new_path, mode); + g_free (new_path); + + return result; +} + +int +chown (const char *pathname, uid_t owner, gid_t group) +{ + int (*_chown) (const char *pathname, uid_t owner, gid_t group); + gchar *new_path = NULL; + int result; + + _chown = (int (*)(const char *pathname, uid_t owner, gid_t group)) dlsym (RTLD_NEXT, "chown"); + + new_path = redirect_path (pathname); + result = _chown (new_path, owner, group); + g_free (new_path); + + return result; +} + +int ioctl (int d, int request, void *data) { int (*_ioctl) (int d, int request, void *data); @@ -783,9 +957,9 @@ static const char * get_env_value (const char *name_value, const char *name) { int j; - - for (j = 0; name[j] && name[j] != '=' && name[j] == name_value[j]; j++); - if (name_value[j] == '=') + + for (j = 0; name[j] && name_value[j] && name[j] == name_value[j]; j++); + if (name[j] == '\0' && name_value[j] == '=') return &name_value[j + 1]; return NULL; @@ -795,15 +969,21 @@ int pam_putenv (pam_handle_t *pamh, const char *name_value) { int i; + gchar *name; if (pamh == NULL || name_value == NULL) return PAM_SYSTEM_ERR; + name = strdup (name_value); + for (i = 0; name[i]; i++) + if (name[i] == '=') + name[i] = '\0'; for (i = 0; pamh->envlist[i]; i++) { - if (get_env_value (pamh->envlist[i], name_value)) + if (get_env_value (pamh->envlist[i], name)) break; } + free (name); if (pamh->envlist[i]) { @@ -1203,18 +1383,19 @@ xcb_connect_to_display_with_auth_info (const char *display, xcb_auth_info_t *aut if (c->error == 0) { - const gchar *d; + gchar *d; /* Skip the hostname, we'll assume it's localhost */ - d = strchr (display, ':'); + d = g_strdup_printf (".x%s", strchr (display, ':')); - socket_path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "tmp", d, NULL); + socket_path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), d, NULL); + g_free (d); address = g_unix_socket_address_new (socket_path); - g_free (socket_path); if (!g_socket_connect (c->socket, address, NULL, &error)) c->error = XCB_CONN_ERROR; if (error) - g_printerr ("%s\n", error->message); + g_printerr ("Failed to connect to X socket %s: %s\n", socket_path, error->message); + g_free (socket_path); g_clear_error (&error); } diff --git a/tests/src/status.c b/tests/src/status.c index 6ca6ce42..67cd7cac 100644 --- a/tests/src/status.c +++ b/tests/src/status.c @@ -59,7 +59,7 @@ status_connect (StatusRequestFunc request_cb) if (!status_socket) return; - path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), ".status-socket", NULL); + path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), ".s", NULL); address = g_unix_socket_address_new (path); result = g_socket_connect (status_socket, address, NULL, &error); g_object_unref (address); diff --git a/tests/src/test-gobject-greeter.c b/tests/src/test-gobject-greeter.c index f95282bb..3a3a3850 100644 --- a/tests/src/test-gobject-greeter.c +++ b/tests/src/test-gobject-greeter.c @@ -120,6 +120,37 @@ request_cb (const gchar *request) } g_free (r); + r = g_strdup_printf ("%s LOG-USER-LIST-LENGTH", greeter_id); + if (strcmp (request, r) == 0) + status_notify ("%s LOG-USER-LIST-LENGTH N=%d", greeter_id, lightdm_user_list_get_length (lightdm_user_list_get_instance ())); + g_free (r); + + r = g_strdup_printf ("%s LOG-USER USERNAME=", greeter_id); + if (g_str_has_prefix (request, r)) + { + LightDMUser *user; + const gchar *username; + + username = request + strlen (r); + user = lightdm_user_list_get_user_by_name (lightdm_user_list_get_instance (), username); + status_notify ("%s LOG-USER USERNAME=%s", greeter_id, lightdm_user_get_name (user)); + } + g_free (r); + + r = g_strdup_printf ("%s LOG-USER-LIST", greeter_id); + if (strcmp (request, r) == 0) + { + GList *users, *link; + + users = lightdm_user_list_get_users (lightdm_user_list_get_instance ()); + for (link = users; link; link = link->next) + { + LightDMUser *user = link->data; + status_notify ("%s LOG-USER USERNAME=%s", greeter_id, lightdm_user_get_name (user)); + } + } + g_free (r); + r = g_strdup_printf ("%s LOG-LAYOUT USERNAME=", greeter_id); if (g_str_has_prefix (request, r)) { @@ -238,6 +269,18 @@ request_cb (const gchar *request) g_free (r); } +static void +user_added_cb (LightDMUserList *user_list, LightDMUser *user) +{ + status_notify ("%s USER-ADDED USERNAME=%s", greeter_id, lightdm_user_get_name (user)); +} + +static void +user_removed_cb (LightDMUserList *user_list, LightDMUser *user) +{ + status_notify ("%s USER-REMOVED USERNAME=%s", greeter_id, lightdm_user_get_name (user)); +} + int main (int argc, char **argv) { @@ -290,6 +333,12 @@ main (int argc, char **argv) g_signal_connect (greeter, "authentication-complete", G_CALLBACK (authentication_complete_cb), NULL); g_signal_connect (greeter, "autologin-timer-expired", G_CALLBACK (autologin_timer_expired_cb), NULL); + if (g_key_file_get_boolean (config, "test-greeter-config", "log-user-changes", NULL)) + { + g_signal_connect (lightdm_user_list_get_instance (), "user-added", G_CALLBACK (user_added_cb), NULL); + g_signal_connect (lightdm_user_list_get_instance (), "user-removed", G_CALLBACK (user_removed_cb), NULL); + } + status_notify ("%s CONNECT-TO-DAEMON", greeter_id); if (!lightdm_greeter_connect_sync (greeter, NULL)) { diff --git a/tests/src/test-python-greeter b/tests/src/test-python-greeter index b5b02eee..de0d6e4c 100755 --- a/tests/src/test-python-greeter +++ b/tests/src/test-python-greeter @@ -79,6 +79,22 @@ def request_cb (channel, condition): if not greeter.start_session_sync (request[len(r):]): status_notify ('%s SESSION-FAILED' % greeter_id) + r = '%s LOG-USER-LIST-LENGTH' % greeter_id + if request == r: + status_notify ('%s LOG-USER-LIST-LENGTH N=%d' % (greeter_id, LightDM.UserList.get_instance ().get_length ())) + + r = '%s LOG-USER USERNAME=' % greeter_id + if request.startswith (r): + username = request[len(r):] + user = LightDM.UserList.get_instance ().get_user_by_name (username) + status_notify ('%s LOG-USER USERNAME=%s' % (greeter_id, user.get_name ())) + + r = '%s LOG-USER-LIST' % greeter_id + if request == r: + users = LightDM.UserList.get_instance ().get_users (); + for user in users: + status_notify ('%s LOG-USER USERNAME=%s' % (greeter_id, user.get_name ())) + r = '%s LOG-LAYOUT' % greeter_id if request == r: layout = LightDM.get_layout ().get_name () @@ -96,8 +112,8 @@ def request_cb (channel, condition): r = '%s LOG-LANGUAGE USERNAME=' % greeter_id if request.startswith (r): username = request[len(r):] - user = lightdm_user_list_get_user_by_name (lightdm_user_list_get_instance (), username) - language = lightdm_user_get_language (user) + user = LightDM.UserList.get_instance ().get_user_by_name (username) + language = user.get_language () if language is None: language = '' status_notify ('%s LOG-LANGUAGE USERNAME=%s LANGUAGE=%s' % (greeter_id, username, language)) @@ -164,35 +180,24 @@ def request_cb (channel, condition): return True -path = os.getenv ('LIGHTDM_TEST_ROOT') + '/.status-socket' +path = os.getenv ('LIGHTDM_TEST_ROOT') + '/.s' status_socket = socket.socket (socket.AF_UNIX, socket.SOCK_STREAM) status_socket.connect (path) GLib.io_add_watch (status_socket.fileno (), GLib.IO_IN | GLib.IO_HUP, request_cb) status_notify ('%s START' % greeter_id) +config = GLib.KeyFile () +config.load_from_file (os.getenv ('LIGHTDM_TEST_ROOT') + '/script', GLib.KeyFileFlags.NONE) + # NOTE: There don't seem to be any good X bindings so we have to mock up our own... (host, display_number) = display.split (':') if host == '': x_socket = socket.socket (socket.AF_UNIX, socket.SOCK_STREAM) - x_socket.connect (os.getenv ('LIGHTDM_TEST_ROOT') + '/tmp/' + display) + x_socket.connect (os.getenv ('LIGHTDM_TEST_ROOT') + '/.x' + display) else: x_socket = socket.socket (socket.AF_INET, socket.SOCK_STREAM) x_socket.connect ((host, 6000 + int (display_number))) -authority = subprocess.check_output(['xauth', 'list']).split () -auth_name = '' -auth_data = '' -if len (authority) >= 3: - auth_name = authority[1] - hex = authority[2] - while len (hex) >= 2: - auth_data += chr (int (hex[:2], 16)) - hex = hex[2:] -def pad (value): - if len (value) % 4 != 0: - return value + '\x00' * (4 - len (value) % 4) - else: - return value status_notify ('%s CONNECT-XSERVER' % (greeter_id)) @@ -221,6 +226,19 @@ greeter.connect ('show-prompt', show_prompt_cb) greeter.connect ('authentication-complete', authentication_complete_cb) greeter.connect ('autologin-timer-expired', autologin_timer_expired_cb) +def user_added_cb (user_list, user): + status_notify ('%s USER-ADDED USERNAME=%s' % (greeter_id, user.get_name ())) +def user_removed_cb (user_list, user): + status_notify ('%s USER-REMOVED USERNAME=%s' % (greeter_id, user.get_name ())) +log_user_changes = False +try: + log_user_changes = config.get_boolean ('test-greeter-config', 'log-user-changes') +except: + pass +if log_user_changes: + LightDM.UserList.get_instance ().connect ('user-added', user_added_cb) + LightDM.UserList.get_instance ().connect ('user-removed', user_removed_cb) + status_notify ('%s CONNECT-TO-DAEMON' % greeter_id) if not greeter.connect_sync (): status_notify ('%s FAIL-CONNECT-DAEMON' % greeter_id) diff --git a/tests/src/test-qt-greeter.cpp b/tests/src/test-qt-greeter.cpp index b6a591de..99c01107 100644 --- a/tests/src/test-qt-greeter.cpp +++ b/tests/src/test-qt-greeter.cpp @@ -6,6 +6,7 @@ #include <xcb/xcb.h> #include <QLightDM/Greeter> #include <QLightDM/Power> +#include <QLightDM/UsersModel> #include <QtCore/QSettings> #include <QtCore/QDebug> #include <QtCore/QCoreApplication> @@ -18,6 +19,7 @@ static QCoreApplication *app = NULL; static QSettings *config = NULL; static QLightDM::PowerInterface *power = NULL; static TestGreeter *greeter = NULL; +static QLightDM::UsersModel *users_model = NULL; TestGreeter::TestGreeter () { @@ -52,6 +54,24 @@ void TestGreeter::autologinTimerExpired () status_notify ("%s AUTOLOGIN-TIMER-EXPIRED", greeter_id); } +void TestGreeter::userRowsInserted (const QModelIndex & parent, int start, int end) +{ + for (int i = start; i <= end; i++) + { + QString name = users_model->data (users_model->index (i, 0), QLightDM::UsersModel::NameRole).toString (); + status_notify ("%s USER-ADDED USERNAME=%s", greeter_id, qPrintable (name)); + } +} + +void TestGreeter::userRowsRemoved (const QModelIndex & parent, int start, int end) +{ + for (int i = start; i <= end; i++) + { + QString name = users_model->data (users_model->index (i, 0), QLightDM::UsersModel::NameRole).toString (); + status_notify ("%s USER-REMOVED USERNAME=%s", greeter_id, qPrintable (name)); + } +} + static void signal_cb (int signum) { @@ -126,6 +146,35 @@ request_cb (const gchar *request) } g_free (r); + r = g_strdup_printf ("%s LOG-USER-LIST-LENGTH", greeter_id); + if (strcmp (request, r) == 0) + status_notify ("%s LOG-USER-LIST-LENGTH N=%d", greeter_id, users_model->rowCount (QModelIndex ())); + g_free (r); + + r = g_strdup_printf ("%s LOG-USER USERNAME=", greeter_id); + if (g_str_has_prefix (request, r)) + { + const gchar *username = request + strlen (r); + for (int i = 0; i < users_model->rowCount (QModelIndex ()); i++) + { + QString name = users_model->data (users_model->index (i, 0), QLightDM::UsersModel::NameRole).toString (); + if (name == username) + status_notify ("%s LOG-USER USERNAME=%s", greeter_id, qPrintable (name)); + } + } + g_free (r); + + r = g_strdup_printf ("%s LOG-USER-LIST", greeter_id); + if (strcmp (request, r) == 0) + { + for (int i = 0; i < users_model->rowCount (QModelIndex ()); i++) + { + QString name = users_model->data (users_model->index (i, 0), QLightDM::UsersModel::NameRole).toString (); + status_notify ("%s LOG-USER USERNAME=%s", greeter_id, qPrintable (name)); + } + } + g_free (r); + r = g_strdup_printf ("%s GET-CAN-SUSPEND", greeter_id); if (strcmp (request, r) == 0) { @@ -232,7 +281,14 @@ main(int argc, char *argv[]) power = new QLightDM::PowerInterface(); greeter = new TestGreeter(); - + + users_model = new QLightDM::UsersModel(); + if (config->value ("test-greeter-config/log-user-changes", "false") == "true") + { + QObject::connect (users_model, SIGNAL(rowsInserted(const QModelIndex&, int, int)), greeter, SLOT(userRowsInserted(const QModelIndex&, int, int))); + QObject::connect (users_model, SIGNAL(rowsAboutToBeRemoved(const QModelIndex&, int, int)), greeter, SLOT(userRowsRemoved(const QModelIndex&, int, int))); + } + status_notify ("%s CONNECT-TO-DAEMON", greeter_id); if (!greeter->connectSync()) { diff --git a/tests/src/test-qt-greeter.h b/tests/src/test-qt-greeter.h index 99370996..10a10db0 100644 --- a/tests/src/test-qt-greeter.h +++ b/tests/src/test-qt-greeter.h @@ -1,4 +1,5 @@ #include <QLightDM/Greeter> +#include <QLightDM/UsersModel> class TestGreeter : public QLightDM::Greeter { @@ -12,4 +13,6 @@ private Q_SLOTS: void showPrompt(QString text, QLightDM::Greeter::PromptType type); void authenticationComplete(); void autologinTimerExpired(); + void userRowsInserted(const QModelIndex & parent, int start, int end); + void userRowsRemoved(const QModelIndex & parent, int start, int end); }; diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c index d64f5f68..67cd921e 100644 --- a/tests/src/test-runner.c +++ b/tests/src/test-runner.c @@ -12,7 +12,7 @@ #include <pwd.h> /* Timeout in ms waiting for the status we expect */ -#define STATUS_TIMEOUT 4000 +static int status_timeout_ms = 4000; /* Timeout in ms to wait for SIGTERM to be handled by a child process */ #define KILL_TIMEOUT 2000 @@ -55,6 +55,7 @@ typedef struct gchar *language; gchar *xsession; gchar **layouts; + gboolean hidden; } AccountsUser; static GList *accounts_users = NULL; static void handle_user_call (GDBusConnection *connection, @@ -119,6 +120,9 @@ static GList *status_clients = NULL; static void run_lightdm (void); static void quit (int status); static void check_status (const gchar *status); +static AccountsUser *get_accounts_user_by_uid (guint uid); +static AccountsUser *get_accounts_user_by_name (const gchar *username); +static void accounts_user_set_hidden (AccountsUser *user, gboolean hidden, gboolean emit_signal); static gboolean kill_timeout_cb (gpointer data) @@ -235,7 +239,7 @@ quit (int status) if (status_socket_name) unlink (status_socket_name); - if (temp_dir) + if (temp_dir && getenv ("DEBUG") == NULL) { gchar *command = g_strdup_printf ("rm -rf %s", temp_dir); if (system (command)) @@ -494,6 +498,38 @@ handle_command (const gchar *command) g_hash_table_insert (children, GINT_TO_POINTER (process->pid), process); } } + else if (strcmp (name, "ADD-USER") == 0) + { + gchar *status_text, *username; + AccountsUser *user; + + username = g_hash_table_lookup (params, "USERNAME"); + user = get_accounts_user_by_name (username); + if (user) + accounts_user_set_hidden (user, FALSE, TRUE); + else + g_warning ("Unknown user %s", username); + + status_text = g_strdup_printf ("RUNNER ADD-USER USERNAME=%s", username); + check_status (status_text); + g_free (status_text); + } + else if (strcmp (name, "DELETE-USER") == 0) + { + gchar *status_text, *username; + AccountsUser *user; + + username = g_hash_table_lookup (params, "USERNAME"); + user = get_accounts_user_by_name (username); + if (user) + accounts_user_set_hidden (user, TRUE, TRUE); + else + g_warning ("Unknown user %s", username); + + status_text = g_strdup_printf ("RUNNER DELETE-USER USERNAME=%s", username); + check_status (status_text); + g_free (status_text); + } /* Forward to external processes */ else if (g_str_has_prefix (name, "SESSION-") || g_str_has_prefix (name, "GREETER-") || @@ -525,7 +561,7 @@ handle_command (const gchar *command) } static void -run_commands () +run_commands (void) { /* Stop daemon if requested */ while (TRUE) @@ -597,7 +633,7 @@ check_status (const gchar *status) /* Restart timeout */ g_source_remove (status_timeout); - status_timeout = g_timeout_add (STATUS_TIMEOUT, status_timeout_cb, NULL); + status_timeout = g_timeout_add (status_timeout_ms, status_timeout_cb, NULL); run_commands (); } @@ -997,7 +1033,7 @@ ck_name_acquired_cb (GDBusConnection *connection, } static void -start_console_kit_daemon () +start_console_kit_daemon (void) { service_count++; g_bus_own_name (G_BUS_TYPE_SYSTEM, @@ -1235,12 +1271,101 @@ start_login1_daemon () NULL); } +static AccountsUser * +get_accounts_user_by_uid (guint uid) +{ + GList *link; + + for (link = accounts_users; link; link = link->next) + { + AccountsUser *u = link->data; + if (u->uid == uid) + return u; + } + + return NULL; +} + +static AccountsUser * +get_accounts_user_by_name (const gchar *username) +{ + GList *link; + + for (link = accounts_users; link; link = link->next) + { + AccountsUser *u = link->data; + if (strcmp (u->user_name, username) == 0) + return u; + } + + return NULL; +} + +static void +accounts_user_set_hidden (AccountsUser *user, gboolean hidden, gboolean emit_signal) +{ + GError *error = NULL; + + user->hidden = hidden; + + if (user->hidden && user->id != 0) + { + g_dbus_connection_unregister_object (accounts_connection, user->id); + g_dbus_connection_emit_signal (accounts_connection, + NULL, + "/org/freedesktop/Accounts", + "org.freedesktop.Accounts", + "UserDeleted", + g_variant_new ("(o)", user->path), + &error); + if (error) + g_warning ("Failed to emit UserDeleted: %s", error->message); + g_clear_error (&error); + + user->id = 0; + } + if (!user->hidden && user->id == 0) + { + user->id = g_dbus_connection_register_object (accounts_connection, + user->path, + user_info->interfaces[0], + &user_vtable, + user, + NULL, + &error); + if (error) + g_warning ("Failed to register user: %s", error->message); + g_clear_error (&error); + + g_dbus_connection_emit_signal (accounts_connection, + NULL, + "/org/freedesktop/Accounts", + "org.freedesktop.Accounts", + "UserAdded", + g_variant_new ("(o)", user->path), + &error); + if (error) + g_warning ("Failed to emit UserAdded: %s", error->message); + g_clear_error (&error); + } +} + static void -load_passwd_file () +load_passwd_file (void) { gchar *path, *data, **lines; + gchar **user_filter = NULL; int i; + if (g_key_file_has_key (config, "test-runner-config", "accounts-service-user-filter", NULL)) + { + gchar *filter; + + filter = g_key_file_get_string (config, "test-runner-config", "accounts-service-user-filter", NULL); + user_filter = g_strsplit (filter, " ", -1); + g_free (filter); + } + path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "etc", "passwd", NULL); g_file_get_contents (path, &data, NULL, NULL); g_free (path); @@ -1258,21 +1383,16 @@ load_passwd_file () fields = g_strsplit (lines[i], ":", -1); if (fields == NULL || g_strv_length (fields) < 7) + { + g_strfreev (fields); continue; + } user_name = fields[0]; uid = atoi (fields[2]); real_name = fields[4]; - for (link = accounts_users; link; link = link->next) - { - AccountsUser *u = link->data; - if (u->uid == uid) - { - user = u; - break; - } - } + user = get_accounts_user_by_uid (uid); if (!user) { gchar *path; @@ -1281,6 +1401,18 @@ load_passwd_file () user = g_malloc0 (sizeof (AccountsUser)); accounts_users = g_list_append (accounts_users, user); + /* Only allow users in whitelist */ + user->hidden = FALSE; + if (user_filter) + { + int j; + + user->hidden = TRUE; + for (j = 0; user_filter[j] != NULL; j++) + if (strcmp (user_name, user_filter[j]) == 0) + user->hidden = FALSE; + } + dmrc_file = g_key_file_new (); path = g_build_filename (temp_dir, "home", user_name, ".dmrc", NULL); g_key_file_load_from_file (dmrc_file, path, G_KEY_FILE_NONE, NULL); @@ -1301,16 +1433,7 @@ load_passwd_file () user->xsession = g_key_file_get_string (dmrc_file, "Desktop", "Session", NULL); user->layouts = g_key_file_get_string_list (dmrc_file, "X-Accounts", "Layouts", NULL, NULL); user->path = g_strdup_printf ("/org/freedesktop/Accounts/User%d", uid); - user->id = g_dbus_connection_register_object (accounts_connection, - user->path, - user_info->interfaces[0], - &user_vtable, - user, - NULL, - &error); - if (error) - g_warning ("Failed to register user: %s", error->message); - g_clear_error (&error); + accounts_user_set_hidden (user, user->hidden, FALSE); g_key_file_free (dmrc_file); } @@ -1342,7 +1465,8 @@ handle_accounts_call (GDBusConnection *connection, for (link = accounts_users; link; link = link->next) { AccountsUser *user = link->data; - g_variant_builder_add_value (&builder, g_variant_new_object_path (user->path)); + if (!user->hidden) + g_variant_builder_add_value (&builder, g_variant_new_object_path (user->path)); } g_dbus_method_invocation_return_value (invocation, g_variant_new ("(ao)", &builder)); @@ -1356,16 +1480,8 @@ handle_accounts_call (GDBusConnection *connection, g_variant_get (parameters, "(&s)", &user_name); load_passwd_file (); - for (link = accounts_users; link; link = link->next) - { - AccountsUser *u = link->data; - if (strcmp (u->user_name, user_name) == 0) - { - user = u; - break; - } - } - if (user) + user = get_accounts_user_by_name (user_name); + if (user && !user->hidden) g_dbus_method_invocation_return_value (invocation, g_variant_new ("(o)", user->path)); else g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "No such user: %s", user_name); @@ -1452,6 +1568,12 @@ accounts_name_acquired_cb (GDBusConnection *connection, " <arg name='name' direction='in' type='s'/>" " <arg name='user' direction='out' type='o'/>" " </method>" + " <signal name='UserAdded'>" + " <arg name='user' type='o'/>" + " </signal>" + " <signal name='UserDeleted'>" + " <arg name='user' type='o'/>" + " </signal>" " </interface>" "</node>"; static const GDBusInterfaceVTable accounts_vtable = @@ -1508,7 +1630,7 @@ accounts_name_acquired_cb (GDBusConnection *connection, } static void -start_accounts_service_daemon () +start_accounts_service_daemon (void) { service_count++; g_bus_own_name (G_BUS_TYPE_SYSTEM, @@ -1522,7 +1644,7 @@ start_accounts_service_daemon () } static void -run_lightdm () +run_lightdm (void) { GString *command_line; gchar **lightdm_argv; @@ -1531,7 +1653,7 @@ run_lightdm () run_commands (); - status_timeout = g_timeout_add (STATUS_TIMEOUT, status_timeout_cb, NULL); + status_timeout = g_timeout_add (status_timeout_ms, status_timeout_cb, NULL); command_line = g_string_new ("lightdm"); if (getenv ("DEBUG")) @@ -1575,7 +1697,8 @@ int main (int argc, char **argv) { GMainLoop *loop; - gchar *greeter = NULL, *script_name, *config_file, *path, *path1, *path2, *ld_preload, *ld_library_path, *home_dir; + int i; + gchar *greeter = NULL, *script_name, *config_file, *additional_config, *path, *path1, *path2, *ld_preload, *ld_library_path, *home_dir; GString *passwd_data, *group_data; GSource *status_source; gchar cwd[1024]; @@ -1638,22 +1761,30 @@ main (int argc, char **argv) g_setenv ("GI_TYPELIB_PATH", path1, TRUE); g_free (path1); - /* Run from a temporary directory */ - temp_dir = g_build_filename (g_get_tmp_dir (), "lightdm-test-XXXXXX", NULL); - if (!mkdtemp (temp_dir)) - { - g_warning ("Error creating temporary directory: %s", strerror (errno)); - quit (EXIT_FAILURE); - } - g_chmod (temp_dir, 0755); + /* Run in a temporary directory inside the build directory */ + /* Note we have to pick a name that is short since Unix sockets in this directory have a 108 character limit on their paths */ + i = 0; + while (TRUE) { + gchar *name; + + name = g_strdup_printf (".r%d", i); + g_free (temp_dir); + temp_dir = g_build_filename ("/tmp", name, NULL); + g_free (name); + if (!g_file_test (temp_dir, G_FILE_TEST_EXISTS)) + break; + i++; + } + g_mkdir_with_parents (temp_dir, 0755); g_setenv ("LIGHTDM_TEST_ROOT", temp_dir, TRUE); /* Open socket for status */ - status_socket_name = g_build_filename (temp_dir, ".status-socket", NULL); + /* Note we have to pick a socket name that is short since there is a 108 character limit on the name */ + status_socket_name = g_build_filename (temp_dir, ".s", NULL); unlink (status_socket_name); status_socket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, &error); if (error) - g_warning ("Error creating status socket: %s", error->message); + g_warning ("Error creating status socket %s: %s", status_socket_name, error->message); g_clear_error (&error); if (status_socket) { @@ -1664,13 +1795,13 @@ main (int argc, char **argv) result = g_socket_bind (status_socket, address, FALSE, &error); g_object_unref (address); if (error) - g_warning ("Error binding status socket: %s", error->message); + g_warning ("Error binding status socket %s: %s", status_socket_name, error->message); g_clear_error (&error); if (result) { result = g_socket_listen (status_socket, &error); if (error) - g_warning ("Error listening on status socket: %s", error->message); + g_warning ("Error listening on status socket %s: %s", status_socket_name, error->message); g_clear_error (&error); } if (!result) @@ -1688,7 +1819,12 @@ main (int argc, char **argv) /* Set up a skeleton file system */ g_mkdir_with_parents (g_strdup_printf ("%s/etc", temp_dir), 0755); g_mkdir_with_parents (g_strdup_printf ("%s/usr/share", temp_dir), 0755); + g_mkdir_with_parents (g_strdup_printf ("%s/usr/share/xsessions", temp_dir), 0755); + g_mkdir_with_parents (g_strdup_printf ("%s/usr/share/remote-sessions", temp_dir), 0755); + g_mkdir_with_parents (g_strdup_printf ("%s/usr/share/xgreeters", temp_dir), 0755); g_mkdir_with_parents (g_strdup_printf ("%s/tmp", temp_dir), 0755); + g_mkdir_with_parents (g_strdup_printf ("%s/var/run", temp_dir), 0755); + g_mkdir_with_parents (g_strdup_printf ("%s/var/log", temp_dir), 0755); /* Copy over the configuration */ g_mkdir_with_parents (g_strdup_printf ("%s/etc/lightdm", temp_dir), 0755); @@ -1696,16 +1832,30 @@ main (int argc, char **argv) if (system (g_strdup_printf ("cp %s %s/etc/lightdm/lightdm.conf", config_path, temp_dir))) perror ("Failed to copy configuration"); + additional_config = g_key_file_get_string (config, "test-runner-config", "additional-config", NULL); + if (additional_config) + { + gchar **files; + + g_mkdir_with_parents (g_strdup_printf ("%s/etc/lightdm/lightdm.conf.d", temp_dir), 0755); + + files = g_strsplit (additional_config, " ", -1); + for (i = 0; files[i]; i++) + if (system (g_strdup_printf ("cp %s/tests/scripts/%s %s/etc/lightdm/lightdm.conf.d", SRCDIR, files[i], temp_dir))) + perror ("Failed to copy configuration"); + g_strfreev (files); + } + /* Always copy the script */ if (system (g_strdup_printf ("cp %s %s/script", config_path, temp_dir))) perror ("Failed to copy configuration"); /* Copy over the greeter files */ - if (system (g_strdup_printf ("cp -r %s/xsessions %s/usr/share", DATADIR, temp_dir))) + if (system (g_strdup_printf ("cp %s/xsessions/* %s/usr/share/xsessions", DATADIR, temp_dir))) perror ("Failed to copy xsessions"); - if (system (g_strdup_printf ("cp -r %s/remote-sessions %s/usr/share", DATADIR, temp_dir))) + if (system (g_strdup_printf ("cp %s/remote-sessions/* %s/usr/share/remote-sessions", DATADIR, temp_dir))) perror ("Failed to copy remote sessions"); - if (system (g_strdup_printf ("cp -r %s/xgreeters %s/usr/share", DATADIR, temp_dir))) + if (system (g_strdup_printf ("cp %s/xgreeters/* %s/usr/share/xgreeters", DATADIR, temp_dir))) perror ("Failed to copy xgreeters"); /* Set up the default greeter */ @@ -1800,7 +1950,6 @@ main (int argc, char **argv) }; passwd_data = g_string_new (""); group_data = g_string_new (""); - int i; for (i = 0; users[i].user_name; i++) { GKeyFile *dmrc_file; @@ -1870,6 +2019,9 @@ main (int argc, char **argv) g_free (path); g_string_free (group_data, TRUE); + if (g_key_file_has_key (config, "test-runner-config", "timeout", NULL)) + status_timeout_ms = g_key_file_get_integer (config, "test-runner-config", "timeout", NULL) * 1000; + /* Start D-Bus services */ if (!g_key_file_get_boolean (config, "test-runner-config", "disable-upower", NULL)) start_upower_daemon (); diff --git a/tests/src/vnc-client.c b/tests/src/vnc-client.c index 9d033ce1..01419a32 100644 --- a/tests/src/vnc-client.c +++ b/tests/src/vnc-client.c @@ -18,7 +18,7 @@ main (int argc, char **argv) GError *error = NULL; GSocket *socket; GSocketConnectable *address; - GSocketAddress *socket_address; + GSocketAddressEnumerator *enumerator; gboolean result; gchar buffer[1024]; gssize n_read, n_sent; @@ -57,7 +57,7 @@ main (int argc, char **argv) if (g_str_has_prefix (port_string, ":")) port = atoi (port_string + 1); else - port = 5900 + atoi (port_string); + port = 5900 + atoi (port_string); } else port = 5900; @@ -66,11 +66,30 @@ main (int argc, char **argv) g_free (hostname); hostname = g_strdup ("localhost"); } - + address = g_network_address_new (hostname, port); - socket_address = g_socket_address_enumerator_next (g_socket_connectable_enumerate (address), NULL, NULL); + enumerator = g_socket_connectable_enumerate (address); + result = FALSE; + while (TRUE) + { + GSocketAddress *socket_address; + GError *e = NULL; - result = g_socket_connect (socket, socket_address, NULL, &error); + socket_address = g_socket_address_enumerator_next (enumerator, NULL, &e); + if (e) + g_warning ("Failed to get socket address: %s", e->message); + g_clear_error (&e); + if (!socket_address) + break; + + result = g_socket_connect (socket, socket_address, NULL, error ? NULL : &error); + g_object_unref (socket_address); + if (result) + { + g_clear_error (&error); + break; + } + } if (error) g_warning ("Unable to connect VNC socket: %s", error->message); g_clear_error (&error); diff --git a/tests/src/x-server.c b/tests/src/x-server.c index 0c9182ab..24003581 100644 --- a/tests/src/x-server.c +++ b/tests/src/x-server.c @@ -144,8 +144,8 @@ x_server_start (XServer *server) gchar *name; GError *error = NULL; - name = g_strdup_printf (":%d", server->priv->display_number); - server->priv->socket_path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "tmp", name, NULL); + name = g_strdup_printf (".x:%d", server->priv->display_number); + server->priv->socket_path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), name, NULL); g_free (name); server->priv->socket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, &error); diff --git a/tests/src/xdmcp-client.c b/tests/src/xdmcp-client.c index dd352c8b..c1a1ffec 100644 --- a/tests/src/xdmcp-client.c +++ b/tests/src/xdmcp-client.c @@ -262,21 +262,45 @@ gboolean xdmcp_client_start (XDMCPClient *client) { GSocketConnectable *address; - GSocketAddress *socket_address; + GSocketAddressEnumerator *enumerator; + gboolean result; GError *error = NULL; client->priv->socket = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_DATAGRAM, G_SOCKET_PROTOCOL_UDP, &error); + if (error) + g_warning ("Error creating XDMCP socket: %s", error->message); + if (!client->priv->socket) + return FALSE; address = g_network_address_new (client->priv->host, client->priv->port); - socket_address = g_socket_address_enumerator_next (g_socket_connectable_enumerate (address), NULL, NULL); - - if (!client->priv->socket || - !g_socket_connect (client->priv->socket, socket_address, NULL, &error) || - !g_io_add_watch (g_io_channel_unix_new (g_socket_get_fd (client->priv->socket)), G_IO_IN, xdmcp_data_cb, client)) + enumerator = g_socket_connectable_enumerate (address); + result = FALSE; + while (TRUE) { - g_warning ("Error creating XDMCP socket: %s", error->message); - return FALSE; + GSocketAddress *socket_address; + GError *e = NULL; + + socket_address = g_socket_address_enumerator_next (enumerator, NULL, &e); + if (e) + g_warning ("Failed to get socket address: %s", e->message); + g_clear_error (&e); + if (!socket_address) + break; + + result = g_socket_connect (client->priv->socket, socket_address, NULL, error ? NULL : &error); + g_object_unref (socket_address); + if (result) + { + g_clear_error (&error); + break; + } } + if (error) + g_warning ("Unable to connect XDMCP socket: %s", error->message); + if (!result) + return FALSE; + + g_io_add_watch (g_io_channel_unix_new (g_socket_get_fd (client->priv->socket)), G_IO_IN, xdmcp_data_cb, client); client->priv->query_timer = g_timeout_add (2000, xdmcp_query_cb, client); xdmcp_query_cb (client); diff --git a/tests/test-additional-config b/tests/test-additional-config new file mode 100755 index 00000000..61eecea5 --- /dev/null +++ b/tests/test-additional-config @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner additional-config test-gobject-greeter diff --git a/tests/test-login1 b/tests/test-login1 new file mode 100755 index 00000000..9c4fba8d --- /dev/null +++ b/tests/test-login1 @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner login1 test-gobject-greeter diff --git a/tests/test-users-gobject b/tests/test-users-gobject new file mode 100755 index 00000000..aee83cbe --- /dev/null +++ b/tests/test-users-gobject @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner users test-gobject-greeter diff --git a/tests/test-users-python b/tests/test-users-python new file mode 100755 index 00000000..88edefc3 --- /dev/null +++ b/tests/test-users-python @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner users test-python-greeter diff --git a/tests/test-users-qt4 b/tests/test-users-qt4 new file mode 100755 index 00000000..4899ffc7 --- /dev/null +++ b/tests/test-users-qt4 @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner users test-qt4-greeter diff --git a/tests/test-users-qt5 b/tests/test-users-qt5 new file mode 100755 index 00000000..3638fc00 --- /dev/null +++ b/tests/test-users-qt5 @@ -0,0 +1,2 @@ +#!/bin/sh +./src/dbus-env ./src/test-runner users test-qt5-greeter |