Bug#841935: pbuilder: incorrect permissions on /dev/ptmx breaks openpty()

Andreas Henriksson andreas at fatal.se
Mon Oct 24 15:18:15 UTC 2016


Package: pbuilder
Version: 0.226.1
Severity: normal
Tags: patch

Dear Maintainer,

It seems /dev/ptmx has incorrect permissions in a pbuilder chroot:

# ls -l /dev/ptmx
lrwxrwxrwx 1 root root 8 Oct  4 06:43 /dev/ptmx -> pts/ptmx
# ls -l /dev/pts/ptmx
c--------- 1 root root 5, 2 Oct 24 14:46 /dev/pts/ptmx

Please compare to what's stated in
https://www.kernel.org/doc/Documentation/filesystems/devpts.txt

For comparison this is from my regular system:
$ ls -l /dev/ptmx /dev/pts/ptmx
crw-rw-rw- 1 root tty  5, 2 okt 24 17:03 /dev/ptmx
c--------- 1 root root 5, 2 okt 11 12:35 /dev/pts/ptmx

I've hacked up my pbuilder installation and confirmed that appending
",ptmxmode=0666" to the /dev/pts mount flags fixes the issue.

This issue was detected while building the util-linux package where
the testsuite now has started to fail (specifically the
tests/ts/script/buffering-race test, since 'script' uses openpty).

See attached patch.

Regards,
Andreas Henriksson


-- System Information:
Debian Release: stretch/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-rc8-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages pbuilder depends on:
ii  debconf [debconf-2.0]  1.5.59
ii  debootstrap            1.0.84
ii  dpkg-dev               1.18.10
ii  wget                   1.18-4

Versions of packages pbuilder recommends:
ii  devscripts  2.16.8
ii  eatmydata   105-5
ii  fakeroot    1.21-2
ii  iproute2    4.6.0-4
ii  sudo        1.8.17p1-2

Versions of packages pbuilder suggests:
ii  cowdancer   0.81
ii  gdebi-core  0.9.5.7

-- debconf information excluded
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pbuilder-modules-Fix-permissions-of-dev-ptmx.patch
Type: text/x-diff
Size: 1191 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20161024/57f1de19/attachment.patch>


More information about the Pbuilder-maint mailing list