Bug 1020 - Does not find its pty in qemu-user-static
Does not find its pty in qemu-user-static
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.9.8
PC Linux
: low normal
Assigned To: Todd C. Miller
https://bugs.debian.org/cgi-bin/bugre...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-02 04:34 MST by Marc Haber
Modified: 2022-03-04 09:15 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Haber 2022-02-02 04:34:00 MST
Hi,

in qemu-user-static, /proc/self/stat contains a lot of zeroes. Sudo tries to read its tty from that file and fails if run in qemu-user-static.

The URL contains instructions how to reproduce this.

The reporter suggests to fall back to reading /proc/self/fd/0 if /proc/self/stat fails.

Greetings
Marc
Comment 1 Todd C. Miller 2022-02-02 11:26:14 MST
I've added fallback code in https://www.sudo.ws/repos/sudo/rev/c32620c9f115 which should work around the qemu problem.
Comment 2 Todd C. Miller 2022-03-04 09:15:31 MST
Fixed in sudo 1.9.10