diff options
author | Jim McDonough <jmcd@samba.org> | 2003-10-23 13:47:21 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2003-10-23 13:47:21 +0000 |
commit | 8e1dfc52b91f38ab53c8f717cb8b952c49a501bb (patch) | |
tree | e2926bd792c6f33019ace19fd7b067be3b49b1b3 /source3 | |
parent | 49da8712d0b9b2298d7681146e83c347001b6c4e (diff) | |
download | samba-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')
-rw-r--r-- | source3/lib/getsmbpass.c | 5 |
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); |