7199N/AFrom 05391989747e3c6044329002f0786c37f34a2f6c Mon Sep 17 00:00:00 2001
7199N/AFrom: Alan Coopersmith <alan.coopersmith@oracle.com>
7199N/ADate: Tue, 29 Dec 2015 15:51:45 -0800
7199N/ASubject: [PATCH 07/19] solaris-notty
7199N/AWorkaround the Solaris PAM & auditing subsystems requirements that
7199N/Aevery session cannot be attributed to a single device file, as if
7199N/Awe all still logged in on serial terminals.
7199N/AOriginal date:2009-10-16 owner:yippi type:branding
7199N/A 2 files changed, 81 insertions(+), 4 deletions(-)
7199N/Aindex 3d1d2eb..46c07ca 100644
7199N/A@@ -2467,6 +2472,46 @@ clean_embryonic_user_session (GdmSession *session)
7199N/A+create_device (const char *dev)
7199N/A+ gchar buf[MAXPATHLEN + 1];
7199N/A+ if (dev == NULL || dev[0] == '\0')
7199N/A+ memset (buf, 0, sizeof (gchar) * (MAXPATHLEN + 1));
7199N/A+ if (stat (dev, &st) != 0) {
7199N/A+ g_debug ("Creating pseudo-device %s", dev);
7199N/A+ } else if (readlink (dev, buf, MAXPATHLEN) > 0) {
7199N/A+ if ((utime (dev, &timebuf)) != 0)
7199N/A+ g_debug ("Problem updating access time of pseudo-device %s", dev);
7199N/A+ g_debug ("Touching pseudo-device %s", dev);
7199N/A+ g_debug ("Device %s points to %s", dev, buf);
7199N/A+ g_debug ("Device %s is not a symlink", dev);
7199N/A create_embryonic_user_session_for_display (GdmManager *manager,
7199N/A@@ -2490,6 +2535,9 @@ create_embryonic_user_session_for_display (GdmManager *manager,
7199N/A "seat-id", &display_seat_id,
7199N/A display_device = get_display_device (manager, display);
7199N/A+ if (!display_device && !display_is_local)
7199N/A+ create_device (display_device);
7199N/A session = gdm_session_new (GDM_SESSION_VERIFICATION_MODE_LOGIN,
7199N/Aindex 2cec263..77c18a8 100644
7199N/A@@ -96,6 +96,7 @@ struct GdmServerPrivate
7199N/A@@ -146,15 +147,43 @@ _gdm_server_query_ck_for_display_device (GdmServer *server)
7199N/A g_warning ("Could not run helper: %s", error->message);
7199N/A- g_debug ("GdmServer: Got tty: '%s'", out);
7199N/A+ /* There are several scenarios that the device will be "?"
7199N/A+ * 1. Local sessions without VT support. If the display is ":0",
7199N/A+ * This only happens on those systems do not has VT support such as
7199N/A+ * old Solaris. So far, Linux and OpenSolaris with VT support.
7199N/A+ * 3. Local sessions like Sun Ray, Xvfb, Xvnc, we set device as
7199N/A+ if (g_str_equal (out, "?")) {
7199N/A+ if (!server->priv->is_local) {
7199N/A+ /* This is for XDMCP sessions. */
7199N/A+ if (g_str_equal (server->priv->display_name, ":0")) {
7199N/A+ /* This is for local session run on console. */
7199N/A+ /* This is for local sessions like
7199N/A+ * Sun Ray, Xvfb, Xvnc, etc. */
7199N/A+ g_debug ("GdmServer: Got tty: '%s'", out);