tty_present(void)
{
    debug_decl(tty_present, SUDOERS_DEBUG_PLUGIN);
    
    if (user_ttypath == NULL) {
	int fd = open(_PATH_TTY, O_RDWR);
	if (fd == -1)
	    debug_return_bool(false);
	close(fd);
    }
    debug_return_bool(true);
}
tty_present(void)
{
    debug_decl(tty_present, SUDOERS_DEBUG_PLUGIN);
    
    if (user_ttypath == NULL) {
	int fd = open(_PATH_TTY, O_RDWR);
	if (fd == -1)
	    debug_return_bool(false);
	close(fd);
    }
    debug_return_bool(true);
}