Volker's fix for bug #668. Change the \n after the password prompt to go to tty inste...
authorjmcd <jmcd@samba.org>
Thu, 23 Oct 2003 13:47:17 +0000 (13:47 +0000)
committerStefan Metzmacher <metze@samba.org>
Mon, 15 Oct 2007 11:20:40 +0000 (13:20 +0200)
(This used to be commit 0cd1ed0424ce87f60070d43caffda41be6706d59)

source3/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);