r25680: Volker's fix for bug #668. Change the \n after the password prompt to go...
authorStefan Metzmacher <metze@samba.org>
Wed, 17 Oct 2007 12:00:42 +0000 (14:00 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:43:11 +0000 (05:43 +0100)
(cherry picked from commit 0cd1ed0424ce87f60070d43caffda41be6706d59)

source/lib/replace/getpass.c

index 1cabf0bd87a97815790cc5cd230cec7f51f23a2d..96f508ead207a7eb074e34c9539944c2b04002ea 100644 (file)
@@ -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);