unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21697: 24.5; TRAMP to superuser overwrites remote /dev/null eventually
@ 2015-10-17 15:12 Georgiy Tugai
  2015-10-17 18:30 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Georgiy Tugai @ 2015-10-17 15:12 UTC (permalink / raw)
  To: 21697


[-- Attachment #1.1: Type: text/plain, Size: 5256 bytes --]

This bug is quite tricky to reproduce as it requires a significant
amount of TRAMP operations to occur during the same connection to a
machine (or localhost) as superuser.

Here are the commands to reproduce the issue from inside emacs -Q; I
have also attached a dribblefile.

WARNING! These commands will exercise your disk (and CPU) quite a bit by
saving a file via TRAMP 500 times.

C-x C-f /sudo:localhost:/root/temp.txt
RET F3 test F3 RET C-x C-s F4 C-u 500 F4 C-x C-c

I have tracked the issue down to the remote shell (sh) "atomically
overwriting" the HISTFILE (i.e. write to temporary name, copy over
original), thus replacing /dev/null with an ordinary file.

I have reproduced this outside of Emacs, by using the same set of
environment variables TRAMP sets on it's shells

$ ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 Oct 18 01:21 /dev/null
$ su
# HISTSIZE=2 HISTFILE=/dev/null sh
# echo 1
1
# echo 2
2
# echo 3
3
# exit
# ls -l /dev/null
-rw------- 1 root root 14 Oct 18 01:15 /dev/null

--------------------------------------------------------------------------------

In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.10)
 of 2015-04-13 on andromeda.sabayon.org
Windowing system distributor `The X.Org Foundation', version 11.0.11604000
Configured using:
 `configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-dependency-tracking
 --disable-silent-rules --libdir=/usr/lib64 --program-suffix=-emacs-24
 --infodir=/usr/share/info/emacs-24 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --with-gameuser=:gamestat --without-compress-install
 --with-file-notification=inotify --enable-acl --with-dbus --with-gnutls
 --with-gpm --without-hesiod --with-kerberos --with-kerberos5
 --without-xml2 --without-selinux --without-wide-int --with-zlib
 --with-sound=alsa --with-x --without-ns --without-gconf
 --without-gsettings --without-toolkit-scroll-bars --with-gif
 --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
 --without-imagemagick --with-xft --without-libotf --without-m17n-flt
 --with-x-toolkit=gtk3 GENTOO_PACKAGE=app-editors/emacs-24.5 'CFLAGS=-O2
 -march=x86-64 -pipe -nopie' CPPFLAGS= 'LDFLAGS=-Wl,-O1
 -Wl,--as-needed''

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Mark set
delete-forward-char: Text is read-only
Tramp: Opening connection for root@localhost using sudo...
Tramp: Sending command `exec env SHELL=/bin/sh sudo -u root -s -H -p Password:'
Tramp: Waiting for prompts from remote shell...
Tramp: Sending Password
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on `localhost'
Tramp: Opening connection for root@localhost using sudo...done
C-x C-g is undefined

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils apropos help-mode em-unix
em-term term disp-table easymenu ehelp em-script em-prompt em-ls em-hist
em-pred em-glob em-dirs em-cmpl em-basic em-banner em-alias esh-var
esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell
esh-module esh-mode esh-util epa-file epa derived epg epg-config
tramp-cache dired tramp-sh 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
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 inotify dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 127965 10209)
 (symbols 48 22961 0)
 (miscs 40 54 165)
 (strings 32 28721 4697)
 (string-bytes 1 833507)
 (vectors 16 16789)
 (vector-slots 8 476975 5504)
 (floats 8 169 251)
 (intervals 56 2159 1090)
 (buffers 960 16)
 (heap 1024 50763 714))

[-- Attachment #1.2: dribble --]
[-- Type: text/plain, Size: 77 bytes --]

\x18\x06/sudo:localhost:/root/temp.txt<return><f3>test <f3><return>\x18\x13<f4>\x15500<f4>\x18\x03

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#21697: 24.5; TRAMP to superuser overwrites remote /dev/null eventually
  2015-10-17 15:12 bug#21697: 24.5; TRAMP to superuser overwrites remote /dev/null eventually Georgiy Tugai
@ 2015-10-17 18:30 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2015-10-17 18:30 UTC (permalink / raw)
  To: Georgiy Tugai; +Cc: 21697

Georgiy Tugai wrote:

> This bug is quite tricky to reproduce

But easy to find by a web search. :)

http://debbugs.gnu.org/19731

Already fixed for the next release.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-17 18:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-17 15:12 bug#21697: 24.5; TRAMP to superuser overwrites remote /dev/null eventually Georgiy Tugai
2015-10-17 18:30 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).