Commit Graph

165 Commits

Author SHA1 Message Date
Kurt Zeilenga
ed33462bdf Use MAXARGS... we should actually check for limits.h's ARG_MAX and
use this everywhere... but that's for another day.
1999-01-06 20:27:27 +00:00
Kurt Spanier
9c6d384b9a - 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.
1999-01-05 15:40:58 +00:00
Kurt Zeilenga
c97837277a entry pointer 'p' must be initialized. Should fix ITS#31. 1999-01-03 22:55:43 +00:00
Kurt Zeilenga
ad8a5146a6 Wrap strtok use with mutex. 1999-01-01 20:43:29 +00:00
Kurt Zeilenga
a5e6fa0d1c Wrap strtok use with mutex. 1999-01-01 20:22:56 +00:00
Kurt Zeilenga
22e3ddaad4 I thought the bdn was normalized already... guess not. 1998-12-30 05:21:40 +00:00
Kurt Zeilenga
64cd7d3346 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.
1998-12-30 03:35:23 +00:00
Kurt Zeilenga
595bf86635 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.
1998-12-30 00:06:27 +00:00
Kurt Zeilenga
25f2f9dd70 Use charray_free to free alist charray 1998-12-29 23:23:21 +00:00
Kurt Zeilenga
695508813d 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.
1998-12-29 21:45:08 +00:00
Kurt Spanier
bfb27120be 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().
1998-12-29 17:28:45 +00:00
Kurt Zeilenga
cfa450d078 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).
1998-12-28 23:43:04 +00:00
Kurt Zeilenga
ecc44e2292 matched needs to be initialized to NULL as we may never
make it to dn2entry_r().
1998-12-28 16:41:39 +00:00
Kurt Zeilenga
dacc0bfc7d Improve readability of base output in debugging.
Also, output UNKNOWN_PREFIX ('?') instead of writing a nul character
when the attribute prefix is unknown.
1998-12-28 00:44:15 +00:00
Kurt Zeilenga
97f10a99cc Plug 'matched' memory leak in dn2entry() 1998-12-28 00:39:50 +00:00
Kurt Zeilenga
bf5ecff613 Plug addtional realBase memory leaks. 1998-12-27 23:23:09 +00:00
Kurt Zeilenga
fc9e20763f Only use the LDAP_ALLOW_NULL_SEARCH_BASE code as last resort. Moved
to after other suffix checks.
1998-12-27 20:57:30 +00:00
Hallvard Furuseth
19742f2e93 Remove duplicate definitions of global_schemacheck and global_oc 1998-12-27 08:59:38 +00:00
Hallvard Furuseth
d59de0c50f Plug some memory leak 1998-12-27 04:19:57 +00:00
Hallvard Furuseth
4bb4499175 Plug some memory leaks 1998-12-27 03:55:57 +00:00
Hallvard Furuseth
0aafb7267a Plug memory leak 1998-12-27 03:11:13 +00:00
Hallvard Furuseth
c3a692787c Change overlapping strcpy( x, y )' to SAFEMEMCPY( x, y, strlen( y ) + 1 )' 1998-12-27 02:00:08 +00:00
Hallvard Furuseth
c89fab6acc Reset *modtail after freeing it, so it's not freed again 1998-12-26 09:55:09 +00:00
Kurt Zeilenga
9da13f321c 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...
1998-12-24 01:16:22 +00:00
Kurt Zeilenga
487aa911f0 Add rc=0 fix as suggested by Tobias Reber <t.reber@dkfz-heidelberg.de>
in ITS#17.
1998-12-22 17:04:34 +00:00
Kurt Zeilenga
a3ac3be6a7 Added lber_get/set_option. Removed lber_debug/ldap_debug.
Updated other codes as needed.
1998-12-22 01:34:01 +00:00
Kurt Zeilenga
2ffb9ae30d ITS#12 realBase was being freed before use. The offending free()
call has been removed and additional code added to properly free
realBase variable.  Also fixed leaking of the matched variable.
1998-12-21 17:45:47 +00:00
Kurt Zeilenga
2d15a94d16 LDAP C-API changes
struct friendly (Friendly) changed to ldap_friendly (LDAPFriendly)
	  ldap_friendly friend prefix changed to 'lf_' from 'f_'
	removed mod_next field from LDAPMod (struct ldapmod)
	modified slapd to use new LDAPModList (struct ldapmodlist) struct.
