Skip to content

Error messages and askpass logic differs from sudo.ws when no tty is available #1595

@3v1n0

Description

@3v1n0

Describe the bug

While working on #1591, I identified that sudo-rs behavior in PAM conversations without /dev/tty diverges from upstream sudo in both fallback selection and user-facing diagnostics.

In no-tty/headless scenarios, sudo-rs could fail or provide less actionable diagnostics where sudo still follows valid fallback paths.

This affects:

To Reproduce

  ssh localhost sudo id
  SUDO_ASKPASS=/bin/askpass sudo true </dev/null

Expected behavior

sudo-rs should match sudo behavior for no-tty conversation handling and provide actionable, context-aware error messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions