Hello community, here is the log from the commit of package gdm for openSUSE:Factory checked in at 2017-03-22 23:12:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gdm (Old) and /work/SRC/openSUSE:Factory/.gdm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gdm" Wed Mar 22 23:12:05 2017 rev:189 rq:481627 version:3.24.0 Changes: -------- --- /work/SRC/openSUSE:Factory/gdm/gdm.changes 2016-10-18 10:33:43.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.gdm.new/gdm.changes 2017-03-22 23:12:07.984028026 +0100 @@ -1,0 +2,58 @@ +Mon Mar 20 21:41:53 UTC 2017 - dims...@opensuse.org + +- Update to version 3.24.0: + + No changes. + +------------------------------------------------------------------- +Mon Mar 13 19:39:20 UTC 2017 - zai...@opensuse.org + +- Update to version 3.23.92: + + Be more robust against misconfigured autologin systems. + +------------------------------------------------------------------- +Sun Mar 12 03:23:51 UTC 2017 - zai...@opensuse.org + +- Update to version 3.23.91.1: + + Fix regression in wayland fallback code. + + Fix for headless sessions. + + Change around how PostLogin/PostSession scripts are run. + + Fix XDMCP in network environments with poor network resolution. + + Don't try to user switch with XDMCP. + + Updated translations. + +------------------------------------------------------------------- +Sat Mar 11 11:12:19 CET 2017 - ku...@suse.de + +- Require group video + +------------------------------------------------------------------- +Tue Feb 28 15:32:20 UTC 2017 - dims...@opensuse.org + +- Update to version 3.23.91: + + Small fix to environment variable importing. + + Add configure knob to turn off user X server. + +------------------------------------------------------------------- +Tue Jan 10 14:16:39 UTC 2017 - adrien.pla...@suse.com + +- Drop requirement on xorg-x11-server-extra: it provides Xdmx, + Xephyr and Xnest, which usage is strongly discouraged nowadays + since the protocols they implement are insecure and work badly on + GNOME 3. Other remoting protocols like VNC are recommended + instead. + +------------------------------------------------------------------- +Mon Jan 9 11:03:14 UTC 2017 - dims...@opensuse.org + +- Update to version 3.23.4: + + Make X11DisplayName property accurate. + + Fix bug that forced wayland on second logins even if user + didn't pick it. + + Kill clients from display on logout (multiseat and xdmcp only). + + Send hangup to process group when session exits. + + Allow specifying pam_gdm install location to configure. +- Pass --with-pam-mod-dir=/%{_lib}/security to configure: directly + install the pam module into the right location instead of moving + it there later on. + +------------------------------------------------------------------- Old: ---- gdm-3.22.1.tar.xz New: ---- gdm-3.24.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gdm.spec ++++++ --- /var/tmp/diff_new_pack.VChW4l/_old 2017-03-22 23:12:09.927752637 +0100 +++ /var/tmp/diff_new_pack.VChW4l/_new 2017-03-22 23:12:09.955748670 +0100 @@ -1,7 +1,7 @@ # # spec file for package gdm # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,13 +25,13 @@ %define enable_split_authentication 0 Name: gdm -Version: 3.22.1 +Version: 3.24.0 Release: 0 Summary: The GNOME Display Manager License: GPL-2.0+ Group: System/GUI/GNOME Url: http://projects.gnome.org/gdm/ -Source: http://download.gnome.org/sources/gdm/3.22/%{name}-%{version}.tar.xz +Source: http://download.gnome.org/sources/gdm/3.24/%{name}-%{version}.tar.xz Source1: gdm.pamd Source2: gdm-autologin.pamd Source3: gdm-launch-environment.pamd @@ -90,12 +90,12 @@ BuildRequires: pkgconfig(xau) BuildRequires: pkgconfig(xorg-server) BuildRequires: pkgconfig(xrandr) +Requires(pre): group(video) Requires: %{name}-branding = %{version} Requires: gdmflexiserver Requires: gnome-session-core Requires: gnome-settings-daemon Requires: gnome-shell -Requires: xorg-x11-server-extra Requires(post): dconf # accessibility Recommends: orca @@ -204,6 +204,7 @@ --with-at-spi-registryd-directory=%{_libexecdir}/at-spi \ --with-check-accelerated-directory=%{_libexecdir} \ --with-gnome-settings-daemon-directory=%{_libexecdir}/gnome-settings-daemon-3.0 \ + --with-pam-mod-dir=/%{_lib}/security \ --enable-ipv6 \ --enable-gdm-xsession \ --with-plymouth \ @@ -224,7 +225,7 @@ %install %make_install -find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print +find %{buildroot} -name '*.la' -type f -delete -print # Do not ship the systemd.service file: openSUSE uses xdm, which enables the DM based on sysconfig. rm %{buildroot}%{systemdsystemunitdir}/gdm.service ## Install PAM files. @@ -248,9 +249,6 @@ false %endif ln -s gdm $RPM_BUILD_ROOT/etc/pam.d/gdm-password -# move the pam module out of _prefix -mkdir -p %{buildroot}/%{_lib}/security -mv %{buildroot}%{_libdir}/security/pam_gdm.so %{buildroot}/%{_lib}/security/ ## Install other files # Install PostLogin script. mv $RPM_BUILD_ROOT%{_sysconfdir}/gdm/PostLogin/Default.sample $RPM_BUILD_ROOT%{_sysconfdir}/gdm/PostLogin/Default ++++++ gdm-3.22.1.tar.xz -> gdm-3.24.0.tar.xz ++++++ ++++ 3024 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/NEWS new/gdm-3.24.0/NEWS --- old/gdm-3.22.1/NEWS 2016-10-12 19:58:19.000000000 +0200 +++ new/gdm-3.24.0/NEWS 2017-03-20 22:25:41.000000000 +0100 @@ -1,3 +1,37 @@ +=============== +Version 3.24.0 +=============== + +=============== +Version 3.23.92 +=============== +- Be more robust against misconfigured autologin systems + +================= +Version 3.23.91.1 +================= +- Fix regression in wayland fallback code +- Fix for headless sessions +- Change around how PostLogin/PostSession scripts are run +- Fix XDMCP in network environments with poor network resolution +- Don't try to user switch with XDMCP +- Translation updates + +=============== +Version 3.23.91 +=============== +- Small fix to environment variable importing +- Add configure knob to turn off user X server + +============== +Version 3.23.4 +============== +- Make X11DisplayName property accurate +- Fix bug that forced wayland on second logins even if user didn't pick it +- kill clients from display on logout (multiseat and xdmcp only) +- send hangup to process group when session exits +- allow specifying pam_gdm install location to configure + ============== Version 3.22.1 ============== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/common/gdm-address.c new/gdm-3.24.0/common/gdm-address.c --- old/gdm-3.22.1/common/gdm-address.c 2016-09-21 21:27:19.000000000 +0200 +++ new/gdm-3.24.0/common/gdm-address.c 2017-03-03 21:32:41.000000000 +0100 @@ -220,14 +220,13 @@ static void _gdm_address_debug (GdmAddress *address, - const char *hostname, const char *host, const char *port) { - g_debug ("Address family:%d (%s) hostname:%s host:%s port:%s local:%d loopback:%d", + g_debug ("Address family:%d (%s) host:%s port:%s local:%d loopback:%d", + address->ss->ss_family, address_family_str (address) ? address_family_str (address) : "(null)", - hostname ? hostname : "(null)", host ? host : "(null)", port ? port : "(null)", gdm_address_is_local (address), @@ -237,13 +236,14 @@ void gdm_address_debug (GdmAddress *address) { - char *hostname; - char *host; - char *port; + char *hostname = NULL; + char *host = NULL; + char *port = NULL; - gdm_address_get_hostname (address, &hostname); gdm_address_get_numeric_info (address, &host, &port); + _gdm_address_debug (address, host, port); + g_free (hostname); g_free (host); g_free (port); @@ -277,7 +277,8 @@ err_msg = gai_strerror (res); g_warning ("Unable to lookup hostname: %s", err_msg ? err_msg : "(null)"); - _gdm_address_debug (address, NULL, NULL, NULL); + _gdm_address_debug (address, NULL, NULL); + } /* try numeric? */ @@ -318,7 +319,7 @@ err_msg = gai_strerror (res); g_warning ("Unable to lookup numeric info: %s", err_msg ? err_msg : "(null)"); - _gdm_address_debug (address, NULL, NULL, NULL); + _gdm_address_debug (address, NULL, NULL); } else { ret = TRUE; } @@ -404,8 +405,6 @@ address = gdm_address_new_from_sockaddr ((struct sockaddr *)&ifreq.ifr_addr, sizeof (struct sockaddr)); - gdm_address_debug (address); - *list = g_list_append (*list, address); } } @@ -437,7 +436,8 @@ memset (&hints, 0, sizeof (hints)); hints.ai_family = AF_UNSPEC; - hints.ai_flags = AI_CANONNAME; + hints.ai_flags = AI_CANONNAME | AI_NUMERICHOST; + g_debug ("GdmAddress: looking up hostname: %s", hostbuf); result = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/config.h.in new/gdm-3.24.0/config.h.in --- old/gdm-3.22.1/config.h.in 2016-10-12 20:04:02.000000000 +0200 +++ new/gdm-3.24.0/config.h.in 2017-03-20 22:26:47.000000000 +0100 @@ -71,6 +71,9 @@ /* Define to enable systemd journal support */ #undef ENABLE_SYSTEMD_JOURNAL +/* Define if user display servers are supported */ +#undef ENABLE_USER_DISPLAY_SERVER + /* Define to enable wayland support */ #undef ENABLE_WAYLAND_SUPPORT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/configure.ac new/gdm-3.24.0/configure.ac --- old/gdm-3.22.1/configure.ac 2016-10-12 19:58:41.000000000 +0200 +++ new/gdm-3.24.0/configure.ac 2017-03-20 22:26:08.000000000 +0100 @@ -1,7 +1,7 @@ AC_PREREQ([2.60]) AC_INIT([gdm], - [3.22.1], + [3.24.0], [http://bugzilla.gnome.org/enter_bug.cgi?product=gdm]) AC_CONFIG_SRCDIR([daemon/gdm-manager.c]) @@ -63,7 +63,7 @@ GLIB_REQUIRED_VERSION=2.36.0 GTK_REQUIRED_VERSION=2.91.1 LIBCANBERRA_GTK_REQUIRED_VERSION=0.4 -ACCOUNTS_SERVICE_REQUIRED_VERSION=0.6.12 +ACCOUNTS_SERVICE_REQUIRED_VERSION=0.6.35 EXTRA_COMPILE_WARNINGS(yes) @@ -84,6 +84,7 @@ gio-2.0 >= $GLIB_REQUIRED_VERSION gio-unix-2.0 >= $GLIB_REQUIRED_VERSION accountsservice >= $ACCOUNTS_SERVICE_REQUIRED_VERSION + xcb ) AC_SUBST(DAEMON_CFLAGS) AC_SUBST(DAEMON_LIBS) @@ -194,6 +195,16 @@ AC_DEFINE(ENABLE_SPLIT_AUTHENTICATION, 1, [Define if split authentication is enabled]) fi +AC_ARG_ENABLE(user-display-server, + AS_HELP_STRING([--enable-user-display-server], + [Enable running X server as user @<:@default=yes@:>@]),, + enable_user_display_server=yes) +AM_CONDITIONAL(ENABLE_USER_DISPLAY_SERVER, test x$user_display_server = xyes) + +if test x$enable_user_display_server = xyes; then + AC_DEFINE(ENABLE_USER_DISPLAY_SERVER, 1, [Define if user display servers are supported]) +fi + AC_ARG_WITH(default-pam-config, AS_HELP_STRING([--with-default-pam-config: One of redhat, openembedded, exherbo, lfs, arch, none @<:@default=auto@:>@])) dnl If not given, try autodetecting from release files (see NetworkManager source) @@ -476,7 +487,7 @@ dnl - Check for PAM stuff dnl --------------------------------------------------------------------------- -dnl PAM prefix +dnl PAM prefix (configuration files) withval="" AC_ARG_WITH(pam-prefix, AS_HELP_STRING([--with-pam-prefix=<prefix>], @@ -492,6 +503,14 @@ fi AC_SUBST(PAM_PREFIX) +dnl PAM dir (dynamic modules) +AC_ARG_WITH([pam-mod-dir], + [AS_HELP_STRING([--with-pam-mod-dir=DIR], + [directory to install pam modules in])], + [], [with_pam_mod_dir='${libdir}/security']) +PAM_MOD_DIR="$with_pam_mod_dir" +AC_SUBST(PAM_MOD_DIR) + have_pam=no AC_CHECK_LIB(pam, pam_start, have_pam=yes) @@ -1581,6 +1600,7 @@ dbus-1 system.d dir: ${DBUS_SYS_DIR} PAM prefix: ${PAM_PREFIX} + PAM module dir: ${PAM_MOD_DIR} PAM config: ${with_default_pam_config} X server: ${X_SERVER} " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-display.c new/gdm-3.24.0/daemon/gdm-display.c --- old/gdm-3.22.1/daemon/gdm-display.c 2016-09-21 21:27:19.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-display.c 2017-03-10 19:48:42.000000000 +0100 @@ -34,8 +34,7 @@ #include <glib/gi18n.h> #include <glib-object.h> -#include <X11/Xlib.h> -#include <X11/Xatom.h> +#include <xcb/xcb.h> #include "gdm-common.h" #include "gdm-display.h" @@ -76,7 +75,8 @@ guint finish_idle_id; - Display *x11_display; + xcb_connection_t *xcb_connection; + int xcb_screen_number; GDBusConnection *connection; GdmDisplayAccessFile *user_access_file; @@ -292,32 +292,17 @@ } static void -setup_xhost_auth (XHostAddress *host_entries, - XServerInterpretedAddress *si_entries) +setup_xhost_auth (XHostAddress *host_entries) { - si_entries[0].type = "localuser"; - si_entries[0].typelength = strlen ("localuser"); - si_entries[1].type = "localuser"; - si_entries[1].typelength = strlen ("localuser"); - si_entries[2].type = "localuser"; - si_entries[2].typelength = strlen ("localuser"); - - si_entries[0].value = "root"; - si_entries[0].valuelength = strlen ("root"); - si_entries[1].value = GDM_USERNAME; - si_entries[1].valuelength = strlen (GDM_USERNAME); - si_entries[2].value = "gnome-initial-setup"; - si_entries[2].valuelength = strlen ("gnome-initial-setup"); - host_entries[0].family = FamilyServerInterpreted; - host_entries[0].address = (char *) &si_entries[0]; - host_entries[0].length = sizeof (XServerInterpretedAddress); + host_entries[0].address = "localuser\0root"; + host_entries[0].length = sizeof ("localuser\0root"); host_entries[1].family = FamilyServerInterpreted; - host_entries[1].address = (char *) &si_entries[1]; - host_entries[1].length = sizeof (XServerInterpretedAddress); + host_entries[1].address = "localuser\0" GDM_USERNAME; + host_entries[1].length = sizeof ("localuser\0" GDM_USERNAME); host_entries[2].family = FamilyServerInterpreted; - host_entries[2].address = (char *) &si_entries[2]; - host_entries[2].length = sizeof (XServerInterpretedAddress); + host_entries[2].address = "localuser\0gnome-initial-setup"; + host_entries[2].length = sizeof ("localuser\0gnome-initial-setup"); } gboolean @@ -331,8 +316,8 @@ gboolean res; int i; - XServerInterpretedAddress si_entries[3]; XHostAddress host_entries[3]; + xcb_void_cookie_t cookies[3]; g_return_val_if_fail (GDM_IS_DISPLAY (self), FALSE); @@ -382,14 +367,25 @@ /* Remove access for the programs run by greeter now that the * user session is starting. */ - setup_xhost_auth (host_entries, si_entries); - gdm_error_trap_push (); + setup_xhost_auth (host_entries); + for (i = 0; i < G_N_ELEMENTS (host_entries); i++) { - XRemoveHost (self->priv->x11_display, &host_entries[i]); + cookies[i] = xcb_change_hosts_checked (self->priv->xcb_connection, + XCB_HOST_MODE_DELETE, + host_entries[i].family, + host_entries[i].length, + (uint8_t *) host_entries[i].address); } - XSync (self->priv->x11_display, False); - if (gdm_error_trap_pop ()) { - g_warning ("Failed to remove greeter program access to the display. Trying to proceed."); + + for (i = 0; i < G_N_ELEMENTS (cookies); i++) { + xcb_generic_error_t *xcb_error; + + xcb_error = xcb_request_check (self->priv->xcb_connection, cookies[i]); + + if (xcb_error != NULL) { + g_warning ("Failed to remove greeter program access to the display. Trying to proceed."); + free (xcb_error); + } } return TRUE; @@ -649,6 +645,41 @@ return TRUE; } +static void +gdm_display_disconnect (GdmDisplay *self) +{ + /* These 3 bits are reserved/unused by the X protocol */ + guint32 unused_bits = 0b11100000000000000000000000000000; + XID highest_client, client; + guint32 client_increment; + const xcb_setup_t *setup; + + if (self->priv->xcb_connection == NULL) { + return; + } + + setup = xcb_get_setup (self->priv->xcb_connection); + + /* resource_id_mask is the bits given to each client for + * addressing resources */ + highest_client = (XID) ~unused_bits & ~setup->resource_id_mask; + client_increment = setup->resource_id_mask + 1; + + /* Kill every client but ourselves, then close our own connection + */ + for (client = 0; + client <= highest_client; + client += client_increment) { + + if (client != setup->resource_id_base) + xcb_kill_client (self->priv->xcb_connection, client); + } + + xcb_flush (self->priv->xcb_connection); + + g_clear_pointer (&self->priv->xcb_connection, xcb_disconnect); +} + gboolean gdm_display_unmanage (GdmDisplay *self) { @@ -658,6 +689,8 @@ g_debug ("GdmDisplay: unmanage display"); + gdm_display_disconnect (self); + g_timer_stop (self->priv->server_timer); if (self->priv->user_access_file != NULL) { @@ -943,7 +976,7 @@ g_value_set_boolean (value, self->priv->is_local); break; case PROP_IS_CONNECTED: - g_value_set_boolean (value, self->priv->x11_display != NULL); + g_value_set_boolean (value, self->priv->xcb_connection != NULL); break; case PROP_LAUNCH_ENVIRONMENT: g_value_set_object (value, self->priv->launch_environment); @@ -1187,7 +1220,7 @@ "x11-display-name", "x11-display-name", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (object_class, PROP_SEAT_ID, g_param_spec_string ("seat-id", @@ -1593,70 +1626,78 @@ } } +static xcb_window_t +get_root_window (xcb_connection_t *connection, + int screen_number) +{ + xcb_screen_t *screen = NULL; + xcb_screen_iterator_t iter; + + iter = xcb_setup_roots_iterator (xcb_get_setup (connection)); + while (iter.rem) { + if (screen_number == 0) + screen = iter.data; + screen_number--; + xcb_screen_next (&iter); + } + + if (screen != NULL) { + return screen->root; + } + + return XCB_WINDOW_NONE; +} + static void gdm_display_set_windowpath (GdmDisplay *self) { /* setting WINDOWPATH for clients */ - Atom prop; - Atom actualtype; - int actualformat; - unsigned long nitems; - unsigned long bytes_after; - unsigned char *buf; + xcb_intern_atom_cookie_t atom_cookie; + xcb_intern_atom_reply_t *atom_reply = NULL; + xcb_get_property_cookie_t get_property_cookie; + xcb_get_property_reply_t *get_property_reply = NULL; + xcb_window_t root_window = XCB_WINDOW_NONE; const char *windowpath; char *newwindowpath; - unsigned long num; + uint32_t num; char nums[10]; int numn; - prop = XInternAtom (self->priv->x11_display, "XFree86_VT", False); - if (prop == None) { + atom_cookie = xcb_intern_atom (self->priv->xcb_connection, 0, strlen("XFree86_VT"), "XFree86_VT"); + atom_reply = xcb_intern_atom_reply (self->priv->xcb_connection, atom_cookie, NULL); + + if (atom_reply == NULL) { g_debug ("no XFree86_VT atom\n"); - return; - } - if (XGetWindowProperty (self->priv->x11_display, - DefaultRootWindow (self->priv->x11_display), prop, 0, 1, - False, AnyPropertyType, &actualtype, &actualformat, - &nitems, &bytes_after, &buf)) { - g_debug ("no XFree86_VT property\n"); - return; + goto out; } - if (nitems != 1) { - g_debug ("%lu items in XFree86_VT property!\n", nitems); - XFree (buf); - return; + root_window = get_root_window (self->priv->xcb_connection, + self->priv->xcb_screen_number); + + if (root_window == XCB_WINDOW_NONE) { + g_debug ("couldn't find root window\n"); + goto out; } - switch (actualtype) { - case XA_CARDINAL: - case XA_INTEGER: - case XA_WINDOW: - switch (actualformat) { - case 8: - num = (*(uint8_t *)(void *)buf); - break; - case 16: - num = (*(uint16_t *)(void *)buf); - break; - case 32: - num = (*(long *)(void *)buf); - break; - default: - g_debug ("format %d in XFree86_VT property!\n", actualformat); - XFree (buf); - return; - } - break; - default: - g_debug ("type %lx in XFree86_VT property!\n", actualtype); - XFree (buf); - return; + get_property_cookie = xcb_get_property (self->priv->xcb_connection, + FALSE, + root_window, + atom_reply->atom, + XCB_ATOM_INTEGER, + 0, + 1); + + get_property_reply = xcb_get_property_reply (self->priv->xcb_connection, get_property_cookie, NULL); + + if (get_property_reply == NULL) { + g_debug ("no XFree86_VT property\n"); + goto out; } - XFree (buf); + + num = ((uint32_t *) xcb_get_property_value (get_property_reply))[0]; windowpath = getenv ("WINDOWPATH"); - numn = snprintf (nums, sizeof (nums), "%lu", num); + numn = snprintf (nums, sizeof (nums), "%u", num); if (!windowpath) { newwindowpath = malloc (numn + 1); sprintf (newwindowpath, "%s", nums); @@ -1666,11 +1707,15 @@ } g_setenv ("WINDOWPATH", newwindowpath, TRUE); +out: + g_clear_pointer (&atom_reply, free); + g_clear_pointer (&get_property_reply, free); } gboolean gdm_display_connect (GdmDisplay *self) { + xcb_auth_info_t *auth_info = NULL; gboolean ret; ret = FALSE; @@ -1679,21 +1724,26 @@ /* Get access to the display independent of current hostname */ if (self->priv->x11_cookie != NULL) { - XSetAuthorization ("MIT-MAGIC-COOKIE-1", - strlen ("MIT-MAGIC-COOKIE-1"), - (gpointer) - self->priv->x11_cookie, - self->priv->x11_cookie_size); + auth_info = g_alloca (sizeof (xcb_auth_info_t)); + + auth_info->namelen = strlen ("MIT-MAGIC-COOKIE-1"); + auth_info->name = "MIT-MAGIC-COOKIE-1"; + auth_info->datalen = self->priv->x11_cookie_size; + auth_info->data = self->priv->x11_cookie; + } - self->priv->x11_display = XOpenDisplay (self->priv->x11_display_name); + self->priv->xcb_connection = xcb_connect_to_display_with_auth_info (self->priv->x11_display_name, + auth_info, + &self->priv->xcb_screen_number); - if (self->priv->x11_display == NULL) { + if (xcb_connection_has_error (self->priv->xcb_connection)) { + g_clear_pointer (&self->priv->xcb_connection, xcb_disconnect); g_warning ("Unable to connect to display %s", self->priv->x11_display_name); ret = FALSE; } else if (self->priv->is_local) { - XServerInterpretedAddress si_entries[3]; XHostAddress host_entries[3]; + xcb_void_cookie_t cookies[3]; int i; g_debug ("GdmDisplay: Connected to display %s", self->priv->x11_display_name); @@ -1701,17 +1751,27 @@ /* Give programs access to the display independent of current hostname */ - setup_xhost_auth (host_entries, si_entries); - - gdm_error_trap_push (); + setup_xhost_auth (host_entries); for (i = 0; i < G_N_ELEMENTS (host_entries); i++) { - XAddHost (self->priv->x11_display, &host_entries[i]); + cookies[i] = xcb_change_hosts_checked (self->priv->xcb_connection, + XCB_HOST_MODE_INSERT, + host_entries[i].family, + host_entries[i].length, + (uint8_t *) host_entries[i].address); } - XSync (self->priv->x11_display, False); - if (gdm_error_trap_pop ()) { - g_debug ("Failed to give some system users access to the display. Trying to proceed."); + for (i = 0; i < G_N_ELEMENTS (cookies); i++) { + xcb_generic_error_t *xcb_error; + + xcb_error = xcb_request_check (self->priv->xcb_connection, cookies[i]); + + if (xcb_error != NULL) { + g_debug ("Failed to give system user '%s' access to the display. Trying to proceed.", host_entries[i].address + sizeof ("localuser")); + free (xcb_error); + } else { + g_debug ("Gave system user '%s' access to the display.", host_entries[i].address + sizeof ("localuser")); + } } gdm_display_set_windowpath (self); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-local-display-factory.c new/gdm-3.24.0/daemon/gdm-local-display-factory.c --- old/gdm-3.22.1/daemon/gdm-local-display-factory.c 2016-09-21 21:27:20.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-local-display-factory.c 2017-03-10 19:48:42.000000000 +0100 @@ -206,7 +206,17 @@ g_debug ("GdmLocalDisplayFactory: Creating transient display"); +#ifdef ENABLE_USER_DISPLAY_SERVER display = gdm_local_display_new (); +#else + if (display == NULL) { + guint32 num; + + num = take_next_display_number (factory); + + display = gdm_legacy_display_new (num); + } +#endif g_object_set (display, "seat-id", "seat0" @@ -358,13 +368,14 @@ g_debug ("GdmLocalDisplayFactory: Adding display on seat %s", seat_id); - +#ifdef ENABLE_USER_DISPLAY_SERVER if (g_strcmp0 (seat_id, "seat0") == 0) { display = gdm_local_display_new (); if (session_type != NULL) { g_object_set (G_OBJECT (display), "session-type", session_type, NULL); } } +#endif if (display == NULL) { guint32 num; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-manager-glue.c new/gdm-3.24.0/daemon/gdm-manager-glue.c --- old/gdm-3.22.1/daemon/gdm-manager-glue.c 2016-10-12 20:00:32.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-manager-glue.c 2017-03-13 19:28:29.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.49.6. DO NOT EDIT. + * Generated by gdbus-codegen 2.51.2. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-manager-glue.h new/gdm-3.24.0/daemon/gdm-manager-glue.h --- old/gdm-3.22.1/daemon/gdm-manager-glue.h 2016-10-12 20:00:32.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-manager-glue.h 2017-03-13 19:28:29.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.49.6. DO NOT EDIT. + * Generated by gdbus-codegen 2.51.2. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-manager.c new/gdm-3.24.0/daemon/gdm-manager.c --- old/gdm-3.22.1/daemon/gdm-manager.c 2016-09-21 21:27:20.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-manager.c 2017-03-10 19:55:57.000000000 +0100 @@ -34,6 +34,8 @@ #include <glib/gstdio.h> #include <glib-object.h> +#include <act/act-user-manager.h> + #include <systemd/sd-login.h> #include "gdm-common.h" @@ -618,10 +620,12 @@ if (existing_session != NULL) { ssid_to_activate = gdm_session_get_session_id (existing_session); - res = activate_session_id (manager, seat_id, ssid_to_activate); - if (! res) { - g_debug ("GdmManager: unable to activate session: %s", ssid_to_activate); - goto out; + if (seat_id != NULL) { + res = activate_session_id (manager, seat_id, ssid_to_activate); + if (! res) { + g_debug ("GdmManager: unable to activate session: %s", ssid_to_activate); + goto out; + } } res = session_unlock (manager, ssid_to_activate); @@ -781,8 +785,10 @@ if (session != NULL) { GPid pid; - if (x11_display_name != NULL) + if (x11_display_name != NULL) { g_object_set (G_OBJECT (session), "display-name", x11_display_name, NULL); + g_object_set (G_OBJECT (display), "x11-display-name", x11_display_name, NULL); + } /* FIXME: this should happen in gdm-session.c when the session is opened */ @@ -1250,25 +1256,6 @@ return enabled; } -static gboolean -display_should_autologin (GdmManager *manager, - GdmDisplay *display) -{ - gboolean enabled = FALSE; - - if (manager->priv->ran_once) { - return FALSE; - } - - if (!display_is_on_seat0 (display)) { - return FALSE; - } - - enabled = get_automatic_login_details (manager, NULL); - - return enabled; -} - static void maybe_start_pending_initial_login (GdmManager *manager, GdmDisplay *greeter_display) @@ -1329,9 +1316,6 @@ GdmSession *session; char *display_session_type = NULL; gboolean is_initial; -#ifdef ENABLE_WAYLAND_SUPPORT - gboolean greeter_would_have_been_wayland; -#endif /* 0 is root user; since the daemon talks to the session object * directly, itself, for automatic login @@ -1343,15 +1327,8 @@ "session-type", &display_session_type, NULL); -#ifdef ENABLE_WAYLAND_SUPPORT - greeter_would_have_been_wayland = g_strcmp0 (display_session_type, "wayland") == 0; -#endif - g_object_set (G_OBJECT (session), "display-is-initial", is_initial, -#ifdef ENABLE_WAYLAND_SUPPORT - "ignore-wayland", !greeter_would_have_been_wayland, -#endif NULL); g_debug ("GdmManager: Starting automatic login conversation"); @@ -1362,13 +1339,8 @@ set_up_greeter_session (GdmManager *manager, GdmDisplay *display) { - GdmSession *session; const char *allowed_user; struct passwd *passwd_entry; -#ifdef ENABLE_WAYLAND_SUPPORT - char *display_session_type = NULL; - gboolean greeter_is_wayland; -#endif allowed_user = get_username_for_greeter_display (manager, display); @@ -1380,21 +1352,89 @@ return; } - session = create_embryonic_user_session_for_display (manager, display, passwd_entry->pw_uid); + create_embryonic_user_session_for_display (manager, display, passwd_entry->pw_uid); + gdm_display_start_greeter_session (display); +} -#ifdef ENABLE_WAYLAND_SUPPORT - /* If the greeter display isn't a wayland session, - * then don't allow the user session to be a wayland - * session either. - */ - g_object_get (G_OBJECT (display), - "session-type", &display_session_type, - NULL); - greeter_is_wayland = g_strcmp0 (display_session_type, "wayland") == 0; - g_object_set (G_OBJECT (session), "ignore-wayland", !greeter_is_wayland, NULL); -#endif +static void +set_up_automatic_login_session_if_user_exists (GdmManager *manager, + GdmDisplay *display, + ActUser *user) +{ + if (act_user_is_nonexistent (user)) + set_up_greeter_session (manager, display); + else + set_up_automatic_login_session (manager, display); +} - gdm_display_start_greeter_session (display); +typedef struct { + GdmManager *manager; + GdmDisplay *display; + char *username; +} UsernameLookupOperation; + +static void +destroy_username_lookup_operation (UsernameLookupOperation *operation) +{ + g_object_unref (operation->manager); + g_object_unref (operation->display); + g_free (operation->username); + g_free (operation); +} + +static void +on_user_is_loaded_changed (ActUser *user, + GParamSpec *pspec, + UsernameLookupOperation *operation) +{ + if (act_user_is_loaded (user)) { + set_up_automatic_login_session_if_user_exists (operation->manager, operation->display, user); + g_signal_handlers_disconnect_by_func (G_OBJECT (user), + G_CALLBACK (on_user_is_loaded_changed), + operation); + destroy_username_lookup_operation (operation); + } +} + +static void +set_up_session (GdmManager *manager, + GdmDisplay *display) +{ + ActUserManager *user_manager; + ActUser *user; + gboolean loaded; + gboolean autologin_enabled = FALSE; + char *username = NULL; + + if (!manager->priv->ran_once && display_is_on_seat0 (display)) + autologin_enabled = get_automatic_login_details (manager, &username); + + if (!autologin_enabled) { + set_up_greeter_session (manager, display); + g_free (username); + return; + } + + /* Check whether the user really exists before committing to autologin. */ + user_manager = act_user_manager_get_default (); + user = act_user_manager_get_user (user_manager, username); + g_object_get (user_manager, "is-loaded", &loaded, NULL); + + if (loaded) { + set_up_automatic_login_session_if_user_exists (manager, display, user); + } else { + UsernameLookupOperation *operation; + + operation = g_new (UsernameLookupOperation, 1); + operation->manager = g_object_ref (manager); + operation->display = g_object_ref (display); + operation->username = username; + + g_signal_connect (user, + "notify::is-loaded", + G_CALLBACK (on_user_is_loaded_changed), + operation); + } } static void @@ -1441,17 +1481,8 @@ g_object_get (display, "session-class", &session_class, NULL); - if (g_strcmp0 (session_class, "greeter") == 0) { - gboolean will_autologin; - - will_autologin = display_should_autologin (manager, display); - - if (will_autologin) { - set_up_automatic_login_session (manager, display); - } else { - set_up_greeter_session (manager, display); - } - } + if (g_strcmp0 (session_class, "greeter") == 0) + set_up_session (manager, display); g_free (session_class); } @@ -1759,6 +1790,15 @@ } static void +on_session_start_failed (GdmSession *session, + const char *service_name, + GdmManager *manager) +{ + g_debug ("GdmManager: session failed to start"); + remove_user_session (manager, session); +} + +static void on_user_session_exited (GdmSession *session, int code, GdmManager *manager) @@ -2060,6 +2100,10 @@ char *display_auth_file = NULL; char *display_seat_id = NULL; char *display_id = NULL; +#ifdef ENABLE_WAYLAND_SUPPORT + char *display_session_type = NULL; + gboolean greeter_is_wayland; +#endif g_object_get (G_OBJECT (display), "id", &display_id, @@ -2068,6 +2112,9 @@ "remote-hostname", &remote_hostname, "x11-authority-file", &display_auth_file, "seat-id", &display_seat_id, +#ifdef ENABLE_WAYLAND_SUPPORT + "session-type", &display_session_type, +#endif NULL); display_device = get_display_device (manager, display); @@ -2130,6 +2177,10 @@ G_CALLBACK (on_user_session_started), manager); g_signal_connect (session, + "session-start-failed", + G_CALLBACK (on_session_start_failed), + manager); + g_signal_connect (session, "session-exited", G_CALLBACK (on_user_session_exited), manager); @@ -2143,6 +2194,12 @@ g_object_ref (session), (GDestroyNotify) clean_embryonic_user_session); + +#ifdef ENABLE_WAYLAND_SUPPORT + greeter_is_wayland = g_strcmp0 (display_session_type, "wayland") == 0; + g_object_set (G_OBJECT (session), "ignore-wayland", !greeter_is_wayland, NULL); +#endif + return session; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-session-worker.c new/gdm-3.24.0/daemon/gdm-session-worker.c --- old/gdm-3.22.1/daemon/gdm-session-worker.c 2016-09-21 21:27:21.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-session-worker.c 2017-03-10 19:48:42.000000000 +0100 @@ -1666,6 +1666,8 @@ worker->priv->service, status); + killpg (pid, SIGHUP); + worker->priv->child_pid = -1; worker->priv->child_watch_id = 0; run_script (worker, GDMCONFDIR "/PostSession"); @@ -1854,6 +1856,24 @@ jump_to_vt (worker, worker->priv->session_vt); } + if (!worker->priv->is_program_session && !run_script (worker, GDMCONFDIR "/PostLogin")) { + g_set_error (error, + GDM_SESSION_WORKER_ERROR, + GDM_SESSION_WORKER_ERROR_OPENING_SESSION, + "Failed to execute PostLogin script"); + error_code = PAM_ABORT; + goto out; + } + + if (!worker->priv->is_program_session && !run_script (worker, GDMCONFDIR "/PreSession")) { + g_set_error (error, + GDM_SESSION_WORKER_ERROR, + GDM_SESSION_WORKER_ERROR_OPENING_SESSION, + "Failed to execute PreSession script"); + error_code = PAM_ABORT; + goto out; + } + session_pid = fork (); if (session_pid < 0) { @@ -2102,6 +2122,41 @@ } static gboolean +set_xdg_vtnr_to_current_vt (GdmSessionWorker *worker) +{ + int fd; + char vt_string[256]; + struct vt_stat vt_state = { 0 }; + + fd = open ("/dev/tty0", O_RDWR | O_NOCTTY); + + if (fd < 0) { + g_debug ("GdmSessionWorker: couldn't open VT master: %m"); + return FALSE; + } + + if (ioctl (fd, VT_GETSTATE, &vt_state) < 0) { + g_debug ("GdmSessionWorker: couldn't get current VT: %m"); + goto fail; + } + + close (fd); + fd = -1; + + g_snprintf (vt_string, sizeof (vt_string), "%d", vt_state.v_active); + + gdm_session_worker_set_environment_variable (worker, + "XDG_VTNR", + vt_string); + + return TRUE; + +fail: + close (fd); + return FALSE; +} + +static gboolean set_up_for_current_vt (GdmSessionWorker *worker, GError **error) { @@ -2166,6 +2221,14 @@ g_free (pam_xauth); } #endif + + if (g_strcmp0 (worker->priv->display_seat_id, "seat0") == 0) { + g_debug ("GdmSessionWorker: setting XDG_VTNR to current vt"); + set_xdg_vtnr_to_current_vt (worker); + } else { + g_debug ("GdmSessionWorker: not setting XDG_VTNR since not seat0"); + } + return TRUE; out: return FALSE; @@ -2206,14 +2269,6 @@ flags |= PAM_SILENT; } - if (!run_script (worker, GDMCONFDIR "/PostLogin")) { - g_set_error (error, - GDM_SESSION_WORKER_ERROR, - GDM_SESSION_WORKER_ERROR_OPENING_SESSION, - "Failed to execute PostLogin script"); - return FALSE; - } - error_code = pam_open_session (worker->priv->pam_handle, flags); if (error_code != PAM_SUCCESS) { @@ -2229,14 +2284,6 @@ session_id = gdm_session_worker_get_environment_variable (worker, "XDG_SESSION_ID"); - /* FIXME: should we do something here? - * Note that error return status from PreSession script should - * be ignored in the case of a X-GDM-BypassXsession session, which can - * be checked by calling: - * gdm_session_bypasses_xsession (session) - */ - run_script (worker, GDMCONFDIR "/PreSession"); - if (session_id != NULL) { g_free (worker->priv->session_id); worker->priv->session_id = session_id; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-session.c new/gdm-3.24.0/daemon/gdm-session.c --- old/gdm-3.22.1/daemon/gdm-session.c 2016-09-21 21:27:21.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-session.c 2017-03-20 22:25:03.000000000 +0100 @@ -340,10 +340,9 @@ static const char ** get_system_session_dirs (GdmSession *self) { - static const char *search_dirs[] = { -#ifdef ENABLE_WAYLAND_SUPPORT - DATADIR "/wayland-sessions/", -#endif + static GArray *search_array = NULL; + + static const char *x_search_dirs[] = { "/etc/X11/sessions/", DMCONFDIR "/Sessions/", DATADIR "/gdm/BuiltInSessions/", @@ -351,13 +350,25 @@ NULL }; + static const char *wayland_search_dir = DATADIR "/wayland-sessions/"; + + if (search_array == NULL) { + search_array = g_array_new (TRUE, TRUE, sizeof (char *)); + + g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs)); + #ifdef ENABLE_WAYLAND_SUPPORT - if (self->priv->ignore_wayland) { - return search_dirs + 1; - } + if (!self->priv->ignore_wayland) { +#ifdef ENABLE_USER_DISPLAY_SERVER + g_array_prepend_val (search_array, wayland_search_dir); +#else + g_array_append_val (search_array, wayland_search_dir); #endif + } +#endif + } - return search_dirs; + return (const char **) search_array->data; } static gboolean @@ -3102,6 +3113,7 @@ return GDM_SESSION_DISPLAY_MODE_REUSE_VT; } +#ifdef ENABLE_USER_DISPLAY_SERVER /* All other cases (wayland login screen, X login screen, * wayland user session, X user session) use the NEW_VT * display mode. That display mode means that GDM allocates @@ -3124,6 +3136,18 @@ * are paused when handed out. */ return GDM_SESSION_DISPLAY_MODE_NEW_VT; +#else + +#ifdef ENABLE_WAYLAND_SUPPORT + /* Wayland sessions are for now assumed to run in a + * mutter-launch-like environment, so we allocate + * a new VT for them. */ + if (g_strcmp0 (self->priv->session_type, "wayland") == 0) { + return GDM_SESSION_DISPLAY_MODE_NEW_VT; + } +#endif + return GDM_SESSION_DISPLAY_MODE_REUSE_VT; +#endif } void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-wayland-session.c new/gdm-3.24.0/daemon/gdm-wayland-session.c --- old/gdm-3.22.1/daemon/gdm-wayland-session.c 2016-09-21 21:54:52.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-wayland-session.c 2017-03-10 19:48:42.000000000 +0100 @@ -301,7 +301,7 @@ for (i = 0; state->environment[i] != NULL; i++) { g_auto(GStrv) environment_entry = NULL; - if (state->environment[i] == '\0') { + if (state->environment[i][0] == '\0') { continue; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-x-session.c new/gdm-3.24.0/daemon/gdm-x-session.c --- old/gdm-3.22.1/daemon/gdm-x-session.c 2016-09-21 21:27:21.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-x-session.c 2017-03-20 22:25:03.000000000 +0100 @@ -619,7 +619,7 @@ for (i = 0; state->environment[i] != NULL; i++) { g_auto(GStrv) environment_entry = NULL; - if (state->environment[i] == '\0') { + if (state->environment[i][0] == '\0') { continue; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/daemon/gdm-xdmcp-display-factory.c new/gdm-3.24.0/daemon/gdm-xdmcp-display-factory.c --- old/gdm-3.22.1/daemon/gdm-xdmcp-display-factory.c 2016-09-21 21:27:21.000000000 +0200 +++ new/gdm-3.24.0/daemon/gdm-xdmcp-display-factory.c 2017-03-10 19:48:42.000000000 +0100 @@ -210,7 +210,10 @@ static void gdm_xdmcp_display_factory_class_init (GdmXdmcpDisplayFactoryClass *klass); static void gdm_xdmcp_display_factory_init (GdmXdmcpDisplayFactory *manager); static void gdm_xdmcp_display_factory_finalize (GObject *object); - +static void gdm_xdmcp_send_alive (GdmXdmcpDisplayFactory *factory, + GdmAddress *address, + CARD16 dspnum, + CARD32 sessid); static gpointer xdmcp_display_factory_object = NULL; G_DEFINE_TYPE (GdmXdmcpDisplayFactory, gdm_xdmcp_display_factory, GDM_TYPE_DISPLAY_FACTORY) @@ -2065,6 +2068,9 @@ GdmDisplayStore *store; GdmLaunchEnvironment *launch_environment; GdmSession *session; + GdmAddress *address; + gint32 session_number; + int display_number; store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory)); @@ -2081,6 +2087,13 @@ g_debug ("GdmXdmcpDisplayFactory: xdmcp display status changed: %d", status); switch (status) { case GDM_DISPLAY_FINISHED: + g_object_get (display, + "remote-address", &address, + "x11-display-number", &display_number, + "session-number", &session_number, + NULL); + gdm_xdmcp_send_alive (factory, address, display_number, session_number); + gdm_display_store_remove (store, display); break; case GDM_DISPLAY_FAILED: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/libgdm/gdm-client-glue.h new/gdm-3.24.0/libgdm/gdm-client-glue.h --- old/gdm-3.22.1/libgdm/gdm-client-glue.h 2016-10-12 20:00:32.000000000 +0200 +++ new/gdm-3.24.0/libgdm/gdm-client-glue.h 2017-03-13 19:28:30.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.49.6. DO NOT EDIT. + * Generated by gdbus-codegen 2.51.2. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/libgdm/gdm.pc new/gdm-3.24.0/libgdm/gdm.pc --- old/gdm-3.22.1/libgdm/gdm.pc 2016-10-12 20:04:12.000000000 +0200 +++ new/gdm-3.24.0/libgdm/gdm.pc 2017-03-20 22:27:15.000000000 +0100 @@ -5,6 +5,6 @@ Name: GDM Client Library Description: Client Library for communicating with GDM daemon -Version: 3.22.1 +Version: 3.24.0 Libs: -L${libdir} -lgdm Cflags: -I${includedir}/gdm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/pam_gdm/Makefile.am new/gdm-3.24.0/pam_gdm/Makefile.am --- old/gdm-3.22.1/pam_gdm/Makefile.am 2016-09-21 21:27:27.000000000 +0200 +++ new/gdm-3.24.0/pam_gdm/Makefile.am 2017-03-20 22:25:03.000000000 +0100 @@ -36,4 +36,4 @@ pam_gdm.la \ $(END_OF_LIST) -pam_gdmdir = $(libdir)/security +pam_gdmdir = $(PAM_MOD_DIR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gdm-3.22.1/po/be.po new/gdm-3.24.0/po/be.po --- old/gdm-3.22.1/po/be.po 2016-09-21 21:27:28.000000000 +0200 +++ new/gdm-3.24.0/po/be.po 2017-03-20 22:25:03.000000000 +0100 @@ -1,19 +1,41 @@ # Vital Khilko <doj...@mova.org>, 2002, 2003. # Alexander Nyakhaychyk <nyakhayc...@gmail.com>, 2003, 2004, 2009. # Ihar Hrachyshka <ihar.hrachys...@gmail.com>, 2011, 2012, 2013. +# Yuras Shumovich <shumovi...@gmail.com>, 2017. msgid "" msgstr "" "Project-Id-Version: gdm.master\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-10-27 15:41-0400\n" -"PO-Revision-Date: 2012-09-07 19:07+0300\n" -"Last-Translator: Ihar Hrachyshka <ihar.hrachys...@gmail.com>\n" +"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" +"product=gdm&keywords=I18N+L10N&component=general\n" +"POT-Creation-Date: 2017-02-21 21:05+0000\n" +"PO-Revision-Date: 2017-03-02 19:02+0300\n" +"Last-Translator: Yuras Shumovich <shumovi...@gmail.com>\n" "Language-Team: Belarusian <i18n-bel-gn...@googlegroups.com>\n" "Language: be\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.0.2\n" +"X-Generator: Poedit 1.8.11\n" + +#: ../chooser/gdm-host-chooser-dialog.c:147 +msgid "Select System" +msgstr "Выберыце сістэму" + +#: ../chooser/gdm-host-chooser-widget.c:215 +msgid "XDMCP: Could not create XDMCP buffer!" +msgstr "XDMCP: не ўдалося стварыць XDMCP-буфер." + +#: ../chooser/gdm-host-chooser-widget.c:221 +msgid "XDMCP: Could not read XDMCP header!" +msgstr "XDMCP: не ўдалося прачытаць XDMCP-загаловак." + +#: ../chooser/gdm-host-chooser-widget.c:227 +msgid "XDMCP: Incorrect XDMCP version!" +msgstr "XDMCP: хібная версія XDMCP." + +#: ../chooser/gdm-host-chooser-widget.c:233 +msgid "XDMCP: Unable to parse address" +msgstr "XDMCP: не ўдалося разабраць адрас" #: ../common/gdm-common.c:298 #, c-format @@ -56,67 +78,70 @@ "diagnose. In the meantime this display will be disabled. Please restart GDM " "when the problem is corrected." msgstr "" +"Не ўдалося запусціць X сервер (ваша графічнае асяроддзе) праз унутраную " +"памылку. Калі ласка, звяжыцеся са сваім сістэмным адміністратарам або " +"праверце syslog для дыягностыкі. Гэты манітор пакуль будзе выключаны. " +"Перазапусціце GDM калі праблема будзе выпраўлена." #: ../daemon/gdm-manager.c:766 -#, fuzzy msgid "No display available" -msgstr "Сеанс недаступны" +msgstr "Манітор недаступны" -#: ../daemon/gdm-manager.c:833 ../daemon/gdm-manager.c:1088 +#: ../daemon/gdm-manager.c:835 ../daemon/gdm-manager.c:1090 msgid "No session available" msgstr "Сеанс недаступны" -#: ../daemon/gdm-manager.c:844 +#: ../daemon/gdm-manager.c:846 msgid "Can only be called before user is logged in" -msgstr "" +msgstr "Можа быць вызвана толькі да таго, як карыстальнік пачне сеанс" -#: ../daemon/gdm-manager.c:854 +#: ../daemon/gdm-manager.c:856 msgid "Caller not GDM" -msgstr "" +msgstr "Вызвана не GDM" -#: ../daemon/gdm-manager.c:864 +#: ../daemon/gdm-manager.c:866 msgid "Unable to open private communication channel" -msgstr "" +msgstr "Не ўдалося адкрыць прыватны канал камунікацыі" -#: ../daemon/gdm-server.c:378 +#: ../daemon/gdm-server.c:391 #, c-format msgid "Server was to be spawned by user %s but that user doesn't exist" msgstr "" "Сервер мусіў запусціцца ад імя карыстальніка %s, але такога карыстальніка не " "існуе" -#: ../daemon/gdm-server.c:389 ../daemon/gdm-server.c:409 +#: ../daemon/gdm-server.c:402 ../daemon/gdm-server.c:422 #, c-format msgid "Couldn't set groupid to %d" msgstr "Не ўдалося прызначыць ідэнтыфікатар групы %d" -#: ../daemon/gdm-server.c:395 +#: ../daemon/gdm-server.c:408 #, c-format msgid "initgroups () failed for %s" msgstr "няўдача initgroups() для %s" -#: ../daemon/gdm-server.c:401 +#: ../daemon/gdm-server.c:414 #, c-format msgid "Couldn't set userid to %d" msgstr "Не ўдалося прызначыць ідэнтыфікатар карыстальніка %d" -#: ../daemon/gdm-server.c:479 +#: ../daemon/gdm-server.c:492 #, c-format msgid "%s: Could not open log file for display %s!" msgstr "%s: не ўдалося адкрыць журнальны файл дысплея %s." -#: ../daemon/gdm-server.c:500 ../daemon/gdm-server.c:506 -#: ../daemon/gdm-server.c:512 +#: ../daemon/gdm-server.c:513 ../daemon/gdm-server.c:519 +#: ../daemon/gdm-server.c:525 #, c-format msgid "%s: Error setting %s to %s" msgstr "%1$s: памылка настаўлення значэння %3$s для %2$s" -#: ../daemon/gdm-server.c:532 +#: ../daemon/gdm-server.c:545 #, c-format msgid "%s: Server priority couldn't be set to %d: %s" msgstr "%s: не ўдалося прызначыць серверу прыярытэт %d: %s" -#: ../daemon/gdm-server.c:684 +#: ../daemon/gdm-server.c:697 #, c-format msgid "%s: Empty server command for display %s" msgstr "%s: пусты серверны загад для дысплея %s" @@ -145,7 +170,7 @@ msgid "The display device" msgstr "Прыстасаванне дысплея" -#: ../daemon/gdm-session.c:1193 +#: ../daemon/gdm-session.c:1205 msgid "Could not create authentication helper process" msgstr "Не ўдалося стварыць дапаможны працэс ідэнтыфікацыі" @@ -157,44 +182,38 @@ msgid "Sorry, that didn't work. Please try again." msgstr "Прабачце, але спроба была няўдалай. Паспрабуйце яшчэ раз." -#: ../daemon/gdm-session-worker.c:1010 +#: ../daemon/gdm-session-worker.c:1037 msgid "Username:" msgstr "Імя карыстальніка:" -#: ../daemon/gdm-session-worker.c:1142 -msgid "Your password has expired, please change it now." -msgstr "Ваш пароль састарэў. Калі ласка, зараз жа змяніце яго." - -#: ../daemon/gdm-session-worker.c:1505 ../daemon/gdm-session-worker.c:1522 +#: ../daemon/gdm-session-worker.c:1539 ../daemon/gdm-session-worker.c:1556 #, c-format msgid "no user account available" msgstr "конт карыстальніка не азначаны" -#: ../daemon/gdm-session-worker.c:1549 +#: ../daemon/gdm-session-worker.c:1583 msgid "Unable to change to user" msgstr "Не ўдалося пераключыць карыстальніка" -#: ../daemon/gdm-wayland-session.c:385 -#, fuzzy +#: ../daemon/gdm-wayland-session.c:470 msgid "GNOME Display Manager Wayland Session Launcher" -msgstr "Рабочы працэс сеанса кіраўніка дысплеяў GDM" +msgstr "Стартар сеанса Wayland кіраўніка экрана GNOME" -#: ../daemon/gdm-xdmcp-display-factory.c:609 +#: ../daemon/gdm-xdmcp-display-factory.c:612 msgid "Could not create socket!" msgstr "Не ўдалося стварыць сокет." -#: ../daemon/gdm-x-session.c:686 +#: ../daemon/gdm-x-session.c:812 msgid "Run program through /etc/gdm/Xsession wrapper script" -msgstr "" +msgstr "Запусціць праграму праз сцэнарый-абгортку /etc/gdm/Xsession" -#: ../daemon/gdm-x-session.c:687 +#: ../daemon/gdm-x-session.c:813 msgid "Listen on TCP socket" -msgstr "" +msgstr "Слухаць TCP сокет" -#: ../daemon/gdm-x-session.c:698 -#, fuzzy +#: ../daemon/gdm-x-session.c:824 msgid "GNOME Display Manager X Session Launcher" -msgstr "Рабочы працэс сеанса кіраўніка дысплеяў GDM" +msgstr "Стартар сеанса X кіраўніка экрана GNOME" #: ../daemon/main.c:125 ../daemon/main.c:138 #, c-format @@ -256,20 +275,10 @@ #. Translators: worker is a helper process that does the work #. of starting up a session -#: ../daemon/session-worker-main.c:95 +#: ../daemon/session-worker-main.c:94 msgid "GNOME Display Manager Session Worker" msgstr "Рабочы працэс сеанса кіраўніка дысплеяў GDM" -#: ../data/applications/gnome-shell.desktop.in.h:1 -#: ../data/applications/gnome-shell-wayland.desktop.in.h:1 -msgid "GNOME Shell" -msgstr "GNOME Shell" - -#: ../data/applications/gnome-shell.desktop.in.h:2 -#: ../data/applications/gnome-shell-wayland.desktop.in.h:2 -msgid "Window management and compositing" -msgstr "Кіраванне вокнамі і аконная кампазіцыя" - #: ../data/org.gnome.login-screen.gschema.xml.in.h:1 msgid "Whether or not to allow fingerprint readers for login" msgstr "Ці трэба дазваляць уваход з дапамогай чытальніка адбіткаў пальцаў" @@ -314,23 +323,19 @@ #: ../data/org.gnome.login-screen.gschema.xml.in.h:8 msgid "" -"The login screen can optionally show a small image at the top of its user " -"list to provide site administrators and distributions a way to provide " -"branding." -msgstr "" -"Экран уваходу таксама можа паказваць невялікую выяву над спісам " -"карыстальнікаў, што можа прыдацца сістэмным адміністратарам і дыстрыбутывам " -"у справе брэндынгу." +"The login screen can optionally show a small image to provide site " +"administrators and distributions a way to display branding." +msgstr "" +"Экран уваходу таксама можа паказваць невялікую выяву, што можа прыдацца " +"сістэмным адміністратарам і дыстрыбутывам у справе брэндынгу." #: ../data/org.gnome.login-screen.gschema.xml.in.h:9 msgid "" -"The fallback login screen can optionally show a small image at the top of " -"its user list to provide site administrators and distributions a way to " -"provide branding." -msgstr "" -"Запасны экран уваходу таксама можа паказваць невялікую выяву над спісам " -"карыстальнікаў, што можа прыдацца сістэмным адміністратарам і дыстрыбутывам " -"у справе брэндынгу." +"The fallback login screen can optionally show a small image to provide site " +"administrators and distributions a way to display branding." +msgstr "" +"Запасны экран уваходу таксама можа паказваць невялікую выяву, што можа " +"прыдацца сістэмным адміністратарам і дыстрыбутывам у справе брэндынгу." #: ../data/org.gnome.login-screen.gschema.xml.in.h:10 msgid "Avoid showing user list" @@ -381,26 +386,6 @@ "Колькасць няўдалых спроб ідэнтыфікацыі, дазволеных карыстальніку, да " "вяртання на экран выбару карыстальніка." -#: ../gui/simple-chooser/gdm-host-chooser-dialog.c:147 -msgid "Select System" -msgstr "Выберыце сістэму" - -#: ../gui/simple-chooser/gdm-host-chooser-widget.c:215 -msgid "XDMCP: Could not create XDMCP buffer!" -msgstr "XDMCP: не ўдалося стварыць XDMCP-буфер." - -#: ../gui/simple-chooser/gdm-host-chooser-widget.c:221 -msgid "XDMCP: Could not read XDMCP header!" -msgstr "XDMCP: не ўдалося прачытаць XDMCP-загаловак." - -#: ../gui/simple-chooser/gdm-host-chooser-widget.c:227 -msgid "XDMCP: Incorrect XDMCP version!" -msgstr "XDMCP: хібная версія XDMCP." - -#: ../gui/simple-chooser/gdm-host-chooser-widget.c:233 -msgid "XDMCP: Unable to parse address" -msgstr "XDMCP: не ўдалося разабраць адрас" - #: ../libgdm/gdm-user-switching.c:59 msgid "Unable to create transient display: " msgstr "Не ўдалося стварыць пераходны дысплей: " @@ -444,13 +429,11 @@ msgid "Take a picture of the screen" msgstr "Зрабіць экранны здымак" +#~ msgid "Your password has expired, please change it now." +#~ msgstr "Ваш пароль састарэў. Калі ласка, зараз жа змяніце яго." +#~ msgid "GNOME Shell" +#~ msgstr "GNOME Shell" - - - - - - - - +#~ msgid "Window management and compositing" +#~ msgstr "Кіраванне вокнамі і аконная кампазіцыя"