summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2003-10-23 13:47:21 +0000
committerJim McDonough <jmcd@samba.org>2003-10-23 13:47:21 +0000
commitfb503bb418fcbee20d2218650904b26b512106ed (patch)
treefc55926219c743d3bd64a4bd8bee693863509e9f
parent73fc6da6cf2b52f65c3dbfb7705899e6cbea447a (diff)
downloadsamba-fb503bb418fcbee20d2218650904b26b512106ed.tar.gz
Volker's fix for bug #668. Change the \n after the password prompt to go
to tty instead of stdout.
-rw-r--r--source/lib/getsmbpass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/lib/getsmbpass.c b/source/lib/getsmbpass.c
index 27cd5e6dfa2..df5e0359aa2 100644
--- a/source/lib/getsmbpass.c
+++ b/source/lib/getsmbpass.c
@@ -158,14 +158,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 */
CatchSignal(SIGINT, SIGNAL_CAST SIG_DFL);
- printf("\n");
-
if (gotintr) {
printf("Interupted by signal.\n");
fflush(stdout);