summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2003-10-23 13:47:17 +0000
committerJim McDonough <jmcd@samba.org>2003-10-23 13:47:17 +0000
commita804eee9ec05680b6af23d5c435a6682f82dfd71 (patch)
tree9c526d1fcf62c080ac52f5f65c34900e49a7bc64 /source3/lib
parente78cf62248f842069c97da914c0dfc2d5c27e997 (diff)
downloadsamba-a804eee9ec05680b6af23d5c435a6682f82dfd71.tar.gz
samba-a804eee9ec05680b6af23d5c435a6682f82dfd71.tar.bz2
samba-a804eee9ec05680b6af23d5c435a6682f82dfd71.zip
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 3cec478b82359c527065c3a8d44daae96b7ac57e)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/getsmbpass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/getsmbpass.c b/source3/lib/getsmbpass.c
index 27cd5e6dfa..df5e0359aa 100644
--- a/source3/lib/getsmbpass.c
+++ b/source3/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);