version 1.7, 2002/01/03 03:49:16 |
version 1.8, 2003/03/15 21:23:54 |
|
|
#include "sudo.h" |
#include "sudo.h" |
|
|
#ifndef lint |
#ifndef lint |
static const char rcsid[] = "$Sudo: tgetpass.c,v 1.103 2001/12/17 23:56:47 millert Exp $"; |
static const char rcsid[] = "$Sudo: tgetpass.c,v 1.104 2002/12/13 18:20:34 millert Exp $"; |
#endif /* lint */ |
#endif /* lint */ |
|
|
#ifndef TCSASOFT |
#ifndef TCSASOFT |
|
|
output = STDERR_FILENO; |
output = STDERR_FILENO; |
} |
} |
|
|
if (prompt) |
|
(void) write(output, prompt, strlen(prompt)); |
|
|
|
/* |
/* |
* Catch signals that would otherwise cause the user to end |
* Catch signals that would otherwise cause the user to end |
* up with echo turned off in the shell. Don't worry about |
* up with echo turned off in the shell. Don't worry about |
|
|
memset(&term, 0, sizeof(term)); |
memset(&term, 0, sizeof(term)); |
memset(&oterm, 0, sizeof(oterm)); |
memset(&oterm, 0, sizeof(oterm)); |
} |
} |
|
|
|
if (prompt) |
|
(void) write(output, prompt, strlen(prompt)); |
|
|
pass = tgetline(input, buf, sizeof(buf), timeout); |
pass = tgetline(input, buf, sizeof(buf), timeout); |
save_errno = errno; |
save_errno = errno; |