trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.87k stars 76 forks source link

"pwfeedback" Support Request #846

Open GentsunCheng opened 2 months ago

GentsunCheng commented 2 months ago

Describe the feature you'd like see implemented in sudo-rs I would like to see the implementation of the pwfeedback feature in sudo-rs. This feature would provide visual feedback (such as * or .) when users input their passwords.

What problem can be solved with this feature? Currently, sudo-rs lacks the pwfeedback feature, which negatively impacts user experience. For example, I'm always frustrated when I enter my password and there is no visual feedback, making it unclear whether my input is being registered. This feature would fix this problem by providing immediate visual confirmation during password entry.

Describe alternatives you've considered I have not found any existing features in sudo-rs that address this issue. Alternatives like external password managers or custom scripts could be used, but they are not as integrated and seamless as having built-in support for pwfeedback. Additional context Implementing pwfeedback will align sudo-rs more closely with the traditional sudo command's functionality, providing a familiar experience for users transitioning to sudo-rs.

squell commented 1 month ago

Thanks for suggesting this feature! We had considered this feature, but omitted it until now for simplicity reasons (the pwfeedback setting has to be communicated all the way "down" to the password entry prompt); also because in C-sudo it has been the cause of a buffer overflow: https://www.exploit-db.com/exploits/47995.

On the other hand, in Rust a similar problem would at most lead to a runtime panic, and I do see how this feature can positively impact the user impact (and thereby increase adoption), so we should consider this seriously.