2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Do not fail if ttyname() cannot determine the tty but sudo can.

Should fix problems with running "make check" under pbuilder.
This commit is contained in:
Todd C. Miller
2013-09-11 11:20:05 -06:00
parent 5d56fd5f83
commit c91c5343eb

View File

@@ -67,7 +67,9 @@ main(int argc, char *argv[])
if ((tty_sudo = get_process_ttyname()) == NULL)
tty_sudo = estrdup("none");
if (strcmp(tty_libc, tty_sudo) == 0) {
if (strcmp(tty_libc, "none") == 0) {
printf("%s: SKIP (%s)\n", getprogname(), tty_sudo);
} else if (strcmp(tty_libc, tty_sudo) == 0) {
printf("%s: OK (%s)\n", getprogname(), tty_sudo);
} else {
printf("%s: FAIL %s (sudo) vs. %s (libc)\n", getprogname(),