Skip to content

Commit

Permalink
Volker's fix for bug #668. Change the \n after the password prompt to…
Browse files Browse the repository at this point in the history
… go to tty instead of stdout.

(This used to be commit 0cd1ed0)
  • Loading branch information
jmcdough authored and metze-samba committed Oct 15, 2007
1 parent 65f16c7 commit 3c25875
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source3/lib/replace/getpass.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3c25875

Please sign in to comment.