Kurt Zeilenga [Wed, 13 Jan 1999 01:17:22 +0000 (01:17 +0000)]
Add normalized dn to Entry structure as field e_ndn. Entry
creation codes to provide this field. Update cache_entrydn_cmp
to strcasecmp() the e_ndn instead of e_dn. Note: strcasecmp()
is still used as e_ndn isn't in uppercase. Maybe it should
be. Did not update other codes to use e_ndn. Hence, there
are lots of dn_normalize() calls that could be eliminated.
(The case determination of e_ndn should be made first).
Kurt Zeilenga [Mon, 11 Jan 1999 19:04:34 +0000 (19:04 +0000)]
Use pthread_detach() to detach connection threads instead of
creating them detached. This hopefully will reduce problems on
draft4 pthread implementations related to creating detached
threads (which is _np under draft4) on some platforms without
causing problems with other thread implementations.
Kurt Zeilenga [Mon, 11 Jan 1999 18:36:40 +0000 (18:36 +0000)]
Change SLAPD shutdown to do a cond wait on active threads instead
of a busy wait and allow the pthread_yield within the loop to be
removed. This was the only pthread_yield which was necessary
when usng non-preemptive threads. As such, the configure.in
sched_yield/pthread_yield missing error can be removed from
configure.in. If explicit yield function is missing, just provide
a no-op replacement.
Moved declaration of various slapd globals from main.c to init.c
so they can be shared with ldbm tools.
Kurt Zeilenga [Sun, 10 Jan 1999 02:25:41 +0000 (02:25 +0000)]
Update build environment to fix VPATH support.
make depend, make tests, and make install all work when build directory
is not the $srcdir.
Also modified library handling such that -lpthread more likely to be last.
WARNING: new orderring requires use of LDFLAGS to set global loader options
such as -L/usr/local/lib. If you put this in LIBS, some libraries
may not be found a link time.
Likely broke Kerberos/LDAPD support. Don't have those in my testbed.
Kurt Zeilenga [Sun, 10 Jan 1999 02:16:48 +0000 (02:16 +0000)]
rename 'struct op' to 'struct slap_op'
rename 'struct conn' to 'struct slap_conn'
rename op_function to slap_op_func for functions add/delete/free
This change is need to avoid clashing with perl internals.
Kurt Zeilenga [Thu, 7 Jan 1999 02:51:08 +0000 (02:51 +0000)]
Modify Add/Delete/Modrdn operations to require write perms on
parent's "children" attribute. Write lock parent to prevent
multiple clients making conflicting operations concurrently.
If parent doesn't exist (ie: is backend root), acquire a writer
lock (a simple mutex) on the "root."
Use -DSLAPD_CHILD_MODIFICATION_WITH_ENTRY_ACL to use the child's
"entry" acl for modrdn/delete operations.
Kurt Spanier [Tue, 5 Jan 1999 15:40:58 +0000 (15:40 +0000)]
- Make install creates $(RUNDIR)/var for pid and args files of slapd.
- slapd's pid/args file names are based on the servers binary file names,
providing for multiple servers beeing run on one host.
- slapd supports the -l command line parameter for selection of a
syslog LOCAL user (-lLOCAL0 .. -lLOCAL7)
- db_appinit() is called during first ldbm_open() in DB 2.x to initialize
DB debugging features (good to find bugs in the DB code :-)
- a patch for a non-initialized variable in DB's 2.x db_open is provided.
Kurt Zeilenga [Sat, 2 Jan 1999 23:40:31 +0000 (23:40 +0000)]
Update ctime_r() argument macro to cache results and to produce
one preprocessor macro instead of two. Ran aclocal, autoconf,
autoheader to update derived files. Modify util-int.c to use
CTIME_R_NARGS define and fallback to ctime() if not set.
Made LDAP_API_FEATURE_X_OPENLDAP_REENTRANT dependent upon result.
Kurt Zeilenga [Wed, 30 Dec 1998 03:35:23 +0000 (03:35 +0000)]
Preliminary Fixes for ITS#24, ITS#26, and ldbm_back_add race condition.
Resolved deadlock by passing target entry to be_group and using
this if dn same as bdn. It might actually be safer to check
entry ids instead of dns.
Resolved bogus add to cache after failed acl check by deferring
cache add until after parent/acl checks have successful been
completed.
Eliminated race condition caused by concurrent adds
of same dn by adding 'li_add_mutex' around the critical section
of code (most of ldbm_back_add).
This code is preliminary and still needs significant testing.
Kurt Zeilenga [Wed, 30 Dec 1998 00:06:27 +0000 (00:06 +0000)]
Cleanup thread handling to resolve non-exiting daemons on FreeBSD.
Seems that calling pthread_exit() in the main (and only active)
thread does not cause the whole process to exit. Very odd.
Anyways, as we want to whole process to exit, we should just exit
after joining with our other threads.
I've also removed dead code for detaching threads we join with.
Kurt Zeilenga [Tue, 29 Dec 1998 21:45:08 +0000 (21:45 +0000)]
Fix --disable-crypt and --disable-cleartext
mutex declaration should be moved from slapd/main.c to slapd/init.c
so we don't have ripple changes through slapd/tools.
Kurt Spanier [Tue, 29 Dec 1998 17:28:45 +0000 (17:28 +0000)]
Patch for Berkeley DB 2.6.4 (beta) (DB)->cursor() call.
Introduction of ldbm_datum_init().
Patch for non-NULL pointer test befor call to ldbm_datum_free().
Kurt Zeilenga [Mon, 28 Dec 1998 23:43:04 +0000 (23:43 +0000)]
Fix schema check bug... actually charray needs to dup strings on
add/merge as we now free strings agressively. Improved debug
message to include name of missing required attribute and added
check for 'operational attributes'. This check should be used
everywhere we need to test for operational attributes (add/modify).
Also, enabled schema checking for tests (and fixed resulting
problems by adjusting oc.conf).
Kurt Zeilenga [Mon, 28 Dec 1998 00:44:15 +0000 (00:44 +0000)]
Improve readability of base output in debugging.
Also, output UNKNOWN_PREFIX ('?') instead of writing a nul character
when the attribute prefix is unknown.
Kurt Zeilenga [Thu, 24 Dec 1998 06:00:53 +0000 (06:00 +0000)]
getentry.c: LDAP_RES_SEARCH_REFERENCE changes after fixing loop initializer.
references.c: fix same bug here. need to implement parsing.
Still need to implement chasing in cldap.c/result.c
Randy Kunkee [Thu, 24 Dec 1998 01:31:40 +0000 (01:31 +0000)]
Fix line 62 of bprint.c "#elif" line with no expression.
Add check for to configure.in vsprintf, since HAVE_VSPRINTF is presumably
what was intended there. Finally, also protected a bunch of if test
expressions with double quotes, as they were producing illegal test
commands.
Kurt Zeilenga [Thu, 24 Dec 1998 01:16:22 +0000 (01:16 +0000)]
Apply patch to better behave under Solaris threads (thr).
Could still deadlock on the close(). A surrogate parent
should be used to create the children...