trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.9k stars 79 forks source link

Make `--pty` the default for `su` #634

Closed squell closed 1 year ago

squell commented 1 year ago

Describe the feature you'd like see implemented in su Make --pty the default.

What problem can be solved with this feature? This prevents TTY hijacking attacks, similarly to how use_pty prevents these in sudo. But who ever remembers to use the --pty flag with su?

Describe alternatives you've considered We can add a --no-pty flag to disable the PTY usage; although that should probably be based on user requests. The PTY behaviour is pretty well-tested in original sudo, and we follow its implementation closely.

Context Making this change will probably invalidate some compliance tests for su.