GNU bug report logs - #34192
26.1; Bash 5.0 breaks TRAMP sudo

Previous Next

Package: emacs;

Reported by: Allen Li <darkfeline <at> felesatra.moe>

Date: Thu, 24 Jan 2019 22:16:02 UTC

Severity: normal

Found in version 26.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#34192: closed (26.1; Bash 5.0 breaks TRAMP sudo)
Date: Thu, 21 Feb 2019 11:21:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 21 Feb 2019 12:20:15 +0100
with message-id <87ef815qxc.fsf <at> gmx.de>
and subject line Re: bug#34192: 26.1; Bash 5.0 breaks TRAMP sudo
has caused the debbugs.gnu.org bug report #34192,
regarding 26.1; Bash 5.0 breaks TRAMP sudo
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
34192: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34192
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Allen Li <darkfeline <at> felesatra.moe>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; Bash 5.0 breaks TRAMP sudo
Date: Thu, 24 Jan 2019 22:14:51 +0000
I believe Bash 5.0 breaks TRAMP sudo in
tramp-sh-handle-file-name-all-completions.

Using Bash 5.0 and (find-file "/sudo::/") results in an error "Process
has died".  Setting tramp-verbose to 9 shows that it dies around here:

13:56:22.449785 tramp-maybe-send-script (5) # Sending script
‘tramp_perl_file_name_all_completions’...
13:56:22.449920 tramp-send-command (6) #
tramp_perl_file_name_all_completions () {
\perl -e '
opendir(d, $ARGV[0]) || die("$ARGV[0]: $!\nfail\n");
@files = readdir(d); closedir(d);
foreach $f (@files) {
 if (-d "$ARGV[0]/$f") {
  print "$f/\n";
 }
 else {
  print "$f\n";
 }
}
print "ok\n"
' "$1" 2>/dev/null
} 2>/dev/null; echo tramp_exit_status $?
13:56:25.428280 tramp-maybe-send-script (5) # Sending script
‘tramp_perl_file_name_all_completions’...failed

Note that I cannot reproduce this from emacs -Q because out of the box,
TRAMP sudo does not seem to call
tramp-sh-handle-file-name-all-completions and I don't have time right
now to figure out what setting enables that code path.

Switching my /bin/sh to Dash instead of Bash 5.0 immediately fixed the
problem, which strongly led me to suspect some subtle change in Bash 5.0
broke this.

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-05 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix


[Message part 3 (message/rfc822, inline)]
From: Michael Albinus <michael.albinus <at> gmx.de>
To: Allen Li <darkfeline <at> felesatra.moe>
Cc: 34192-done <at> debbugs.gnu.org
Subject: Re: bug#34192: 26.1; Bash 5.0 breaks TRAMP sudo
Date: Thu, 21 Feb 2019 12:20:15 +0100
Emacs 26.2

Hi Allen,

> I've got an answer from the bash maintainer. He confirms the problem,
> and he has sent also a patch. I've tested the patch; it fixes the
> problem in my environment with bash 5.0.
>
> Will forward that message. So we have to wait for a new bash 5.0.x
> version which fixes this. In the meantime, I'll write a warning in the
> Tramp doc.

I've documented this in the Tramp manual, pushed to the emacs-26
branch. Since there's nothing left on Emacs side we could do, I'm
closing the bug.

Best regards, Michael.


This bug report was last modified 6 years and 94 days ago.

Previous Next


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