components/gnome/gdm/patches/0004-sdtlogin.patch
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Wed, 11 Jan 2017 22:42:51 -0800
changeset 7567 1ac26224c2cb
parent 7201 bcc18175756d
permissions -rw-r--r--
25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3 25104110 after vt-switching back to gdm, ctrl-c in a gnome-terminal crashes the session
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
     1
From b3b1da1e6dde351b0eb8f72e11933259640229ca Mon Sep 17 00:00:00 2001
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     2
From: Alan Coopersmith <[email protected]>
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
     3
Date: Wed, 11 Jan 2017 22:39:59 -0800
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     4
Subject: [PATCH 04/19] sdtlogin
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     5
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     6
Adds SDTLOGIN interface, which drops the Xserver to user
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     7
perms rather than running as root, for added security on Solaris.
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     8
Original date:2008-05-06 owner:yippi type:feature
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     9
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    10
For the original definition, see Sun ASARC case 1995/390.
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    11
For the current implementation in the X server, see sun-src/os/dtlogin.c
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    12
and dtlogin-userinfo.patch in open-src/xserver/xorg in the X gate.
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    13
---
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    14
 common/gdm-common.h         |   5 ++
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    15
 daemon/gdm-server.c         |  11 ++++
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    16
 daemon/gdm-session-worker.c | 119 ++++++++++++++++++++++++++++++++++++++++++++
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    17
 daemon/main.c               |  15 ++++++
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    18
 4 files changed, 150 insertions(+)
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    19
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    20
diff --git a/common/gdm-common.h b/common/gdm-common.h
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    21
index 19dbbbb..6ac61c0 100644
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    22
--- a/common/gdm-common.h
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    23
+++ b/common/gdm-common.h
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    24
@@ -42,6 +42,11 @@ GQuark gdm_common_error_quark (void);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    25
 typedef char * (*GdmExpandVarFunc) (const char *var,
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    26
                                     gpointer user_data);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    27
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    28
+#ifdef __sun
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    29
+#define GDM_DT_DIR "/var/dt"
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    30
+#define GDM_SDTLOGIN_DIR "/var/dt/sdtlogin"
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    31
+#endif
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    32
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    33
 G_BEGIN_DECLS
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    34
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    35
 int            gdm_wait_on_pid           (int pid);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    36
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    37
index 08f2354..2cec263 100644
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    38
--- a/daemon/gdm-server.c
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    39
+++ b/daemon/gdm-server.c
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    40
@@ -742,6 +742,17 @@ gdm_server_spawn (GdmServer    *server,
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    41
                 goto out;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    42
         }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    43
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    44
+#if __sun
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    45
+        /* Remove old communication pipe, if present */
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    46
+        char *display_num = strchr(server->priv->display_name, ':');
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    47
+        if (display_num != NULL && display_num[1] != '\0') {
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    48
+                char *old_pipe = g_strdup_printf ("%s/%s", GDM_SDTLOGIN_DIR,
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    49
+                                                  display_num + 1);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    50
+                VE_IGNORE_EINTR (g_remove (old_pipe));
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    51
+                g_free (old_pipe);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    52
+        }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    53
+#endif
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    54
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    55
         env = get_server_environment (server);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    56
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    57
         freeme = g_strjoinv (" ", argv);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    58
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    59
index 291caad..0b5ac16 100644
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    60
--- a/daemon/gdm-session-worker.c
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    61
+++ b/daemon/gdm-session-worker.c
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    62
@@ -38,6 +38,7 @@
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    63
 #include <pwd.h>
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    64
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    65
 #if __sun
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    66
+#include <sys/param.h>
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    67
 #define GDM_PAM_QUAL
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    68
 #else
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    69
 #define GDM_PAM_QUAL const
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    70
@@ -2044,6 +2045,118 @@ out:
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    71
         return fd;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    72
 }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    73
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    74
+#ifdef __sun
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    75
+static void
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    76
+solaris_xserver_cred (const char *username, struct passwd *passwd_entry,
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    77
+                      const char *x11_display_name)
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    78
+{
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    79
+        static FILE *fp;
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    80
+        struct stat statbuf;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    81
+        gid_t  groups[NGROUPS_UMAX];
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    82
+        char *tmp, *p, pipe[MAXPATHLEN], info[MAXPATHLEN];
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    83
+        int display_number = 0;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    84
+        int fd, i;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    85
+        int ngroups;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    86
+
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    87
+        if (fp == NULL) {	/* Open & setup fp on first access */
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    88
+                /*
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    89
+                 * Handshake with server. Make sure it created a pipe.
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    90
+                 * Open and write.
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    91
+                 */
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    92
+                if ((tmp = strstr (x11_display_name, ":")) != NULL) {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    93
+                        tmp++;
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    94
+                        display_number = g_ascii_strtod (tmp, &p);
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    95
+
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    96
+                        if (errno != 0) {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    97
+                                g_warning ("solaris_xserver_cred: problem"
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    98
+                                           " getting display number\n");
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
    99
+                                return;
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   100
+                        }
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   101
+                }
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   102
+
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   103
+                if (stat (GDM_SDTLOGIN_DIR, &statbuf) == 0) {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   104
+                        if (! S_ISDIR(statbuf.st_mode)) {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   105
+                                g_warning ("solaris_xserver_cred: %s is not"
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   106
+                                           " a directory\n", GDM_SDTLOGIN_DIR);
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   107
+                                return;
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   108
+                        }
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   109
+                } else {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   110
+                        g_warning ("solaris_xserver_cred: %s: %s\n",
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   111
+                                   GDM_SDTLOGIN_DIR, g_strerror(errno));
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   112
+                        return;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   113
+                }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   114
+
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   115
+                snprintf (pipe, sizeof(pipe), "%s/%d",
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   116
+                          GDM_SDTLOGIN_DIR, display_number);
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   117
+                fd = open (pipe, O_RDWR | O_CLOEXEC | O_NOFOLLOW);
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   118
+
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   119
+                if (fd < 0) {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   120
+                        g_warning ("solaris_xserver_cred: could not open"
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   121
+                                   " %s: %s\n", pipe, g_strerror(errno));
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   122
+                        return;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   123
+                }
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   124
+                if (fstat (fd, &statbuf) == 0 ) {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   125
+                        if (! S_ISFIFO(statbuf.st_mode)) {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   126
+                                close (fd);
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   127
+                                g_warning ("solaris_xserver_cred: %s is not"
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   128
+                                           " a pipe\n", pipe);
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   129
+                                return;
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   130
+                        }
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   131
+                } else {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   132
+                        close (fd);
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   133
+                        g_warning ("solaris_xserver_cred: %s: %s\n",
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   134
+                                   pipe, g_strerror(errno));
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   135
+                        return;
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   136
+                }
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   137
+                fp = fdopen (fd, "w");
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   138
+                if (fp == NULL) {
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   139
+                        close (fd);
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   140
+                        g_warning ("solaris_xserver_cred: could not fdopen"
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   141
+                                   " %s: %s\n", pipe, g_strerror(errno));
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   142
+                        return;
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   143
+                }
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   144
+        }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   145
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   146
+        snprintf (info, sizeof(info), "GID=\"%d\"; ", passwd_entry->pw_gid);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   147
+        fputs (info, fp);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   148
+        g_debug ("solaris_xserver_cred: %s\n", info);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   149
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   150
+        if (initgroups (username, passwd_entry->pw_gid) == -1) {
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   151
+                ngroups = 0;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   152
+        } else {
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   153
+                ngroups = getgroups (NGROUPS_UMAX, groups);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   154
+        }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   155
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   156
+        for (i=0; i < ngroups; i++) {
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   157
+                snprintf (info, sizeof(info), "G_LIST_ID=\"%u\" ", groups[i]);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   158
+                fputs (info, fp);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   159
+                g_debug ("solaris_xserver_cred: %s\n", info);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   160
+        }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   161
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   162
+        if (ngroups > 0) {
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   163
+                fputc (';', fp);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   164
+        }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   165
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   166
+        snprintf (info, sizeof(info), " HOME=\"%s\" ", passwd_entry->pw_dir);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   167
+        fputs (info, fp);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   168
+        g_debug ("solaris_xserver_cred: %s\n", info);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   169
+
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   170
+        snprintf (info, sizeof(info), " UID=\"%d\" EOF=\"\";",
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   171
+                  passwd_entry->pw_uid);
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   172
+        fputs (info, fp);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   173
+        g_debug ("solaris_xserver_cred: %s\n", info);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   174
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   175
+        /*
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   176
+         * Handshake with server. Make sure it read the pipe.
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   177
+         *
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   178
+         * Do not close file descriptor, but leave it open for further use.
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   179
+         */
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   180
+        VE_IGNORE_EINTR (fflush (fp));
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   181
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   182
+        return;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   183
+}
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   184
+#endif
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   185
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   186
 static gboolean
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   187
 gdm_session_worker_start_session (GdmSessionWorker  *worker,
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   188
                                   GError           **error)
