/* Copyright (c) 2006-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "buffer.h"
#include "str.h"
#include "askpass.h"
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>
#include <unistd.h>
{
char ch;
int fd;
if (tty) {
if (fd < 0)
/* turn off echo */
restore_tio = TRUE;
}
} else {
/* read it from stdin without showing a prompt */
fd = STDIN_FILENO;
}
/* read the password */
break;
}
if (tty) {
if (restore_tio)
i_close_fd(&fd);
}
}
{
}
{
}