From 3c258755b52026e868fe9b6fa5f7291023007f8f Mon Sep 17 00:00:00 2001 From: jmcd Date: Thu, 23 Oct 2003 13:47:17 +0000 Subject: Volker's fix for bug #668. Change the \n after the password prompt to go to tty instead of stdout. (This used to be commit 0cd1ed0424ce87f60070d43caffda41be6706d59) --- source3/lib/replace/getpass.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source3/lib/replace/getpass.c b/source3/lib/replace/getpass.c index 1cabf0bd87..96f508ead2 100644 --- a/source3/lib/replace/getpass.c +++ b/source3/lib/replace/getpass.c @@ -213,14 +213,15 @@ char *getsmbpass(const char *prompt) tcsetattr (fileno (in), TCSANOW, &t); } + fprintf(out, "\n"); + fflush(out); + if (in != stdin) /* We opened the terminal; now close it. */ fclose(in); /* Catch problematic signals */ catch_signal(SIGINT, SIGNAL_CAST SIG_DFL); - printf("\n"); - if (gotintr) { printf("Interupted by signal.\n"); fflush(stdout); -- cgit