7567
1ac26224c2cb 25108326 Switching from GNOME 3 to console and back kills keyboard input in GNOME3
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 7201
diff changeset
   189
@@ -2061,6 +2174,12 @@ gdm_session_worker_start_session (GdmSessionWorker  *worker,
7201
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   190
                          worker->priv->arguments[0]);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   191
         }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   192
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   193
+#ifdef __sun
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   194
+        solaris_xserver_cred (worker->priv->username,
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   195
+                              passwd_entry,
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   196
+                              worker->priv->x11_display_name);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   197
+#endif
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   198
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   199
         error_code = PAM_SUCCESS;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   200
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   201
 #ifdef WITH_SYSTEMD
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   202
diff --git a/daemon/main.c b/daemon/main.c
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   203
index ca2dda3..50f6e94 100644
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   204
--- a/daemon/main.c
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   205
+++ b/daemon/main.c
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   206
@@ -324,6 +324,21 @@ main (int    argc,
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   207
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   208
         block_sigusr1 ();
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   209
 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   210
+#ifdef __sun
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   211
+        {
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   212
+                struct stat statbuf;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   213
+                int r;
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   214
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   215
+                r = stat (GDM_DT_DIR, &statbuf);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   216
+                if (r < 0) {
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   217
+                        g_mkdir (GDM_DT_DIR, 0755);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   218
+                }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   219
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   220
+                g_remove (GDM_SDTLOGIN_DIR);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   221
+                g_mkdir (GDM_SDTLOGIN_DIR, 0700);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   222
+        }
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   223
+#endif
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   224
+
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   225
         bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   226
         textdomain (GETTEXT_PACKAGE);
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   227
         setlocale (LC_ALL, "");
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   228
-- 
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   229
2.7.4
bcc18175756d 23245293 Move gdm to Userland and update to 3.18.2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   230