-\b-S\bS, -\b--\b-s\bst\btd\bdi\bin\bn
Write the prompt to the standard error and read the password
from the standard input instead of using the terminal device.
- The password must be followed by a newline character.
-\b-s\bs, -\b--\b-s\bsh\bhe\bel\bll\bl
Run the shell specified by the SHELL environment variable if
file distributed with s\bsu\bud\bdo\bo or https://www.sudo.ws/license.html for
complete details.
-Sudo 1.8.26 October 7, 2018 Sudo 1.8.26
+Sudo 1.8.26 October 8, 2018 Sudo 1.8.26
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
-.TH "SUDO" "8" "October 7, 2018" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
+.TH "SUDO" "8" "October 8, 2018" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
.nh
.if n .ad l
.SH "NAME"
\fB\-S\fR, \fB\--stdin\fR
Write the prompt to the standard error and read the password from the
standard input instead of using the terminal device.
-The password must be followed by a newline character.
.TP 12n
\fB\-s\fR, \fB\--shell\fR
Run the shell specified by the
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
-.Dd October 7, 2018
+.Dd October 8, 2018
.Dt SUDO @mansectsu@
.Os Sudo @PACKAGE_VERSION@
.Sh NAME
.It Fl S , -stdin
Write the prompt to the standard error and read the password from the
standard input instead of using the terminal device.
-The password must be followed by a newline character.
.It Fl s , -shell
Run the shell specified by the
.Ev SHELL
}
}
- if (nr != 1) {
- if (nr == 0) {
- *errval = TGP_ERRVAL_NOPASSWORD;
- } else if (nr == -1) {
- if (errno == EINTR) {
- if (signo[SIGALRM] == 1)
- *errval = TGP_ERRVAL_TIMEOUT;
- } else {
- *errval = TGP_ERRVAL_READERROR;
- }
+ switch (nr) {
+ case -1:
+ /* Read error */
+ if (errno == EINTR) {
+ if (signo[SIGALRM] == 1)
+ *errval = TGP_ERRVAL_TIMEOUT;
+ } else {
+ *errval = TGP_ERRVAL_READERROR;
}
debug_return_str(NULL);
+ case 0:
+ /* EOF is only an error if no bytes were read. */
+ if (left == bufsiz - 1) {
+ *errval = TGP_ERRVAL_NOPASSWORD;
+ debug_return_str(NULL);
+ }
+ /* FALLTHROUGH */
+ default:
+ debug_return_str_masked(buf);
}
-
- debug_return_str_masked(buf);
}
static void