]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/getpass.c
fix memory handling
[openldap] / libraries / liblutil / getpass.c
index da404df6f4a7a4fbd0fe807ebd5d15c130d1d7ca..2745da308cd5c7e40d22ee35273ecbc0e5efe0c0 100644 (file)
@@ -1,10 +1,20 @@
+/* getpass.c -- get password from user */
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Portions Copyright 1998-2003 Kurt D. Zeilenga.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
-/*
- * Copyright (c) 1992, 1993  Regents of the University of Michigan.
+/* Portions Copyright (c) 1992, 1993  Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * software without specific prior written permission. This software
  * is provided ``as is'' without express or implied warranty.
  */
+/* This work was originally developed by the University of Michigan
+ * and distributed as part of U-MICH LDAP.  It was adapted for use in
+ * -llutil by Kurt D. Zeilenga.
+ */
 
 #include "portable.h"
 
@@ -50,7 +64,7 @@ lutil_getpass( const char *prompt )
        static char buf[256];
        int i, c;
 
-       if( prompt == NULL ) prompt = "Password: ";
+       if( prompt == NULL ) prompt = _("Password: ");
 
 #ifdef DEBUG
        if (debug & D_TRACE)
@@ -76,7 +90,7 @@ lutil_getpass( const char *prompt )
        FILE *fi;
        RETSIGTYPE (*sig)( int sig );
 
-       if( prompt == NULL ) prompt = "Password: ";
+       if( prompt == NULL ) prompt = _("Password: ");
 
 #ifdef DEBUG
        if (debug & D_TRACE)