On 06.11.2016 23:41, James Clarke wrote:
On 6 Nov 2016, at 20:34, Yuriy M. Kaminskiy <yum...@gmail.com> wrote:

Andreas Henriksson <andr...@fatal.se> writes:

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.

IIRC, it would also need `,newinstance` option by then (otherwise
it will clobber "host system" devpts options).

newinstance seems to be a world of pain, as then it can’t access the TTY
for std{in,out,err}. I tried many months ago and couldn’t get it to work,
but would love to be proved wrong.

Then, probably, it should `mount --bind` "host system" /dev/pts and /dev/ptmx? (as mounting devpts again with different options has undesirable side effects)

Reply via email to