summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmcd <jmcd@samba.org>2003-10-23 13:47:17 +0000
committerStefan Metzmacher <metze@samba.org>2007-10-15 13:20:40 +0200
commit3c258755b52026e868fe9b6fa5f7291023007f8f (patch)
tree51efc6602e770e54d901b84661cce829d91290c2
parent65f16c7fed5b914b57c3cf1d9357486103a0f1d6 (diff)
downloadsamba-3c258755b52026e868fe9b6fa5f7291023007f8f.tar.gz
samba-3c258755b52026e868fe9b6fa5f7291023007f8f.tar.bz2
samba-3c258755b52026e868fe9b6fa5f7291023007f8f.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 0cd1ed0424ce87f60070d43caffda41be6706d59)
-rw-r--r--source3/lib/replace/getpass.c5
1 files 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);