Commit aaaac6ee authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Detect and use getpassphrase() and getpass()

parent 40b8a71c
......@@ -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
......
......@@ -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
......
......@@ -1396,6 +1396,8 @@ AC_CHECK_FUNCS( \
bcopy \
closesocket \
flock \
getpass \
getpassphrase \
getdtablesize \
gethostname \
getpwuid \
......
......@@ -27,7 +27,13 @@
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
......
......@@ -214,6 +214,12 @@
/* 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
......
......@@ -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 */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment