diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-10-17 14:00:42 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:43:11 +0100 |
commit | 50a749404bb1d86f0881fab06414469fda307c26 (patch) | |
tree | 867143768b639a4c09cdc2de4fa97466053d0e0d /source4/lib | |
parent | 2627603506452debf018e2ed8ae0b7912d64e58e (diff) | |
download | samba-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/lib')
-rw-r--r-- | source4/lib/replace/getpass.c | 5 |
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); |