GNU bug report logs - #17295
24.3; Add TRAMP fixes for history clobbering to pretest

Previous Next

Package: emacs;

Reported by: Vasilij Schneidermann <v.schneidermann <at> gmail.com>

Date: Fri, 18 Apr 2014 16:36:01 UTC

Severity: normal

Found in version 24.3

Fixed in version 24.4

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: Michael Albinus <michael.albinus <at> gmx.de>
To: Vasilij Schneidermann <v.schneidermann <at> gmail.com>
Cc: 17295 <at> debbugs.gnu.org
Subject: bug#17295: 24.3; Add TRAMP fixes for history clobbering to pretest
Date: Mon, 28 Apr 2014 12:07:53 +0200
Vasilij Schneidermann <v.schneidermann <at> gmail.com> writes:

> Hi Michael,

Hi Vasilij,

[pls keep 17295 <at> debbugs.gnu.org in Cc, for the archives]

> I've applied the patch successfully and did a comparision test between
> both Emacs 24.3.1 and 24.3.90. In that test I first open a file from a
> remote host via `C-x C-f /ssh:user <at> host:/path/to/file`, then open a
> shell, do `ssh user <at> host` and hit `C-p` to check whether the history
> file has been clobbered.
>
> With Emacs 24.3.1 the test output is:
>
> [user <at> host ~]$ exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh
>
> With the patched Emacs 24.3.90 the test output is:
>
> [user <at> host ~]$ exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh
>
> So, the difference seems to be an extra environment variable set.
> Clobbering on the remote side is not prevented. Perhaps it the changes
> prevent it on the local side? I'm not sure as I've only briefly looked
> at TRAMP internals and didn't understand much.

In the past, *all* Tramp commands were visible in your remote history
file. With my patch, only the very first command is still visible, the
one you have quoted. Tramp cannot avoid this behaviour, because it has
no mean to set the remote environment prior running the very first
command. You could do this yourself by creating a local ~/.ssh/environment
file, containing

HISTFILE=/dev/null

See the ssh(1) manpage for details.

The local history shall be clean, because Tramp sets $HISTFILE locally
prior to calling anything.

> Best regards
> Vasilij

Best regards, Michael.




This bug report was last modified 11 years and 17 days ago.

Previous Next


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