[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#3595) Can't resolve LDAP server name on HPUX 11.11



In reading getent(3) for HP-UX 11.11
  http://docs.hp.com/en/B2355-60103/gethostent.3N.html

that gethostbyname_r(3) and gethostbyaddr_r(3) are categorized
as obsolete interfaces, and hence moved from -lc to -ld4r and
may be completely removed in subsequent releases.

It would seem that it not appropriate to add detection
for -ld4r and these obsolete interfaces.  Instead, the
code should use gethostbyname(3) and gethostbyaddr(3).
Unforunately, these will be unnecessary mutex protected
in -lldap_r as we have no good way of detecting whether
or not their implementations are thread-safe.

Kurt

At 10:24 AM 3/11/2005, hxdg21@yahoo.com wrote:
>Full_Name: Larry Smith
>Version: 2.2.23
>OS: HPUX 11.11
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (129.188.33.222)
>
>
>Hello,
>
>I have been able to successfully build OpenLDAP 2.2.23 on this system:
>
>> uname -a
>HP-UX myserver B.11.11 U 9000/800 3308236008 unlimited-user license
>
>However, I can only make LDAP work if I use the IP address of the LDAP server.
>It cannot resolve the name of my LDAP server. 
>
>For example:
>
>It does not work when I do this:
>
>> bin/ldapsearch -l 10 -z 1 -h ldapsrv.mynet.com -u -A -b
>"ou=people,ou=intranet,dc=mybus,dc=com" "uid=myid"
>ldap_bind: Can't contact LDAP server (-1)
>
>but it works fine if I replace ldapsrv.mynet.com by its IP address. I know that
>naming resolution is working fine because I can ping or nslookup
>ldapsrv.mynet.com . 
>
>You will find below a full log of the configuration of my build. You will notice
>the following in the log:
>
>checking for gethostbyname_r... yes
>checking for gethostbyaddr_r... yes
>...
>checking number of arguments of gethostbyname_r... 0
>checking number of arguments of gethostbyaddr_r... 0
>
>When I looked at the source code, I got the impression that the problem is
>happening because nobody has ported this OpenLDAP version to HP-UX 11.11 yet.
>The configuration of OpenLDAP is looking for a gethostbyname_r function
>requiring either 5 or 6 parameters and a gethostbyaddr_r function requiring
>either 7 or 8 parameters. On HP-UX 11.11 though, these functions are implemented
>as follows (from the man page):
>
>      int gethostbyname_r(const char *name,
>                          struct hostent *result,
>                          struct hostent_data *buffer);
>
>      int gethostbyaddr_r(const char *addr,
>                          int len,
>                          int type,
>                          struct hostent *result,
>                          struct hostent_data *buffer);
>
>Has anyone been able to get OpenLDAP to run on HPUX 11.11? If yes, what version
>did you use? Did you have to modify the source code? Any ideas will be greatly
>appreciated.
>
>Here is the full log of the configuration of my build
>
>> CC=gcc LIBS='-ld4r' ./configure --prefix=/apps/public/openldap-2.2.23-hp
>--without-cyrus_sasl --disable-slapd --enable-debug
>Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved.
>        Restrictions apply, see COPYRIGHT and LICENSE files.
>Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved.
>        Restrictions apply, see COPYRIGHT and LICENSE files.
>Configuring [1mOpenLDAP 2.2.23-Release[m ...
>checking host system type... hppa2.0w-hp-hpux11.11
>checking target system type... hppa2.0w-hp-hpux11.11
>checking build system type... hppa2.0w-hp-hpux11.11
>checking for a BSD compatible install... /apps/public/bin/ginstall -c
>checking whether build environment is sane... yes
>checking for mawk... no
>checking for gawk... gawk
>checking whether make sets ${MAKE}... yes
>checking for working aclocal... found
>checking for working autoconf... found
>checking for working automake... found
>checking for working autoheader... found
>checking for working makeinfo... found
>checking for gnutar... no
>checking for gtar... gtar
>checking configure arguments... configure: warning: slapd disabled, ignoring
>--enable-bdb argument
>configure: warning: slapd disabled, ignoring --enable-monitor argument
>done
>checking for a BSD compatible install... /apps/public/bin/ginstall -c
>checking for ar... ar
>checking for Cygwin environment... no
>checking for mingw32 environment... no
>checking for EMX OS/2 environment... no
>checking how to run the C preprocessor... gcc -E
>checking for gcc... gcc
>checking whether the C compiler (gcc   ) works... yes
>checking whether the C compiler (gcc   ) is a cross-compiler... no
>checking whether we are using GNU C... yes
>checking whether gcc accepts -g... no
>checking for ld used by GCC... /usr/ccs/bin/ld
>checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
>checking for /usr/ccs/bin/ld option to reload object files... -r
>checking for BSD-compatible nm... /bin/nm -p
>checking for a sed that does not truncate output... /apps/public/bin/gsed
>checking whether ln -s works... yes
>checking how to recognise dependent libraries... file_magic
>(s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library
>checking for object suffix... o
>checking for executable suffix... no
>checking command to parse /bin/nm -p output... ok
>checking for dlfcn.h... yes
>checking for ranlib... ranlib
>checking for strip... strip
>checking for objdir... .libs
>checking for gcc option to produce PIC... -fPIC
>checking if gcc PIC flag -fPIC works... yes
>checking if gcc static flag -static works... no
>checking if gcc supports -c -o file.o... yes
>checking if gcc supports -c -o file.lo... yes
>checking if gcc supports -fno-rtti -fno-exceptions... yes
>checking whether the linker (/usr/ccs/bin/ld) supports shared libraries... yes
>checking how to hardcode library paths into programs... relink
>checking whether stripping libraries is possible... no
>checking dynamic linker characteristics... hpux11.11 dld.sl
>checking if libtool supports shared libraries... yes
>checking whether to build shared libraries... yes
>checking whether to build static libraries... yes
>checking for dllload... no
>checking for shl_load... yes
>creating libtool
>checking whether ln works... yes
>checking whether ln -s works... (cached) yes
>checking how to run the C preprocessor... gcc -E
>checking for Cygwin environment... (cached) no
>checking for mingw32 environment... (cached) no
>checking for executable suffix... (cached) no
>checking for object suffix... (cached) o
>checking for be_app in -lbe... no
>checking for gcc option to accept ANSI C... none needed
>checking for gcc depend flag... -M
>checking for afopen in -ls... no
>checking for EBCDIC... no
>checking for ANSI C header files... yes
>checking for dirent.h that defines DIR... yes
>checking for opendir in -ldir... no
>checking for sys/wait.h that is POSIX.1 compatible... yes
>checking POSIX termios... yes
>checking whether use of TIOCGWINSZ requires sys/ioctl.h... no
>checking for arpa/inet.h... yes
>checking for arpa/nameser.h... yes
>checking for assert.h... yes
>checking for bits/types.h... no
>checking for conio.h... no
>checking for crypt.h... yes
>checking for direct.h... no
>checking for errno.h... yes
>checking for fcntl.h... yes
>checking for filio.h... no
>checking for getopt.h... no
>checking for grp.h... yes
>checking for io.h... no
>checking for libutil.h... no
>checking for limits.h... yes
>checking for locale.h... yes
>checking for netinet/tcp.h... yes
>checking for malloc.h... yes
>checking for memory.h... yes
>checking for psap.h... no
>checking for pwd.h... yes
>checking for process.h... no
>checking for resolv.h... yes
>checking for sgtty.h... yes
>checking for shadow.h... yes
>checking for stddef.h... yes
>checking for string.h... yes
>checking for strings.h... yes
>checking for sysexits.h... yes
>checking for sys/file.h... yes
>checking for sys/filio.h... no
>checking for sys/errno.h... yes
>checking for sys/ioctl.h... yes
>checking for sys/param.h... yes
>checking for sys/resource.h... yes
>checking for sys/select.h... no
>checking for sys/socket.h... yes
>checking for sys/stat.h... yes
>checking for sys/syslog.h... no
>checking for sys/time.h... yes
>checking for sys/types.h... yes
>checking for sys/ucred.h... no
>checking for sys/uio.h... yes
>checking for syslog.h... yes
>checking for termios.h... yes
>checking for unistd.h... yes
>checking for winsock.h... no
>checking for winsock2.h... no
>checking for sigset in -lV3... yes
>checking for socket... yes
>checking for select... yes
>checking types of arguments for select()... int,fd_set *,struct timeval *
>checking for regex.h... yes
>checking for library containing regfree... none required
>checking for compatible POSIX regex... yes
>checking for sys/uuid.h... no
>checking to see if -lrpcrt4 is needed for win32 UUID support... no
>checking for res_query... yes
>checking for getaddrinfo... yes
>checking for getnameinfo... yes
>checking for gai_strerror... yes
>checking for inet_ntop... yes
>checking INET6_ADDRSTRLEN... yes
>checking struct sockaddr_storage... yes
>checking for sys/un.h... yes
>checking for openssl/ssl.h... no
>checking for ssl.h... no
>configure: warning: Could not locate TLS/SSL package
>configure: warning: TLS data protection not supported!
>checking for _beginthread... no
>checking for pthread.h... yes
>checking POSIX thread version... 10
>checking for LinuxThreads pthread.h... no
>checking for GNU Pth pthread.h... no
>checking for sched.h... yes
>checking for pthread_create in default libraries... no
>checking for pthread link with -kthread... no
>checking for pthread link with -pthread... yes
>checking for sched_yield... yes
>checking for pthread_yield... no
>checking for thr_yield... no
>checking for pthread_kill... yes
>checking for pthread_rwlock_destroy... yes
>checking for pthread_detach with <pthread.h>... yes
>checking for pthread_setconcurrency... yes
>checking for pthread_getconcurrency... yes
>checking for thr_setconcurrency... no
>checking for thr_getconcurrency... no
>checking for pthread_kill_other_threads_np... no
>checking for LinuxThreads implementation... no
>checking for LinuxThreads consistency... no
>checking if pthread_create() works... yes
>checking if select yields when using pthreads... yes
>checking for thread specific errno... yes
>checking for thread specific h_errno... yes
>checking for ctime_r... yes
>checking for gethostbyname_r... yes
>checking for gethostbyaddr_r... yes
>checking number of arguments of ctime_r... 2
>checking number of arguments of gethostbyname_r... 0
>checking number of arguments of gethostbyaddr_r... 0
>checking for openlog... yes
>configure: warning: SASL authentication not supported!
>configure: warning: Strong authentication not supported!
>checking fetch(3) library... no
>checking for setproctitle... no
>checking for setproctitle in -lutil... no
>checking long long... yes
>checking for ANSI C header files... (cached) disable
>checking for mode_t... yes
>checking for off_t... yes
>checking for pid_t... yes
>checking for ptrdiff_t... yes
>checking return type of signal handlers... void
>checking for size_t... yes
>checking for ssize_t... yes
>checking for caddr_t... yes
>checking for socklen_t... yes
>checking for member st_blksize in aggregate type struct stat... yes
>checking whether time.h and sys/time.h may both be included... yes
>checking whether struct tm is in sys/time.h or time.h... time.h
>checking for uid_t in sys/types.h... yes
>checking for sig_atomic_t... yes
>checking struct passwd for pw_gecos... yes
>checking struct passwd for pw_passwd... yes
>checking if toupper() requires islower()... no
>checking for working const... yes
>checking if compiler understands volatile... yes
>checking whether byte ordering is bigendian... yes
>checking size of short... 2
>checking size of int... 4
>checking size of long... 4
>checking size of wchar_t... 4
>checking for 8-bit clean memcmp... yes
>checking for strftime... yes
>checking for inet_aton()... yes
>checking for _spawnlp... no
>checking for _snprintf... no
>checking for _vsnprintf... no
>checking for vprintf... yes
>checking for snprintf... yes
>checking for vsnprintf... yes
>checking for bcopy... yes
>checking for closesocket... no
>checking for chroot... yes
>checking for endgrent... yes
>checking for endpwent... yes
>checking for fcntl... yes
>checking for flock... no
>checking for fstat... yes
>checking for getdtablesize... yes
>checking for getgrgid... yes
>checking for gethostname... yes
>checking for getpass... yes
>checking for getpassphrase... no
>checking for getpwuid... yes
>checking for getpwnam... yes
>checking for getspnam... yes
>checking for gettimeofday... yes
>checking for initgroups... yes
>checking for lockf... yes
>checking for memcpy... yes
>checking for memmove... yes
>checking for mkstemp... yes
>checking for mktemp... yes
>checking for pipe... yes
>checking for read... yes
>checking for recv... yes
>checking for recvfrom... yes
>checking for setpwfile... no
>checking for setgid... yes
>checking for setegid... no
>checking for setsid... yes
>checking for setuid... yes
>checking for seteuid... no
>checking for sigaction... yes
>checking for signal... yes
>checking for sigset... yes
>checking for strdup... yes
>checking for strerror... yes
>checking for strpbrk... yes
>checking for strrchr... yes
>checking for strsep... no
>checking for strstr... yes
>checking for strtol... yes
>checking for strtoul... yes
>checking for strtoq... no
>checking for strtouq... no
>checking for strtoll... no
>checking for strspn... yes
>checking for sysconf... yes
>checking for usleep... yes
>checking for waitpid... yes
>checking for wait4... no
>checking for write... yes
>checking for send... yes
>checking for sendmsg... yes
>checking for sendto... yes
>checking for getopt... yes
>checking for getpeereid... no
>checking for msg_accrights in msghdr... yes
>checking declaration of sys_errlist... no
>checking existence of sys_errlist... no
>creating ./config.status
>creating Makefile
>creating doc/Makefile
>creating doc/man/Makefile
>creating doc/man/man1/Makefile
>creating doc/man/man3/Makefile
>creating doc/man/man5/Makefile
>creating doc/man/man8/Makefile
>creating clients/Makefile
>creating clients/tools/Makefile
>creating include/Makefile
>creating libraries/Makefile
>creating libraries/liblber/Makefile
>creating libraries/libldap/Makefile
>creating libraries/libldap_r/Makefile
>creating libraries/liblunicode/Makefile
>creating libraries/liblutil/Makefile
>creating libraries/librewrite/Makefile
>creating servers/Makefile
>creating servers/slapd/Makefile
>creating servers/slapd/back-bdb/Makefile
>creating servers/slapd/back-dnssrv/Makefile
>creating servers/slapd/back-hdb/Makefile
>creating servers/slapd/back-ldap/Makefile
>creating servers/slapd/back-ldbm/Makefile
>creating servers/slapd/back-meta/Makefile
>creating servers/slapd/back-monitor/Makefile
>creating servers/slapd/back-null/Makefile
>creating servers/slapd/back-passwd/Makefile
>creating servers/slapd/back-perl/Makefile
>creating servers/slapd/back-shell/Makefile
>creating servers/slapd/back-sql/Makefile
>creating servers/slapd/shell-backends/Makefile
>creating servers/slapd/slapi/Makefile
>creating servers/slapd/overlays/Makefile
>creating servers/slurpd/Makefile
>creating tests/Makefile
>creating tests/run
>creating tests/progs/Makefile
>creating include/portable.h
>creating include/ldap_features.h
>creating include/lber_types.h
>Please run "make depend" to build dependencies