From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: sudo -s -H (was: Tramp 2.0 -> 2.1 migration woes) Date: Tue, 29 Jan 2008 21:58:38 +0100 Message-ID: <87wspsl56p.fsf@gmx.de> References: <20080127040051.GA16241@Clio.twb.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1201640089 21065 80.91.229.12 (29 Jan 2008 20:54:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2008 20:54:49 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, rfrancoise@debian.org To: "Trent W. Buck" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 29 21:55:09 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JJxTw-0003mA-Ri for ged-emacs-devel@m.gmane.org; Tue, 29 Jan 2008 21:55:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJxTV-0003ul-W5 for ged-emacs-devel@m.gmane.org; Tue, 29 Jan 2008 15:54:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJxTR-0003tg-SW for emacs-devel@gnu.org; Tue, 29 Jan 2008 15:54:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJxTR-0003t7-5O for emacs-devel@gnu.org; Tue, 29 Jan 2008 15:54:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJxTQ-0003sr-Uj for emacs-devel@gnu.org; Tue, 29 Jan 2008 15:54:28 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJxTQ-0001ka-QV for emacs-devel@gnu.org; Tue, 29 Jan 2008 15:54:28 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JJxTQ-0008L5-6R for emacs-pretest-bug@gnu.org; Tue, 29 Jan 2008 15:54:28 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JJxTN-0001jO-7k for emacs-pretest-bug@gnu.org; Tue, 29 Jan 2008 15:54:28 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JJxTM-0001io-Pu for emacs-pretest-bug@gnu.org; Tue, 29 Jan 2008 15:54:25 -0500 Original-Received: (qmail invoked by alias); 29 Jan 2008 20:54:21 -0000 Original-Received: from p57A22549.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.37.73] by mail.gmx.net (mp006) with SMTP; 29 Jan 2008 21:54:21 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19zIR50QIZzge5sN6wmI1JBT1uHajYhkgwwOw0lfE oe4tI2ewl0FH9g In-Reply-To: <20080127040051.GA16241@Clio.twb.ath.cx> (Trent W. Buck's message of "Sun, 27 Jan 2008 15:00:53 +1100") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87752 gmane.emacs.pretest.bugs:20805 Archived-At: --=-=-= "Trent W. Buck" writes: > sudo -s (without -H) now aborts connection > ========================================== > > My .bashrc (et al) is mode 0600 (readable only by me). If I run "sudo > -u zippy -s" in a shell, I get the (ignorable) error > > bash: /home/twb/.bashrc: Permission denied > > Because $HOME is still /home/twb. For this reason I use sudo -i or > (on legacy systems) sudo -H -s in interactive shells. I've added "-H" to the sudo options. "-s" is already there. That shall provide backwards compatibility on all systems Tramp is running. See the appended patch. "sudo -i" might be preferrable for systems which support it, but it would be additional effort for testing this option. This contradicts performance consideratons. Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment *** /home/albinus/src/tramp/lisp/tramp.el 2008-01-29 21:35:59.000000000 +0100 --- /home/albinus/src/tramp/lisp/tramp.el.~2.626.~ 2008-01-28 22:10:50.000000000 +0100 *************** *** 441,447 **** (tramp-password-end-of-line nil)) ("sudo" (tramp-login-program "sudo") (tramp-login-args (("-u" "%u") ! ("-s") ("-H") ("-p" "Password:"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program nil) (tramp-copy-args nil) --- 441,447 ---- (tramp-password-end-of-line nil)) ("sudo" (tramp-login-program "sudo") (tramp-login-args (("-u" "%u") ! ("-s" "-p" "Password:"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program nil) (tramp-copy-args nil) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--