[Pkg-kbd-devel] Bug#610373: kbd: openvt -e fails with ioctl TIOCSCTTY: Operation not permitted

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jan 18 02:23:29 UTC 2011


Package: kbd
Version: 1.15.2-2
Severity: normal

Running the following simple command fails (returns 1):

 openvt -e true

And it prints the following message on the allocated vt:

  ioctl TIOCSCTTY: Operation not permitted

Attached is an strace dump.

Thanks for maintaining kbd in debian!

       --dkg

-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.32-5-powerpc
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages kbd depends on:
ii  console-setup           1.67             console font and keymap setup prog
ii  libc6                   2.11.2-7         Embedded GNU C Library: Shared lib
ii  lsb-base                3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip

Versions of packages kbd recommends:
ii  console-setup                 1.67       console font and keymap setup prog

kbd suggests no packages.

-- no debconf information
-------------- next part --------------
execve("/bin/openvt", ["openvt", "-e", "true"], [/* 14 vars */]) = 0
brk(0)                                  = 0x1057f000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x48020000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=19567, ...}) = 0
mmap(NULL, 19567, PROT_READ, MAP_PRIVATE, 3, 0) = 0x48023000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\370\340\0\0\0004"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1503336, ...}) = 0
mmap(0xfe6f000, 1574172, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfe6f000
mprotect(0xffd8000, 65536, PROT_NONE)   = 0
mmap(0xffe8000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x169000) = 0xffe8000
mmap(0xffed000, 9500, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffed000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x48028000
mprotect(0xffe8000, 16384, PROT_READ)   = 0
mprotect(0x48021000, 4096, PROT_READ)   = 0
munmap(0x48023000, 19567)               = 0
brk(0)                                  = 0x1057f000
brk(0x105a0000)                         = 0x105a0000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1527584, ...}) = 0
mmap2(NULL, 1527584, PROT_READ, MAP_PRIVATE, 3, 0) = 0x48029000
close(3)                                = 0
fstat64(0, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
fstat64(2, {st_mode=S_IFREG|0644, st_size=1949, ...}) = 0
open("/proc/self/fd/0", O_RDWR)         = 3
ioctl(3, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(3, KDGKBTYPE, 0xbfb22e28)         = -1 EINVAL (Invalid argument)
close(3)                                = 0
open("/dev/tty", O_RDWR)                = 3
ioctl(3, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(3, KDGKBTYPE, 0xbfb22e28)         = -1 EINVAL (Invalid argument)
close(3)                                = 0
open("/dev/tty0", O_RDWR)               = 3
ioctl(3, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(3, KDGKBTYPE, 0xbfb22e28)         = 0
ioctl(3, VT_GETSTATE, 0xbfb22e70)       = 0
ioctl(3, VIDIOC_QUERYCAP or VT_OPENQRY, 0xbfb22e68) = 0
open("/dev/tty8", O_RDWR)               = 4
access("/dev/tty8", R_OK|W_OK)          = 0
geteuid()                               = 0
getuid()                                = 0
getgid()                                = 0
chown("/dev/tty8", 0, 0)                = 0
setuid(0)                               = 0
close(0)                                = 0
open("/dev/tty8", O_RDWR)               = 0
close(1)                                = 0
close(2)                                = 0
close(4)                                = 0
close(3)                                = 0
dup(0)                                  = 1
dup(0)                                  = 2
ioctl(0, TIOCSCTTY)                     = -1 EPERM (Operation not permitted)
dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 8), ...}) = 0
ioctl(3, TCGETS, {B38400 opost isig icanon echo ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x48023000
_llseek(3, 0, 0xbfb22d18, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
open("/usr/share/locale/locale.alias", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x48024000
read(4, "# Locale name alias data base.\n#"..., 1024) = 1024
read(4, " entries are case independent.\n\n"..., 1024) = 1024
read(4, "eucKR\nko_KR\t\tko_KR.eucKR\nlithuan"..., 1024) = 522
read(4, "", 1024)                       = 0
close(4)                                = 0
munmap(0x48024000, 4096)                = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(3, "ioctl TIOCSCTTY: Operation not p"..., 41) = 41
close(3)                                = 0
munmap(0x48023000, 4096)                = 0
exit_group(1)                           = ?


More information about the Pkg-kbd-devel mailing list