Volker's fix for bug #668. Change the \n after the password prompt to go
authorJim McDonough <jmcd@samba.org>
Thu, 23 Oct 2003 13:47:17 +0000 (13:47 +0000)
committerJim McDonough <jmcd@samba.org>
Thu, 23 Oct 2003 13:47:17 +0000 (13:47 +0000)
to tty instead of stdout.
(This used to be commit 3cec478b82359c527065c3a8d44daae96b7ac57e)

source3/lib/getsmbpass.c

index 27cd5e6dfa2ad8d7be7f2da50f08b2e276787865..df5e0359aa250bc039dd9c63e5abd92b6fbaacea 100644 (file)
@@ -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);