Skip to content

A pipeline of two sudo invocations causes TTY contention #1650

Description

@squell

From #1649, reported by @MoyashiWithDevice:

When multiple sudo processes are piped together (e.g. sudo a | sudo b),
both processes open /dev/tty and call poll()+read() concurrently. Because
the terminal delivers each byte to only one reader, keystrokes from the
user get split between the two processes, resulting in both receiving an
incomplete password and authentication failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pamPAM librarybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions