[gnome-session] main: set SSH_AUTH_SOCK explicitly in wayland sessions



commit a8896ccad65583885735a04205351f48a42f29ae
Author: Ray Strode <rstrode redhat com>
Date:   Wed Oct 14 10:53:39 2015 -0400

    main: set SSH_AUTH_SOCK explicitly in wayland sessions
    
    Until we can get a more complete environment variable
    propagation story figured, implement a quick hack
    for the most pressing one, SSH_AUTH_SOCK.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738205

 gnome-session/main.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gnome-session/main.c b/gnome-session/main.c
index e68b6f4..b48cef4 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -349,6 +349,18 @@ main (int argc, char **argv)
          */
         gsm_util_setenv ("XDG_MENU_PREFIX", "gnome-");
 
+        /* hack to fix keyring until we can reorder things in 3.20
+         * https://bugzilla.gnome.org/show_bug.cgi?id=738205
+         */
+        if (g_strcmp0 (g_getenv ("XDG_SESSION_TYPE"), "wayland") == 0 &&
+            g_getenv ("GSM_SKIP_SSH_AGENT_WORKAROUND") == NULL) {
+                char *ssh_socket;
+
+                ssh_socket = g_build_filename (g_get_user_runtime_dir (), "keyring", "ssh", NULL);
+                gsm_util_setenv ("SSH_AUTH_SOCK", ssh_socket);
+                g_free (ssh_socket);
+        }
+
         gsm_util_set_autostart_dirs (override_autostart_dirs);
         session_name = opt_session_name;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]