GNU bug report logs - #24049
GuixSD - problem with X11 forwarding

Previous Next

Package: guix;

Reported by: myglc2 <myglc2 <at> gmail.com>

Date: Thu, 21 Jul 2016 16:52:02 UTC

Severity: normal

Merged with 22930, 23960

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: myglc2 <myglc2 <at> gmail.com>
Cc: bug-lsh <at> gnu.org, 24049 <at> debbugs.gnu.org
Subject: bug#24049: GuixSD - problem with X11 forwarding
Date: Mon, 01 Aug 2016 12:17:35 +0200
[Message part 1 (text/plain, inline)]
Hi myglc2,

myglc2 <myglc2 <at> gmail.com> skribis:

> On the client, ssh produces ...
>
> 'X11 forwarding request failed on channel 0'
>
> On the headless server (g1) in /var/log/messages ...
>
> Jul 21 12:24:51 localhost lshd[381]: lshd: Failed to cd to `/tmp/.X11-unix' (errno = 2): No such file or directory 
> Jul 21 12:24:51 localhost lshd[381]: lshd: Updating utmp for login failed (errno = 2): No such file or directory 
>
> With this workaround ...
>
> sudo mkdir /tmp/.X11-unix
> sudo chmod 777 /tmp/.X11-unix
>
> ... if I log out and back in X11 forwarding "works"

I believe this is a bug in lshd fixed by something along the lines of
the attached patch.

Niels, what do you think?

(Strangely I can’t find equivalent code in OpenSSH.)

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
--- /tmp/lsh-2.1/src/server_x11.c	2016-08-01 11:58:54.714647794 +0200
+++ /tmp/lsh-2.1/src/server_x11.c.new	2016-08-01 11:58:46.606563478 +0200
@@ -151,7 +151,7 @@ DEFINE_COMMAND(open_forwarded_x11)
 #define X11_MIN_DISPLAY 10
 #define X11_MAX_DISPLAY 1000
 
-/* FIXME: Create the /tmp/.X11-unix directory, if needed. Figure out
+/* FIXME: Figure out
  * if and how we should use /tmp/.X17-lock. Consider using display
  * "unix:17" instead of just ":17".
  */
@@ -253,6 +253,7 @@ open_x11_socket(struct ssh_channel *chan
 
   old_umask = umask(0077);
   
+  mkdir(X11_SOCKET_DIR, S_IRWXU | S_IRWXG | S_IRWXO | S_ISVTX);
   old_cd = lsh_pushd(X11_SOCKET_DIR, &dir, 0, 0);
   if (old_cd < 0)
     {


This bug report was last modified 4 years and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.