diff options
author | Jindrich Makovicka <[email protected]> | 2019-10-06 10:35:46 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-10-08 14:58:20 +0200 |
commit | 7306f4fd7d5a1ecaf73792fb972ef69a4c6b7349 (patch) | |
tree | 3ee9d877f09eeaa76e731a079d22b50bcd6888dc | |
parent | 0f4d276fe7bfc52c5f88f1698cba7043ca1462f2 (diff) | |
download | mate-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."
-rw-r--r-- | mate-session/msm-gnome.c | 35 |
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", |