[Hurd] glibc lacks 'pt_chown' setuid program

  • Open
  • quality assurance status badge
Details
One participant
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 26 Nov 2022 19:22
Texinfo 6.7 test hangs on i586-gnu (GNU/Hurd)
(address . bug-guix@gnu.org)
87fse560e4.fsf@inria.fr
The ‘t/malformed-split.sh’ test of Texinfo 6.7 hangs on GNU/Hurd (in a
childhurd) as of commit 78f03567f44f704dfbc03cb64368aa42a01e78ad.

The test invokes its ‘pseudotty’ program, which creates a
pseudo-terminal using ‘posix openpt’. That call fails when not running
as root in a childhurd:

Toggle snippet (19 lines)
task109(pid14826)-> 4205 (227424 0 0);
75<--117(pid14826)->io_write_request ("./pseudotty: " -1)./pseudotty: = 0 13
75<--117(pid14826)->io_write_request ("getting pty master fd" -1)getting pty master fd = 0 21
75<--117(pid14826)->io_write_request ("\n" -1)
= 0 1
task109(pid14826)-> 4205 (227424 0 0);
task109(pid14826)-> 4205 (227424 0 0);
86<--120(pid14826)->dir_lookup ("dev/ptyp0" 3 0) = 0x4000000d (Permission denied)
86<--120(pid14826)->dir_lookup ("dev/ptyp1" 3 0) = 0x40000010 (Device or resource busy)
86<--120(pid14826)->dir_lookup ("dev/ptyp2" 3 0) = 0x4000000d (Permission denied)
86<--120(pid14826)->dir_lookup ("dev/ptyp3" 3 0) = 0x40000002 (No such file or directory)
task109(pid14826)-> 4205 (227424 0 0);
task109(pid14826)-> 4205 (227424 0 0);
118<--122(pid14826)->proc_mark_exit_request (256 0) = 0
task109(pid14826)-> 4205 (227424 0 0);
task109(pid14826)-> 2008 () = 0
Child 14826 exited with 1

The childhurd only has this:

Toggle snippet (6 lines)
ludo@childhurd /tmp/guix-build-texinfo-6.7.drv-0/texinfo-6.7/info$ ls -l /dev/ptyp*
crw--w---- 1 root tty 0, 0 Nov 26 16:05 /dev/ptyp0
crw--w---- 1 ludo tty 0, 0 Nov 26 16:05 /dev/ptyp1
crw------- 1 root root 0, 0 Nov 26 16:05 /dev/ptyp2

Ludo’.
L
L
Ludovic Courtès wrote on 27 Nov 2022 23:34
(address . 59616@debbugs.gnu.org)
875yf058nm.fsf@gnu.org
Hi,

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (7 lines)
> The childhurd only has this:
>
> ludo@childhurd /tmp/guix-build-texinfo-6.7.drv-0/texinfo-6.7/info$ ls -l /dev/ptyp*
> crw--w---- 1 root tty 0, 0 Nov 26 16:05 /dev/ptyp0
> crw--w---- 1 ludo tty 0, 0 Nov 26 16:05 /dev/ptyp1
> crw------- 1 root root 0, 0 Nov 26 16:05 /dev/ptyp2

Part of the solution is to create more of them in hurd-boot.scm.

But there’s a second problem: we need to build glibc’s ‘pt_chown’ setuid
program (with ‘--enable-pt_chown’) so that ‘grantpt’ can change the
owner of /dev/ttyp*.

At least that’s how it’s done on Debian GNU/Hurd, but I’m surprised
/hurd/term (for pty-slave) doesn’t just return the right UID on
‘io_stat’.

Ludo’.
L
L
Ludovic Courtès wrote on 30 Nov 2022 10:10
control message for bug #59616
(address . control@debbugs.gnu.org)
87sfi03j08.fsf@gnu.org
retitle 59616 [Hurd] glibc lacks 'pt_chown' setuid program
quit
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 59616@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 59616
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch