summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authorJindrich Makovicka <[email protected]>2019-10-06 10:35:46 +0200
committerZenWalker <[email protected]>2019-10-08 14:58:20 +0200
commit7306f4fd7d5a1ecaf73792fb972ef69a4c6b7349 (patch)
tree3ee9d877f09eeaa76e731a079d22b50bcd6888dc /mate-session
parent0f4d276fe7bfc52c5f88f1698cba7043ca1462f2 (diff)
downloadmate-session-manager-7306f4fd7d5a1ecaf73792fb972ef69a4c6b7349.tar.bz2
mate-session-manager-7306f4fd7d5a1ecaf73792fb972ef69a4c6b7349.tar.xz
Remove GNOME_KEYRING_LIFETIME_FD
Keyring lifetime fd was removed from gnome-keyring in 2009 See "[daemon] Use new control protocol for daemon."
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/msm-gnome.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/mate-session/msm-gnome.c b/mate-session/msm-gnome.c
index 5e9cf02..97e08b8 100644
--- a/mate-session/msm-gnome.c
+++ b/mate-session/msm-gnome.c
@@ -48,29 +48,9 @@
static gboolean gnome_compat_started = FALSE;
-static int keyring_lifetime_pipe[2];
static pid_t gnome_keyring_daemon_pid = 0;
static Window gnome_smproxy_window = None;
-static void
-child_setup (gpointer user_data)
-{
- gint open_max;
- gint fd;
- char *fd_str;
-
- open_max = sysconf (_SC_OPEN_MAX);
- for (fd = 3; fd < open_max; fd++)
- {
- if (fd != keyring_lifetime_pipe[0])
- fcntl (fd, F_SETFD, FD_CLOEXEC);
- }
-
- fd_str = g_strdup_printf ("%d", keyring_lifetime_pipe[0]);
- g_setenv ("GNOME_KEYRING_LIFETIME_FD", fd_str, TRUE);
- g_free (fd_str);
-}
-
static void
gnome_keyring_daemon_startup (void)
@@ -87,26 +67,15 @@ gnome_keyring_daemon_startup (void)
gchar *name;
const gchar *value;
- /* Pipe to slave keyring lifetime to */
- if (pipe (keyring_lifetime_pipe))
- {
- g_warning ("Failed to set up pipe for gnome-keyring: %s", strerror (errno));
- return;
- }
-
error = NULL;
argv[0] = GNOME_KEYRING_DAEMON;
argv[1] = "--start";
argv[2] = NULL;
g_spawn_sync (NULL, argv, NULL,
- G_SPAWN_SEARCH_PATH | G_SPAWN_LEAVE_DESCRIPTORS_OPEN,
- child_setup, NULL,
+ G_SPAWN_SEARCH_PATH,
+ NULL, NULL,
&sout, NULL, &status, &error);
- close (keyring_lifetime_pipe[0]);
- /* We leave keyring_lifetime_pipe[1] open for the lifetime of the session,
- in order to slave the keyring daemon lifecycle to the session. */
-
if (error != NULL)
{
g_printerr ("Failed to run gnome-keyring-daemon: %s\n",