Sudoers authenticate on per -tty basis #267

Closed
opened 2026-01-19 18:29:52 +00:00 by michael · 0 comments
Owner

Originally created by @grismemj on GitHub.

Originally assigned to: @brodjieski on GitHub.

Summary

The current check is brittle and does not find valid configurations with multiple spaces or tabs

Steps to reproduce

Put a tab instead of a space between Defaults and tty_tickets in the sudoers file, the check will fail even though this is a valid configuration

Operating System version

macOS 11.6.2

What is the current bug behavior?

Valid configurations are not identified

What is the expected correct behavior?

Any valid configuration should pass the check

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)

Output of checks

(Paste any output that occurs with the bug)

Possible fixes

Change the test to account for spaces/tabs

grep -Ec "^Defaults\s+tty_tickets" /etc/sudoers

Originally created by @grismemj on GitHub. Originally assigned to: @brodjieski on GitHub. <!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label and verify the issue you're about to submit isn't a duplicate. ---> ### Summary The current check is brittle and does not find valid configurations with multiple spaces or tabs ### Steps to reproduce Put a tab instead of a space between Defaults and tty_tickets in the sudoers file, the check will fail even though this is a valid configuration ### Operating System version macOS 11.6.2 ### What is the current *bug* behavior? Valid configurations are not identified ### What is the expected *correct* behavior? Any valid configuration should pass the check ### Relevant logs and/or screenshots (Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.) ### Output of checks (Paste any output that occurs with the bug) ### Possible fixes Change the test to account for spaces/tabs grep -Ec "^Defaults\s+tty_tickets" /etc/sudoers
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: usnistgov/macos_security#267