askpass.c revision 89a126810703c666309310d0f3189e9834d70b5b
/* Copyright (c) 2006-2007 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "askpass.h"
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>
#include <unistd.h>
{
bool restore_tio = FALSE;
char ch;
int fd;
if (!isatty(STDIN_FILENO))
i_fatal("stdin isn't a TTY");
if (fd < 0)
/* turn off echo */
restore_tio = TRUE;
}
/* read the password */
pos = 0;
break;
break;
}
if (restore_tio)
}