[sudo-users] No error message if reading password fails
Chris.Jepeway at JTV.com
Tue Oct 9 14:37:43 MDT 2018
Not sure re: this notion, but what about taking the password from /dev/tty if it's available and from stdin if it's not?
Principal Engineer, Tech Ops | JTV
9600 Parkside Drive | Knoxville, TN 37922
Phone: 865.692.6155 | Cell: 865.405.3031
Email: chris.jepeway at jtv.com |www.jtv.com
> On Oct 9, 2018, at 3:59 PM, Todd C. Miller <Todd.Miller at sudo.ws> wrote:
> On Mon, 08 Oct 2018 14:34:36 +0200, "R. Diez" wrote:
>> What is the "expected thing" in this scenario then? Is it documented or
>> expected that an "end of file" condition makes sudo quit without an
>> error message and without trying to run the command the user specified?
> Point taken; it is hard to tell whether the command was run or not
> in the absence of any kind of message.
> I've just committed a change to print a warning when there is an
> error reading the password, no password was read (EOF), or the
> password prompt timed out.
> For example:
> xerxes [/usr/src/local/millert/hg/sudo/trunk/src] % sudo -S id < /dev/null
> sudo: no password was provided
> - todd
> sudo-users mailing list <sudo-users at sudo.ws>
> For list information, options, or to unsubscribe, visit:
More information about the sudo-users