Bug#611487: xterm: immediately exits upon running: exec login USER

January 29th, 2011 - 05:10 pm ET by Jeffrey Sheinberg | Report spam
Package: xterm
Version: 261-1
Severity: normal

Hi,

First of all, please note that I currently have xterm Version: 235-2
installed.

With xterm Version: 261-1 installed, when I run this command,

$ exec login USER

the xterm immediately exits. This problem does not occur with prior
versions of xterm installed, eg, Version: 235-2.

Note that on my system, login is setuid root, thus enabling exec-ing
login from the base level shell, on e.g., tty1, pts/2, to work.

$ ls -l /bin/login
-rwsr-xr-x 1 root root 36896 Sep 25 18:05 /bin/login

Here is a typescript of the correct xterm behavior using Version: 235-2.

$ id
uid01(jeff) gid01(jeff) groups01(jeff),4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),201(xlocal)

$ exec login jss
Password:
Last login: Sat Jan 22 16:57:50 EST 2011 on pts/6
Linux l2 2.6.32-5-amd64 #1 SMP Wed Jan 12 05:14:59 UTC 2011 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have mail.

$ id
uid02(jss) gid02(jss) groups02(jss),4(adm),29(audio),201(xlocal)

$ who
jeff tty1 Jan 29 16:11
jeff pts/1 Jan 29 16:13 (:0.0)
jeff pts/0 Jan 29 16:13 (:0.0)
jsroot pts/2 Jan 29 16:13 (:0.0)
jss pts/3 Jan 29 16:28 (:0.0)
jsroot pts/4 Jan 29 16:13 (:0.0)
jeff pts/5 Jan 29 16:16 (:0.0)

Thanks,

Jeffrey Sheinberg

Debian Release: 6.0
APT prefers testing-proposed-updates
APT policy: (500, 'testing-proposed-updates'), (500, 'testing')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages xterm depends on:
ii libc6 2.11.2-9 Embedded GNU C Library: Shared lib
ii libfontconfig1 2.8.0-2.1 generic font configuration library
ii libice6 2:1.0.6-2 X11 Inter-Client Exchange library
ii libncurses5 5.7+20100313-5 shared libraries for terminal hand
ii libsm6 2:1.1.1-1 X11 Session Management library
ii libx11-6 2:1.3.3-4 X11 client-side library
ii libxaw7 2:1.0.7-1 X11 Athena Widget library
ii libxext6 2:1.1.2-1 X11 miscellaneous extension librar
ii libxft2 2.1.14-2 FreeType-based font drawing librar
ii libxmu6 2:1.0.5-2 X11 miscellaneous utility library
ii libxt6 1:1.0.7-1 X11 toolkit intrinsics library
ii xbitmaps 1.1.0-1 Base X bitmaps

Versions of packages xterm recommends:
ii x11-utils 7.5+4 X11 utilities
ii xutils 1:7.5+8 X Window System utility programs m

Versions of packages xterm suggests:
pn xfonts-cyrillic <none> (no description available)




To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 10 repliesReplies Make a reply

Replies

#1 Cyril Brulebois
January 29th, 2011 - 05:50 pm ET | Report spam

Hi Jeffrey.

Jeffrey Sheinberg (29/01/2011):
With xterm Version: 261-1 installed, when I run this command,

$ exec login USER

the xterm immediately exits. This problem does not occur with prior
versions of xterm installed, eg, Version: 235-2.

Note that on my system, login is setuid root, thus enabling exec-ing
login from the base level shell, on e.g., tty1, pts/2, to work.



Trying that without exec:
| $ login USER
| No utmp entry. You must exec "login" from the lowest level "sh"

Now, if you use “exec”, you're replacing xterm by the login binary,
which returns (due to wrong usage), meaning your (previously-xterm)
process returns, which isn't exactly a bug in xterm.

The same happens with e.g. xfce4-terminal, so I guess xterm isn't at
fault here.

Please note that I tried with the same permission as yours on login:
| $ ls -l /bin/login
| -rwsr-xr-x 1 root root 45384 Sep 26 15:59 /bin/login

Looks like notabug to me, but I'll wait a bit before closing it.

KiBi.






To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics