Bug 396

Summary: Error message unrelated to cause
Product: Sudo Reporter: Zordrak <sudo-bugzilla>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED WORKSFORME    
Severity: low    
Priority: low    
Version: 1.6.9   
Hardware: PC   
OS: Linux   

Description Zordrak 2010-03-05 09:51:11 MST
When the setting "requiretty" blocks an attempt to use sudo without a tty, the error message is "sudo: must be setuid root\n".

This error is unrelated to the cause which is a permission failure as configured in sudoers.

It would be very useful for troubleshooting if sudo gave an error advising why permission was denied rather than the red herring setuid message.
Comment 1 Todd C. Miller 2010-03-05 10:58:58 MST
That error message is only printed when the effective uid of the process is non-zero; it has nothing whatsoever to do with requiretty.
Comment 2 Zordrak 2010-03-08 05:16:47 MST
Regardless of the intent, my point is that if requiretty is invoked, this is the error message that is provided. Can this not be caught elsewise and error before hitting the non-zero error?
Comment 3 Todd C. Miller 2011-03-03 09:56:33 MST
Unable to reproduce in sudo 1.7.5 or 1.8.0.