Added LDAPv3 result codes to ldap.h
1998-12-21 00:21:58 +00:00
Kurt Zeilenga
5c6ad6c5b1 ldif'ize ldif library (ie: everything is now in the ldif_ namespace) 1998-12-20 22:28:33 +00:00
Kurt Zeilenga
362d6cbf2a Add configure code for setting LDAP_SYSLOG but actually use hardcoded
LDAP_SYSLOG in slap.h/slurp.h.
1998-12-20 21:56:44 +00:00
Kurt Zeilenga
c7d5811b78 more cleanup 1998-12-20 19:57:44 +00:00
Kurt Zeilenga
6fd2aa4e84 Clean up after last commit. 1998-12-20 19:49:22 +00:00
Kurt Zeilenga
3e390a8074 Unexpand spaces for tabs in prior commit before merging to rel_eng_1_1. 1998-12-20 19:31:21 +00:00
Kurt Zeilenga
b5973eba5d Minor change to signal handler. Changed _shutdown flag to
type 'sig_atomic_t' and marked it volatile.  Add detection to
configure to ensure sig_atomic_t and volatile are supported.
1998-12-20 18:16:03 +00:00
Kurt Zeilenga
4123a08af5 Fix server --without-xxx build issues... 1998-12-20 00:55:39 +00:00
Kurt Zeilenga
b5e50eff5e Disable writing syncing when creating databases. 1998-12-18 22:21:16 +00:00
Kurt Zeilenga
5d2accea50 Patch cache_delete_entry_internal() as suggested by
Daniel Carroll <dan@mesa7.mesa.colorado.edu>
This patch ensures we try deleting the entry from both the
dntree and the idtree.
1998-12-18 18:06:30 +00:00
Kurt Spanier
9e97da14fb Initialization of Datum structures to zero by memset() before first use.
If Berkeley DB version 2.x is used as a slapd back-end a not-initialized
Datum structure will raise an EINVAL error in (DB)->put().
1998-12-18 12:28:47 +00:00
Kurt Zeilenga
9df2f4f424 The result set of an EQUALITY search on a SYNTAX_BIN attribute may have been
incorrect because value_cmp() in value.c compares two attributes by
comparing the leading bytes of the two values (candidate and filter) up to
the smaller of the two lengths of the binary values. If the lengths of two
SYNTAX_BIN values differ, like SYNTAX_CES and SYNTAX_CIS, the EQUALITY
comparison should fail.

It also appears that value_ncmp() in value.c has no references anywhere in
the openLDAP source tree, save for a definition in proto-slap.h. The
following fix the bug and remove the dead code:

From: "MCGARRAHAN, KENNETH L" <km4155@momail.sbc.com>
1998-12-14 04:25:55 +00:00
Kurt Zeilenga
6c2949ed86 Change cache.c assert logic based on Hallvard's suggestion.
"Check that the entry has no writers before removing it from the
  cache" sounds more sensible to me than "check that it *has* writers"
  before removing it.
I've also changed the default cachesize for tests to 4.  This
should help discover such problems.
1998-12-10 19:20:15 +00:00
Kurt Zeilenga
08134c9e16 printf("\tby") belongs on stderr. 1998-12-04 19:29:17 +00:00
Kurt Zeilenga
339c23549b Plug a leak reported by Jorg Pietschmann <pietsch@swissline.ch>
Still leaks ber_scanf results here and there...
1998-12-04 02:20:39 +00:00
Kurt Zeilenga
e699a9f871 Change the default installation to use a domain component (dc) style base dn. 1998-12-03 04:52:46 +00:00
Kurt Zeilenga
c1cef27bda Update slapd to use lutil_passwd() for both user and root passwords.
Remove MD5 and SHA1 options (both are now always on).  Rename
functions to be lutil_ instead of ldap_.
Create --enable-cleartext option.  Default is currently 'on'.
1998-12-01 03:36:37 +00:00
Kurt Zeilenga
8a884d1b9c Add ldif2ldbm bugfix from Randy Kunkee <kunkee@pluto.ops.NeoSoft.com> 1998-11-30 22:26:11 +00:00
Kurt Zeilenga
daaf487bdd We shouldn't detach a thread that we want to join with... 1998-11-30 20:37:48 +00:00
Kurt Zeilenga
40cb8d54c8 More LDAP_PORT depends. 1998-11-30 04:04:00 +00:00
Kurt Zeilenga
edd464ee8f Update build environment:
default sysconfdir subdirectory is openldap instead of ldap.
    This removes conflicts with other ldap subsystems.  Should
    be configure option.
  *.conf files are now preserved.  A *.conf.default are always
    created with the latest conf.
  *.help and ldapfriendly are now placed in $(datadir)/$(ldap_subdir)
  updated man pages to reflect changes.
1998-11-29 19:48:28 +00:00
Kurt Zeilenga
e2ee741ea8 Replace strdup() with ch_strdup() such that exit() will be called
if strdup fails.  This is better than not checking, but we should
add orderly shutdown.
1998-11-27 20:21:54 +00:00
Kurt Zeilenga
9b09d42a1d Apply preliminary patch provided by Hallvard.
This still needs significant review!
1998-11-27 20:02:55 +00:00