]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/getpass.c
Merge remote branch 'origin/mdb.master'
[openldap] / libraries / liblutil / getpass.c
index 9deb0294ca873c8602f966dbf9977988f1d31c88..f181270ead1c1f0603352d32bdf0d328fcc8957b 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2010 The OpenLDAP Foundation.
+ * Copyright 1998-2011 The OpenLDAP Foundation.
  * Portions Copyright 1998-2003 Kurt D. Zeilenga.
  * Portions Copyright 2009 Howard Chu.
  * All rights reserved.
@@ -103,8 +103,8 @@ lutil_getpass( const char *prompt )
 #else
        fi = stdin;
 #endif
-       fprintf(stdout, "%s", prompt); 
-       fflush(stdout);
+       fprintf(stderr, "%s", prompt); 
+       fflush(stderr);
        i = 0;
        while ( (c = getc(fi)) != EOF && c != '\n' && c != '\r' )
                if ( i < (sizeof(pbuf)-1) )
@@ -112,8 +112,8 @@ lutil_getpass( const char *prompt )
 #if defined(HAVE_TERMIOS_H) || defined(HAVE_SGTTY_H)
        /* tidy up */
        if (fi != stdin) {
-               fprintf(stdout, "\n"); 
-               fflush(stdout);
+               fprintf(stderr, "\n"); 
+               fflush(stderr);
                SETFLAGS( ttyb, flags );
                if (SETATTR(fileno(fi), &ttyb) < 0)
                        perror("SETATTR");