[sudo-users] No error message if reading password fails

Todd C. Miller Todd.Miller at sudo.ws
Mon Oct 8 06:20:06 MDT 2018


Note that reading from /dev/null does not produce an error, it just
returns end of file.  So for:

rdiez at UbuntuMate:~$ sudo -S -- ls </dev/null

sudo is doing the expected thing.  This is the same as what would
happen if you entered control-D at the password prompt.

I don't know what emacs actually does with when you use:

(setq compilation-disable-input t)

but if it just opens /dev/null and points stdin to that then sudo
should not report an error.

If, on the other hand, stdin is closed, it makes sense for sudo to
print an error if it can.

 - todd


More information about the sudo-users mailing list