pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/56936: posix_openpt(O_RDWR | O_NOCTTY) fails when configuring pkgsrc/x11/mlterm



The following reply was made to PR pkg/56936; it has been noted by GNATS.

From: "David H. Gutteridge" <david%gutteridge.ca@localhost>
To: gnats-bugs%netbsd.org@localhost, dholland-pbugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/56936: posix_openpt(O_RDWR | O_NOCTTY) fails when
 configuring pkgsrc/x11/mlterm
Date: Sun, 11 Sep 2022 17:11:51 -0400

 On Sat, 2022-09-10 at 04:05 +0000, David Holland wrote:
 > The following reply was made to PR pkg/56936; it has been noted by
 > GNATS.
 >=20
 > From: David Holland <dholland-pbugs%netbsd.org@localhost>
 > To: gnats-bugs%netbsd.org@localhost
 > Cc:=20
 > Subject: Re: pkg/56936: posix_openpt(O_RDWR | O_NOCTTY) fails when
 > =C2=A0configuring pkgsrc/x11/mlterm
 > Date: Sat, 10 Sep 2022 04:01:04 +0000
 >=20
 > =C2=A0On Wed, Sep 07, 2022 at 11:00:03PM +0000, Joerg Sonnenberger wrote:
 > =C2=A0 >=C2=A0 >=C2=A0 Inside a sandbox, openpty(3) also doesn't work, as=
  I'd noticed
 > since
 > =C2=A0 >=C2=A0 >=C2=A0 script(1) fails to work in that context.
 > =C2=A0 >=C2=A0 >=C2=A0=20
 > =C2=A0 >=C2=A0 >=C2=A0 script: openpty: No such file or directory
 > =C2=A0 >=C2=A0 >=C2=A0=20
 > =C2=A0 >=C2=A0 >=C2=A0=C2=A0=C2=A0 22686=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1 =
 script=C2=A0=C2=A0 CALL=C2=A0 open(0x6fd6ee21228c,2,0)
 > =C2=A0 >=C2=A0 >=C2=A0=C2=A0=C2=A0 22686=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1 =
 script=C2=A0=C2=A0 NAMI=C2=A0 "/dev/ptm"
 > =C2=A0 >=C2=A0 >=C2=A0=C2=A0=C2=A0 22686=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1 =
 script=C2=A0=C2=A0 RET=C2=A0=C2=A0 open 4
 > =C2=A0 >=C2=A0 >=C2=A0=C2=A0=C2=A0 22686=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1 =
 script=C2=A0=C2=A0 CALL=C2=A0
 > ioctl(4,TIOCPTMGET,0x7f7fffd49b00)
 > =C2=A0 >=C2=A0 >=C2=A0=C2=A0=C2=A0 22686=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1 =
 script=C2=A0=C2=A0 RET=C2=A0=C2=A0 ioctl -1 errno 45 Operation not
 > supported
 > =C2=A0 >=C2=A0=20
 > =C2=A0 >=C2=A0 That means your sandbox is not configured correctly. Do yo=
 u have
 > =C2=A0 >=C2=A0 /dev/pts null-mounted in the chroot?
 > =C2=A0
 > =C2=A0Openpty falls back to opening pty devices, so it should work
 > =C2=A0regardless of whether /dev/pts is present. Unless you have no ptys =
 at
 > =C2=A0all in the sandbox, and that does seem like a configuration error.
 
 openpty(3) does fall back to trying to open pty devices, and fails like
 so:
 
  22686      1 script   CALL  open(0x7f7fffd496d5,2,0)
  22686      1 script   NAMI  "/dev/ptyp0"
  22686      1 script   RET   open -1 errno 2 No such file or directory
 
 There are no pty devices in the sandboxes I have, because there are also
 none under actual /dev. They are not populated in any installs I have,
 presumably on purpose given it says in MAKEDEV "creating BSD style tty
 nodes with ptyfs is a security issue"?
 
 Dave
 


Home | Main Index | Thread Index | Old Index