I'm hoping that someone can help me find out why my pre-bind plugin clauses ns-slapd to crash when the slapi_search_internal_get_entry function is called. What I'm seeing is that after starting ns-slapd, the plugin will crash slapd consistently or it will work consistently. This is with the same plugin in place and with the same user. So after some restarts the plugin crashes the slapd and after other starts I can bind and unbind with the same account dozens of times successfully.
This what I have installed:
[root@njbbldapp21 ~]# rpm -qa | grep 389
389-ds-base-libs-1.3.6.1-26.el7_4.x86_64
389-dsgw-1.1.11-5.el7.x86_64
389-console-1.1.18-1.el7.noarch
389-adminutil-1.1.21-2.el7.x86_64
389-admin-console-1.1.12-1.el7.noarch
389-ds-console-1.2.16-1.el7.noarch
389-ds-console-doc-1.2.16-1.el7.noarch
389-ds-1.2.2-6.el7.noarch
389-ds-base-1.3.6.1-26.el7_4.x86_64
389-ds-base-devel-1.3.6.1-26.el7_4.x86_64
389-admin-console-doc-1.1.12-1.el7.noarch
389-admin-1.1.46-1.el7.x86_64
[root@njbbldapp21 ~]# rpm -qa | grep 389
389-ds-base-libs-1.3.6.1-26.el7_4.x86_64
389-dsgw-1.1.11-5.el7.x86_64
389-console-1.1.18-1.el7.noarch
389-adminutil-1.1.21-2.el7.x86_64
389-admin-console-1.1.12-1.el7.noarch
389-ds-console-1.2.16-1.el7.noarch
389-ds-console-doc-1.2.16-1.el7.noarch
389-ds-1.2.2-6.el7.noarch
389-ds-base-1.3.6.1-26.el7_4.x86_64
389-ds-base-devel-1.3.6.1-26.el7_4.x86_64
389-admin-console-doc-1.1.12-1.el7.noarch
389-admin-1.1.46-1.el7.x86_64
Here's my Makefile:
CC = gcc
LD = ld
INCLUDE_FLAGS = -I /usr/lib64/dirsrv/plugins -I /opt/adminhome/aharvero/slap/389-ds-base-1.4.0.5/ldap/servers/slapd -I /usr/include/nspr4 -I /opt/adminhome/aharvero/slap/389-ds-base-1.4.0.5/ldap/include
#CFLAGS = $(INCLUDE_FLAGS) -D_REENTRANT -fPIC -z defs -shared
CFLAGS = $(INCLUDE_FLAGS) -D_REENTRANT -fPIC -z defs -shared -lsladpd -ltcmalloc -lldap_r -llber -lsasl2 -l svrcore -lssl3 -l nss3 -lkrb5 -l k5crypto -lcom_err -lpcre -lpthread -lsystemd -l plc4 -l plds4 -lc
#LDFLAGS = -G
LDFLAGS = -G -fPIC -z defs -shared -lc -l:libplc4.so -l:libslapd.so.0.1.0 -l:libldap_r-2.4.so.2 -l:liblber-2.4.so.2 -L /usr/lib64/dirsrv -L /lib64
OBJS = mybind.o
all: libmybind-plugin.so
libmybind-plugin.so: $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS)
.c.o:
$(CC) $(CFLAGS) -c $<
clean:
-rm -f $(OBJS) libmybind-plugin.so
CC = gcc
LD = ld
INCLUDE_FLAGS = -I /usr/lib64/dirsrv/plugins -I /opt/adminhome/aharvero/slap/389-ds-base-1.4.0.5/ldap/servers/slapd -I /usr/include/nspr4 -I /opt/adminhome/aharvero/slap/389-ds-base-1.4.0.5/ldap/include
#CFLAGS = $(INCLUDE_FLAGS) -D_REENTRANT -fPIC -z defs -shared
CFLAGS = $(INCLUDE_FLAGS) -D_REENTRANT -fPIC -z defs -shared -lsladpd -ltcmalloc -lldap_r -llber -lsasl2 -l svrcore -lssl3 -l nss3 -lkrb5 -l k5crypto -lcom_err -lpcre -lpthread -lsystemd -l plc4 -l plds4 -lc
#LDFLAGS = -G
LDFLAGS = -G -fPIC -z defs -shared -lc -l:libplc4.so -l:libslapd.so.0.1.0 -l:libldap_r-2.4.so.2 -l:liblber-2.4.so.2 -L /usr/lib64/dirsrv -L /lib64
OBJS = mybind.o
all: libmybind-plugin.so
libmybind-plugin.so: $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS)
.c.o:
$(CC) $(CFLAGS) -c $<
clean:
-rm -f $(OBJS) libmybind-plugin.so
Here's the plugin:
$ cat mybind.c
#ifdef HAVE_CONFIG_H
#include <config.h>
$ cat mybind.c
#ifdef HAVE_CONFIG_H
#include <config.h>
No comments:
Post a Comment