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

Openldap on z/OS with XPLINK



Hi,

using the info from http://www.openldap.org/faq/data/cache/719.html
I almost got OpenLDAP-2.3.33  to run on z/OS 1.7 with XPLINK and ASCII options.

I used this compiler script acc:

exec /bin/c89 -Wc,LANGLVL\(EXTENDED\) -Wc,XPLINK,ASCII -Wl,XPLINK
-D_XOPEN_SOURCE_EXTENDED=1 -D_OPEN_THREADS -D_OPEN_SYS_SOCK_IPV6
-D_ISOC99_SOURCE $*

I got the server and tools to compile and link (z/OS 1.7). ldapsearch
works against IBM's z/OS LDAP server.

The openldap server starts, says it is listening, the bind address is
OK (I added some more debug output), but the socket is closed and
cannot be connected to.

Have you ever seen this? Actually in daemon.c there seems to be no
listen() call, so I wonder if the listen() call fails, I'll have to
check tomorrow.

Another source of problems might be that not all headers are included,
e.g. daemon.c uses inet_ntop() which requires arpa/inet.h but is not
included.
I think the ASCII library functions versions are only pulled in if the
header is included, so some magic preprocessor tricks that select
ascii versions can trigger.

#define _OPEN_SYS_SOCK_IPV6
#include <arpa/inet.h>
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);

Thanks very much,
Juergen

$ libexec/slapd -d 1 -h ldap://sh90:6989
@(#) $OpenLDAP: slapd 2.3.33 (Jan 25 2007 13:43:07) $
      juergen@sh90:/u/entwicklung2/openldap-2.3.33/servers/slapd
daemon_init: listen on ldap://sh90:6989
daemon_init: 1 listeners to open...
ldap_url_parse_ext(ldap://sh90:6989)
daemon: getaddrinfo input host (sh90) output :s
daemon: inet_ntop result: 192.168.0.153
daemon: l.sl_name.bv_val: IP=192.168.0.153:6989
daemon: listener initialized ldap://sh90:6989
daemon_init: 1 listeners opened
slapd init: initiated server.


$ netstat -s | grep 69 Stream 192.168.0.153..6989 0.0.0.0..0 Closed 00001513