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:
@@ -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(),
|
||||
|
Reference in New Issue
Block a user