Commit Graph

184 Commits

Author SHA1 Message Date
Kurt Zeilenga
55cd5ee75f Add reference to slapd.conf(5) and recommendation to avoid cleartext passwords. 1999-01-16 01:48:26 +00:00
Bart Hartgers
3a5a86d44c Fixed a small typo... 1999-01-15 19:57:32 +00:00
Kurt Zeilenga
3e3f0b8871 Could have no entry to return... check entry pointer before trying to
return cache entry.
1999-01-15 18:04:52 +00:00
Kurt Zeilenga
163bac5f04 Install slapd.conf with mode of 600. 1999-01-15 02:48:00 +00:00
Kurt Zeilenga
b7beec1663 Initial version of the experimental 'back-perl'
John's still working on the 'perl-test' (the perl backend test module).
1999-01-14 06:33:09 +00:00
Kurt Zeilenga
28a671d10d Revamp build system yet again to move all external libraries to
end of link.    Basic order is:
	$LDFLAGS internal-libs external-libs $LIBS $LTHREAD_LIBS

LTHREAD_LIBS is last as -lpthread (or equiv) must be last on many systems.
LIBS is next to last as some user might have put -lpthread (or equiv)
in $LIBS.
1999-01-14 01:31:43 +00:00
Kurt Zeilenga
b39fdc0bcd 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).
1999-01-13 01:17:22 +00:00
Kurt Zeilenga
6f88096e72 Report status of failed pthread_create() 1999-01-12 23:57:21 +00:00
Kurt Zeilenga
6bd6a7cf27 Report exit status of pthread_create() 1999-01-12 23:52:50 +00:00
Kurt Zeilenga
318531a437 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.
1999-01-11 19:04:34 +00:00
Kurt Zeilenga
82b94e2258 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.
1999-01-11 18:36:40 +00:00
Kurt Zeilenga
334768c1bb 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.
1999-01-10 02:25:41 +00:00
Kurt Zeilenga
d0516836b5 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.
1999-01-10 02:16:48 +00:00
Kurt Zeilenga
e05e9dd955 Cleanup slapd search op deallocation. 1999-01-08 21:48:09 +00:00
Kurt Zeilenga
1d7704b28e Fix tmp file removal. 1999-01-08 19:51:15 +00:00
Kurt Zeilenga
de8c07c62c Updated SLAPD args/pid file codes to use DEFAULT_RUNDIR and DEFAULT_DIRSEP.
Removed old defines.
1999-01-07 18:16:40 +00:00
Kurt Zeilenga
dd351c3a17 Apply fix suggested by Ben Collins <bmc@visi.net>
pass STRING_UNKNOWN if !client_name
	pass STRING_UNKNOWN if !client_addr
1999-01-07 05:47:25 +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 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