summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-10-17 14:00:42 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:11 +0100
commit50a749404bb1d86f0881fab06414469fda307c26 (patch)
tree867143768b639a4c09cdc2de4fa97466053d0e0d /source4
parent2627603506452debf018e2ed8ae0b7912d64e58e (diff)
downloadsamba-50a749404bb1d86f0881fab06414469fda307c26.tar.gz
samba-50a749404bb1d86f0881fab06414469fda307c26.tar.bz2
samba-50a749404bb1d86f0881fab06414469fda307c26.zip
r25680: Volker's fix for bug #668. Change the \n after the password prompt to go to tty instead of stdout.
(cherry picked from commit 0cd1ed0424ce87f60070d43caffda41be6706d59) (This used to be commit 249d69fd85b67657a4523ffc9244a8b4ab01270a)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/replace/getpass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/replace/getpass.c b/source4/lib/replace/getpass.c
index 1cabf0bd87..96f508ead2 100644
--- a/source4/lib/replace/getpass.c
+++ b/source4/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);