]> git.sur5r.net Git - openldap/commitdiff
Detect and use getpassphrase() and getpass()
authorKurt Zeilenga <kurt@openldap.org>
Fri, 19 May 2000 21:11:34 +0000 (21:11 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 19 May 2000 21:11:34 +0000 (21:11 +0000)
CHANGES
configure
configure.in
include/ac/unistd.h
include/portable.h.in
libraries/liblutil/getpass.c

diff --git a/CHANGES b/CHANGES
index acc5bf04e744e7064aeeab61caab22f805169f36..f1fe2a18f9248b9d8e5548d58887ab598070372e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,7 @@ Changes included in OpenLDAP 1.2.11 Release Engineering
        Fixed NULL prefix bug in libldap/ufn.c
        Fixed slapd_shutdown extern reference bug (ITS#527)
        Build Environment
+               Detect and use getpassphrase() and getpass()
                Change GNU Pth to enable soft syscalls
                Changed RCPT cmds symbol to avoid link conflict (ITS#526)
                Changed LDBM directory to $localstatedir/openldap-ldbm
index ce0bece2d9796d7fb795d1a350e673efc9eb5fd4..0f323f2bee46566a3b69c5c7aaf3f7d5fce02166 100755 (executable)
--- a/configure
+++ b/configure
@@ -9277,6 +9277,8 @@ for ac_func in \
        bcopy                   \
        closesocket             \
        flock                   \
+       getpass                 \
+       getpassphrase   \
        getdtablesize   \
        gethostname             \
        getpwuid                \
@@ -9305,12 +9307,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9309: checking for $ac_func" >&5
+echo "configure:9311: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9314 "configure"
+#line 9316 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9334,7 +9336,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9362,12 +9364,12 @@ done
 for ac_func in getopt strdup tempnam
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9366: checking for $ac_func" >&5
+echo "configure:9368: checking for $ac_func" >&5
 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9371 "configure"
+#line 9373 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -9391,7 +9393,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:9395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -9421,13 +9423,13 @@ done
 # Check Configuration
 
 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:9425: checking declaration of sys_errlist" >&5
+echo "configure:9427: checking declaration of sys_errlist" >&5
 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 9431 "configure"
+#line 9433 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -9437,7 +9439,7 @@ int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:9441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_dcl_sys_errlist=yes
 else
@@ -9458,20 +9460,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then
 EOF
 
        echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
-echo "configure:9462: checking existence of sys_errlist" >&5
+echo "configure:9464: checking existence of sys_errlist" >&5
        if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 9468 "configure"
+#line 9470 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:9475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_have_sys_errlist=yes
 else
index 9152b3d98dfe4efa5215d56f7098cd25c8a3a104..d7be9120b790eded9bc6d24319475d5abc448836 100644 (file)
@@ -1396,6 +1396,8 @@ AC_CHECK_FUNCS(           \
        bcopy                   \
        closesocket             \
        flock                   \
+       getpass                 \
+       getpassphrase   \
        getdtablesize   \
        gethostname             \
        getpwuid                \
index 3eb7c23e4ce44dc523bbe6ae825357eee72dab60..e6141cb15f29cf68ee087d6dd0fbb39c646dd366 100644 (file)
        extern char *crypt();
 #endif
 
-#ifndef HAVE_GETPASS
+#if defined( HAVE_GETPASSPHRASE )
+extern char* (getpassphrase)();
+#define getpass(x) getpassphrase(x)
+#elif defined( HAVE_GETPASS )
+extern char* (getpass)();
+#else
+#define NEED_GETPASS
 extern char* getpass LDAP_P((const char* prompt));
 #endif
 
index abadb5b54266fd50b5577db76da7fa16d4ae8305..e142fac975cc5214b0a572fa84c20f222b8c9df0 100644 (file)
 /* Define if you have the getopt function.  */
 #undef HAVE_GETOPT
 
+/* Define if you have the getpass function.  */
+#undef HAVE_GETPASS
+
+/* Define if you have the getpassphrase function.  */
+#undef HAVE_GETPASSPHRASE
+
 /* Define if you have the getpwuid function.  */
 #undef HAVE_GETPWUID
 
index c5cc6b0e32245598cd85b4aaf8cb05c65bdaab74..c9c1d20771e7fc5577bfef72fcb73f38d9b137d2 100644 (file)
@@ -12,8 +12,6 @@
 
 #include "portable.h"
 
-#ifndef HAVE_GETPASS
-
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -25,6 +23,8 @@
 #include <ac/time.h>
 #include <ac/unistd.h>
 
+#ifdef NEED_GETPASS
+
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -149,4 +149,4 @@ getpass( const char *prompt )
 #endif /* DOS */
 }
 
-#endif /* !HAVE_GETPASS */
\ No newline at end of file
+#endif /* !NEED_GETPASS */