Re: No error message if reading password fails
"Jepeway, Chris" <[email protected]>
| Newsgroups | gmane.comp.tools.sudo.user |
|---|---|
| Message-ID | <[email protected]> |
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? Chris. _________________________________________ Chris Jepeway Principal Engineer, Tech Ops | JTV 9600 Parkside Drive | Knoxville, TN 37922 Phone: 865.692.6155 | Cell: 865.405.3031 Email: [email protected] |www.jtv.com Knoxville-Bangkok-Jaipur-Mumbai-Hong Kong > On Oct 9, 2018, at 3:59 PM, Todd C. Miller <[email protected]> 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 > Password: > sudo: no password was provided > > - todd > ____________________________________________________________ > sudo-users mailing list <[email protected]> > For list information, options, or to unsubscribe, visit: > https://www.sudo.ws/mailman/listinfo/sudo-users ____________________________________________________________ sudo-users mailing list <[email protected]> For list information, options, or to unsubscribe, visit: https://www.sudo.ws/mailman/listinfo/sudo-users