From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joel Ray Holveck Newsgroups: gmane.emacs.bugs Subject: bug#23914: 24.5; tramp-get-remote-path fails with some shells if tramp-own-remote-path is used Date: Fri, 08 Jul 2016 01:57:28 -0700 Message-ID: <87bn28a4nb.fsf@thor.piquan.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467968309 27254 80.91.229.3 (8 Jul 2016 08:58:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2016 08:58:29 +0000 (UTC) To: 23914@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 08 10:58:19 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bLRc0-0002xc-PQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 10:58:17 +0200 Original-Received: from localhost ([::1]:44350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLRbz-0003If-Tu for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 04:58:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLRbs-0003IP-N8 for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 04:58:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLRbn-0002ou-Cg for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 04:58:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLRbn-0002oo-8Q for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 04:58:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLRbm-0000Xv-L3 for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 04:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joel Ray Holveck Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Jul 2016 08:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23914 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14679682772086 (code B ref -1); Fri, 08 Jul 2016 08:58:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jul 2016 08:57:57 +0000 Original-Received: from localhost ([127.0.0.1]:41706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLRbg-0000XZ-K5 for submit@debbugs.gnu.org; Fri, 08 Jul 2016 04:57:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLRbe-0000XK-1A for submit@debbugs.gnu.org; Fri, 08 Jul 2016 04:57:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLRbX-0002mw-4F for submit@debbugs.gnu.org; Fri, 08 Jul 2016 04:57:48 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLRbX-0002me-19 for submit@debbugs.gnu.org; Fri, 08 Jul 2016 04:57:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLRbU-0003IA-0S for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 04:57:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLRbO-0002lx-Qt for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 04:57:43 -0400 Original-Received: from thor.piquan.org ([64.81.48.72]:34208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLRbO-0002lX-Cw for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 04:57:38 -0400 Original-Received: from thor.piquan.org (localhost [127.0.0.1]) by thor.piquan.org (8.15.2/8.15.2) with ESMTPS id u688vTGJ075990 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 8 Jul 2016 01:57:29 -0700 (PDT) (envelope-from joelh@piquan.org) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=piquan.org; s=201307; t=1467968249; bh=Cvl6lA/ofBESr8lMuPRyPMnXdSZIBVdr3JyE5cJKJIs=; h=From:To:Subject:Date; b=Y+LpIthifZw2scYL0fZqF1cl+rjzK/rMaCb9HqrUVpn5op0Nxn2BkwfbYrugMoBy/ p96JhjkfLitH6RexIVv3QaGR7FcAdrUs30wAPNombn8hqG5HxjGZ4xd2v+6Y4LCMYo jARH4Dnr8lWRk67JNSN24/nLQ2bOfouVu6kKjRF0= Original-Received: (from joelh@localhost) by thor.piquan.org (8.15.2/8.15.2/Submit) id u688vTxG075989; Fri, 8 Jul 2016 01:57:29 -0700 (PDT) (envelope-from joelh@piquan.org) X-Authentication-Warning: thor.piquan.org: joelh set sender to joelh@piquan.org using -f Precedence: first-class X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120614 Archived-At: On FreeBSD, if tramp-own-remote-path is a member of, then using tramp's sudo method raises an error similar to: byte-code: `/bin/sh -l -c 'echo 9905dea968fdd4a549d307a722e8109b \"$PATH\"'' returns with error On FreeBSD, /bin/sh does not accept the -l flag. bash, dash, and ksh do, but that's not part of the POSIX shell requirements (see http://pubs.opengroup.org/onlinepubs/009695399/utilities/sh.html), and historically the Bourne shell doesn't. This can be traced to tramp-get-remote-path, where it sends the command "%s -l %s 'echo %s \\\"$PATH\\\"'", where the first %s is the shell. I typically remove the -l flag in that function to make my Emacs work. Again, this only applies if tramp-own-remote-path is a member of tramp-remote-path; otherwise, that part of the code isn't invoked. It's not there by default, but it's very useful. In GNU Emacs 24.5.1 (i386-portbld-freebsd10.3, X toolkit, Xaw scroll bars) of 2016-06-01 on thor.piquan.org Configured using: `configure --localstatedir=/var --with-dbus --without-file-notification --with-gconf --with-gif --with-gnutls --with-gsettings --with-jpeg --with-m17n-flt --with-imagemagick --with-libotf --with-png --with-toolkit-scroll-bars --with-rsvg --with-tiff --with-x --with-xft --with-xim --with-xml2 --with-xpm --with-x-toolkit=athena --without-xaw3d --with-sound=oss --x-libraries=/usr/local/lib --x-includes=/usr/local/include --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/share/emacs/info/ --build=i386-portbld-freebsd10.3 'CFLAGS=-O2 -pipe -O2 -fno-strict-aliasing -pipe -march=athlon64 -isystem /usr/local/include -fstack-protector' 'CPPFLAGS=-isystem /usr/local/include' 'LDFLAGS= -ltinfo -L/usr/local/lib -Wl,-rpath=/usr/local/lib -fstack-protector'' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t eldoc-mode: t minibuffer-electric-default-mode: t mail-abbrevs-mode: t iswitchb-mode: t desktop-save-mode: t savehist-mode: t which-function-mode: t auto-insert-mode: t show-paren-mode: t display-time-mode: t recentf-mode: t msb-mode: t shell-dirtrack-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: x is undefined i is undefined t is undefined s is undefined Quit Back to top level. Mark saved where search started Mark set Mark saved where search started [2 times] Abbrev mode enabled Load-path shadows: /usr/local/share/emacs/24.5/site-lisp/site-start hides /usr/local/share/emacs/site-lisp/site-start ~/src/elisp/dict hides /usr/local/share/emacs/site-lisp/dict /usr/local/share/emacs/24.5/site-lisp/flim/md4 hides /usr/local/share/emacs/24.5/lisp/md4 /usr/local/share/emacs/24.5/site-lisp/flim/hex-util hides /usr/local/share/emacs/24.5/lisp/hex-util /usr/local/share/emacs/24.5/site-lisp/flim/sasl hides /usr/local/share/emacs/24.5/lisp/net/sasl /usr/local/share/emacs/24.5/site-lisp/flim/sasl-ntlm hides /usr/local/share/emacs/24.5/lisp/net/sasl-ntlm /usr/local/share/emacs/24.5/site-lisp/flim/sasl-digest hides /usr/local/share/emacs/24.5/lisp/net/sasl-digest /usr/local/share/emacs/24.5/site-lisp/flim/sasl-cram hides /usr/local/share/emacs/24.5/lisp/net/sasl-cram /usr/local/share/emacs/24.5/site-lisp/flim/ntlm hides /usr/local/share/emacs/24.5/lisp/net/ntlm /usr/local/share/emacs/24.5/site-lisp/flim/hmac-md5 hides /usr/local/share/emacs/24.5/lisp/net/hmac-md5 /usr/local/share/emacs/24.5/site-lisp/flim/hmac-def hides /usr/local/share/emacs/24.5/lisp/net/hmac-def /usr/local/share/emacs/24.5/site-lisp/semi/smime hides /usr/local/share/emacs/24.5/lisp/gnus/smime /usr/local/share/emacs/24.5/site-lisp/semi/pgg hides /usr/local/share/emacs/24.5/lisp/obsolete/pgg /usr/local/share/emacs/24.5/site-lisp/semi/pgg-pgp5 hides /usr/local/share/emacs/24.5/lisp/obsolete/pgg-pgp5 /usr/local/share/emacs/24.5/site-lisp/semi/pgg-pgp hides /usr/local/share/emacs/24.5/lisp/obsolete/pgg-pgp /usr/local/share/emacs/24.5/site-lisp/semi/pgg-parse hides /usr/local/share/emacs/24.5/lisp/obsolete/pgg-parse /usr/local/share/emacs/24.5/site-lisp/semi/pgg-gpg hides /usr/local/share/emacs/24.5/lisp/obsolete/pgg-gpg /usr/local/share/emacs/24.5/site-lisp/semi/pgg-def hides /usr/local/share/emacs/24.5/lisp/obsolete/pgg-def Features: (kmacro edebug grep compile ispell cl-indent pp shadow sort mail-extr warnings emacsbug message idna rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils debug eieio-opt speedbar sb-image ezimage dframe find-func help-mode misearch multi-isearch diff-mode easy-mmode vc-bzr vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher dired-aux dired-x dired add-log vc-git tramp-cmds xterm eldoc jka-compr minibuf-eldef mailabbrev iswitchb icomplete desktop frameset cus-start cus-load savehist vcursor disp-table derived which-func imenu slime-autoloads autoinsert cl-macs paren time server cl gv tramp-cache tramp-sh recentf tree-widget wid-edit msb tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cl-extra cl-loaddefs cl-lib cconv eieio-core gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color ring format-spec advice help-fns easymenu printing ps-print ps-def lpr midnight time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty emacs) Memory information: ((conses 8 229927 39585) (symbols 24 29501 23) (miscs 20 699 1170) (strings 16 46836 4950) (string-bytes 1 1343106) (vectors 8 19069) (vector-slots 4 483571 17204) (floats 8 400 479) (intervals 28 12307 319) (buffers 512 30)) -- Joel Ray Holveck - joelh@piquan.org Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped