Commit Graph

77 Commits

Author SHA1 Message Date
Kurt Zeilenga
1d7704b28e Fix tmp file removal. 1999-01-08 19:51:15 +00:00
Kurt Zeilenga
b815f61e0d Wrap db2 mutex with -DHAVE_BERKELEY_DB2 (should be hidden in -lldbm) ITS#35
Unwrap ldbm_datum_init()
1999-01-07 03:28:08 +00:00
Kurt Zeilenga
0f76c52448 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.
1999-01-07 02:51:08 +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
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
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
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
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
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
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
4123a08af5 Fix server --without-xxx build issues... 1998-12-20 00:55:39 +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 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
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
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
Kurt Zeilenga
4e9f9af375 Add a couple minor safety checks. 1998-11-25 23:45:57 +00:00
Kurt Zeilenga
b2ec7af331 Changed dn2entry to always returned a modified matched.
Modified users of this code to free matched if set.
1998-11-23 20:08:25 +00:00
Kurt Zeilenga
90debec329 plug newDN memory leak using Will Ballantyne's patch 1998-11-23 19:57:00 +00:00
Kurt Zeilenga
475fd6dc45 "make veryclean" now lives up to its name. 1998-11-22 06:24:59 +00:00
Kurt Zeilenga
bbdac6ebca debug messages incorrectly said "add" instead of "remove". 1998-11-18 20:27:21 +00:00
Kurt Zeilenga
e622bc85f8 free parent's reader lock. Thanks Gary! 1998-11-18 20:20:54 +00:00
Kurt Zeilenga
b5494457d8 Remove extern declarations of library functions from source.c.
This could cause problems on odd systems.  The generic
  headers should be extended as needed to include necessary
  system headers or, if necessary, make explicit declarations.
Extended ac/string.h header to look for string.h/strings.h if
  STDC_HEADERS is not defined.  Also provide basic declarations for
  str*() functions.  This could cause problems on odd systems.
Extended ac/unistd.h header to define basic declaration for misc
  functions that might be missing from headers.   This includes
  externs for getenv(), getopt(), mktemp(), tempname().
Protect fax500.h from multiple inclusion.  Moved includes of
  system/generic headers back to source files.
Made mail500 helper functions static.
Fixed includes of ctype.h, signal.h, etc. to use generics.
lutil/tempname.c: was including stdlib.h twice, one should stdio.h.
Wrapped <sys/resource.h> with HAVE_SYS_RESOURCE_H.
lber/io.c/ber_get_next(): Changed noctets back to signed.
  Used with BerRead which expects signed int as second arg and
  returns signed int.
1998-11-16 05:07:27 +00:00
Hallvard Furuseth
7e6ad5100c Protoized, moved extern definitions to .h files, fixed related bugs.
Most function and variable definitions are now preceded by its extern
definition, for error checking.  Retyped a number of functions, usually
to return void.  Fixed a number of printf format errors.

API changes (in ldap/include):
  Added avl_dup_ok, avl_prefixapply, removed ber_fatten (probably typo
  for ber_flatten), retyped ldap_sort_strcasecmp, grew lutil.h.

A number of `extern' declarations are left (some added by protoize), to
be cleaned away later.  Mostly strdup(), strcasecmp(), mktemp(), optind,
optarg, errno.
1998-11-15 22:40:11 +00:00
Kurt Zeilenga
f1fde41ff8 remove an entry from its parent's children ID list when it's deleted.
Provided by "Gary D. Williams" <sasgwi@unx.sas.com>
1998-11-12 18:39:33 +00:00
Hallvard Furuseth
523fd2c891 Fix most `wider type truncated to int' bugs on OSF1 due to implicit decls:
#include <stdlib.h>    to get malloc & co various places,
 #include <ac/string.h> to get strlen & co in (liblutil/setproctitle.c),
 declare ch_malloc & co (slurp.h), avl_find_lin (avl.h), Malloc (ud/edit.c).
Also changed ch_malloc & co from char* to void* functions.
1998-11-11 23:37:38 +00:00
Hallvard Furuseth
f165bb2b96 strlen() needed string.h. 1998-11-11 16:35:58 +00:00
Kurt Zeilenga
21cb9a1c5d Fix LDBM_SYNC typo 1998-11-07 17:14:35 +00:00
Kurt Zeilenga
3f1b97481c Make flush_writes the default. Change option to 'dbcachenowsync'.
Change backend struct option to li_dbcachewsync.
1998-11-07 02:25:32 +00:00
Kurt Zeilenga
8777f818dc Fix datum typo. 1998-11-05 21:56:08 +00:00
Hallvard Furuseth
853a1371d1 Some gcc -W... cleanup 1998-11-05 06:49:49 +00:00
Hallvard Furuseth
0c38adcfd8 Get struct sockaddr for slap.h 1998-11-05 05:05:05 +00:00
Hallvard Furuseth
83ec12246e Enclose debug variables in #ifdef LDAP_DEBUG 1998-11-05 05:03:12 +00:00
Stuart Lynne
7c52060c67 1. extend aclgroup's to be able to specify objectClassValue and groupAttrName
2. update print_acl() a bit and call it during aclparse if LDAP_DEBUG_ACL
1998-10-27 02:07:12 +00:00
Kurt Zeilenga
033cf4ebe7 Fixup bugs created by merge. 1998-10-26 17:37:35 +00:00
Kurt Zeilenga
cbb281cc4e remove old files 1998-10-25 01:50:47 +00:00
Kurt Zeilenga
2a869f5a99 merged with autoconf branch 1998-10-25 01:41:42 +00:00
Kurt Zeilenga
708e5abb08 Fixed memory leaks. 1998-10-24 06:11:30 +00:00
Kurt Zeilenga
32d9124fed Updated derefAlias/DN to handle Entry R/W locks.
New alias.c provided by Stuart Lynne.
1998-10-24 04:01:20 +00:00
Kurt Zeilenga
6772a6e130 new files for general aliasing 1998-10-24 03:49:07 +00:00
Kurt Zeilenga
bf6c1e0ad2 Added Will Ballantyne's General Aliasing code.
Not quite sure if the entry lock handling is correct yet.
1998-10-24 02:42:38 +00:00
Kurt Zeilenga
d4c5308b3a Use current schema objectClass 'groupOfNames' instead of 'groupOfUniqueNames'
Will consider moving to groupOfUniqueNames as part of OpenLDAP 2.0.
1998-10-24 02:33:17 +00:00