summaryrefslogtreecommitdiff
path: root/source3/lib/getsmbpass.c
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
commit8e1dfc52b91f38ab53c8f717cb8b952c49a501bb (patch)
treee2926bd792c6f33019ace19fd7b067be3b49b1b3 /source3/lib/getsmbpass.c
parent49da8712d0b9b2298d7681146e83c347001b6c4e (diff)
downloadsamba-8e1dfc52b91f38ab53c8f717cb8b952c49a501bb.tar.gz
samba-8e1dfc52b91f38ab53c8f717cb8b952c49a501bb.tar.bz2
samba-8e1dfc52b91f38ab53c8f717cb8b952c49a501bb.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 fb503bb418fcbee20d2218650904b26b512106ed)
Diffstat (limited to 'source3/lib/getsmbpass.c')
-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);