[Pkg-shadow-devel] Bug#663200: login: "su -c" breaks the shell's job control
Francois Gouget
fgouget at free.fr
Fri Mar 9 11:46:46 UTC 2012
Package: login
Version: 1:4.1.5-1
Severity: normal
Dear Maintainer,
If a shell, either dash of bash for instance, is started with the '-c' option it cannot access the tty which breaks job control:
fgouget at amboise:~$ su - fgouget -c /bin/bash
Password:
bash: impossible de régler le groupe de processus du terminlal (-1): Ioctl() inappropré pour un périphérique
bash: pas de contrôle de tâche dans ce shell
In contrast, if one just lets 'su' start the shell itself everything works fine:
fgouget at amboise:~$ echo $SHELL
/bin/bash
fgouget at amboise:~$ su - fgouget
Password:
fgouget at amboise:~$
Yet I would expect both commands to have the same effect. One consequence is that it breaks sux:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659832
Investigating this further, in dash this happens because the following ioctl fails:
fcntl(2, F_DUPFD, 10) = 10
...
ioctl(10, TIOCGPGRP, [32664]) = -1 ENOTTY (Inappropriate ioctl for device)
Given this and the fact that reverting to 4.1.4.2+svn3283-2+squeeze1 fixes the issue, I strongly suspect this is a consequence of the fix for bug #628843.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628843
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages login depends on:
ii libc6 2.13-27
ii libpam-modules 1.1.3-7
ii libpam-runtime 1.1.3-7
ii libpam0g 1.1.3-7
login recommends no packages.
login suggests no packages.
-- no debconf information
More information about the Pkg-shadow-devel
mailing list