Commit Graph

699 Commits

Author SHA1 Message Date
Gary Williams
4e0504f4b8 routine to get string for last WSA error on NT 1999-05-06 16:28:52 +00:00
Gary Williams
51d7259715 define Versionstr, I'm sure there's a better way, but I need to get this built 1999-05-06 15:00:05 +00:00
Gary Williams
dc0bcf2e94 add root_dse.c 1999-05-06 14:51:11 +00:00
Gary Williams
ed703cbc5e detect debug level and output to stdout 1999-05-06 14:47:55 +00:00
Gary Williams
628f679f0b move socket.h before errno.h so EWOULDBLOCK is defined on NT 1999-05-06 14:46:48 +00:00
Julio Sánchez Fernández
30ffc91788 Initial version 1999-05-06 04:53:52 +00:00
Kurt Zeilenga
a42cf36dd2 Fix typos. 1999-04-30 21:32:12 +00:00
Hallvard Furuseth
ca7dba5182 ITS#141: Add ldbm_ignore_nextid_file, since tools/ldif2* handles it privately 1999-04-30 05:24:16 +00:00
Kurt Zeilenga
d8aef04224 Modify meaning of SLAPD_CHILD_MODIFICATION_ENTRY_ACL to augment
"children" ACLs with "entry" ACLs (versus replacement of children
ACLs with "entry" ACLs).
1999-04-30 02:34:46 +00:00
Kurt Zeilenga
5882352a2e protect multi-statement macros... ie: do { s1; s2; } while(0) 1999-04-30 00:53:10 +00:00
Hallvard Furuseth
786bbe4fc1 enclose macro arguments in () 1999-04-30 00:35:27 +00:00
Hallvard Furuseth
de810942e1 ITS#141: move body of next_id_save() into new function next_id_get_save(),
so the (read id, write id) sequence is protected by li_nextid_mutex.
1999-04-29 22:26:58 +00:00
Hallvard Furuseth
d804c7b137 Add <ac/socket.h> 1999-04-29 22:07:13 +00:00
Hallvard Furuseth
e4c84b9d36 Fix typos SLAPD_NEXTID_CHUCK/SLAPD_NEXTID_CHUNCK -> SLAPD_NEXTID_CHUNK 1999-04-29 18:26:25 +00:00
Kurt Zeilenga
01b967244d Make 'schemacheck on' the default. 1999-04-29 18:10:40 +00:00
Kurt Zeilenga
9b8a5036dd Update back-passwd based on patches from howard.chu@platinum.com.
Modified by me to dn_*() and attr_*() functions and to use
uidObject and to handle search scopes better.  Could use some
more work.  A fun project for anyone wanting to learn how
backends work.
Modified dn_parent and dn_rdn to accept be=NULL (to bypass
be_issuffix check).  These functions should be generalized
and moved to -lldap.  A project for another day.
1999-04-29 06:50:00 +00:00
Kurt Zeilenga
af26f023e7 Ignore idl_delete_key errors. LDBM isn't transactional, state
indexes could be hosed.
1999-04-29 01:42:43 +00:00
Kurt Zeilenga
b06c4a5576 Winsock changes:
Centralize #define EWOULDBLOCK WSAEWOULDBLOCK to ac/errno.h
Move WSAStartup to slapd_daemon(), add WSACleanup() to match.
1999-04-28 21:21:14 +00:00
Kurt Zeilenga
d0fb82ab31 Make Versionstr const. 1999-04-28 20:39:40 +00:00
Kurt Zeilenga
8106400a04 slapd Version needs special treatment (Versionstr and non-static). 1999-04-28 20:34:19 +00:00
Kurt Zeilenga
5dbb2e760f Don't destroy uninitialized connections... 1999-04-28 20:33:25 +00:00
Gary Williams
41adaad0ad let ldif2id2entry complete before allowing other children to start 1999-04-28 17:25:30 +00:00
Kurt Zeilenga
dba57a312c Add mkversion script to generate version.c files. mkversion generates
identification strings compatible with ident(1) and what(1).
Uses $(VERSION) generated from configure.in.  rm build/version
rm old version .c files
1999-04-28 05:40:17 +00:00
Julio Sánchez Fernández
ab0e842ee2 Initial version 1999-04-27 06:34:10 +00:00
Kurt Zeilenga
c9a2802669 Don't have connection_state_closing() lock connection. Already locked
by callers.
1999-04-26 23:56:02 +00:00
Kurt Zeilenga
fa6fec3c9c Implement "quick" shutdown (similiar in behavior to shutdown
prior to connection management changes).  No "normal" (wait
for pending operations to complete) shutdown mode (yet).
Changes:
 Add connections_destroy() implementation to connections.c.
 Move connections_init() call to slap_daemon().
 Add connections_destroy() call to slap_daemon().
 Add connections_shutdown() implementation to connections.c.
	calls connection_closing()/connection_close() for each
	"in use" connection.
 Add connections_shutdown() call to slap_daemon_task().
1999-04-23 22:50:28 +00:00
Kurt Zeilenga
866f82409c Should clear the write flag upon closing. 1999-04-23 20:47:32 +00:00
Kurt Zeilenga
8082760c0c Update state to closing early. 1999-04-23 20:34:09 +00:00
Kurt Zeilenga
3e05f28963 Modify connection_closing() to abandon operations and wake blocked writer.
Modify send_result to return if connection state is closing.
Modify do_abandon() to remove abandon'ed operation if pending.
1999-04-23 20:22:18 +00:00
Kurt Zeilenga
7ba980f0f6 Modify slapd set user/group support to use -u/-g instead -U/-G.
Moved -u (udp) to -c (connectionless).  Connectionless is depreciated
and undocumented.
Added tests for set{,e}{u,g}id to configure.  Use existance of
setuid/setgid to enable feature.  Use seteuid/setegid only if
they exist.
Fixed minor minor leak of username/groupname if specificied
more than once.  (This should actually be an error)
1999-04-21 00:40:20 +00:00
Julio Sánchez Fernández
9abff49932 Make it honor attrs and attrsonly 1999-04-20 12:17:14 +00:00
Juan Gomez
a88bf50b31 Updates index for rdn attribute type avoiding the 'dissapearing entry'
problem reported in IT78. Index files will still be stale if the modrdn
uses deleteoldrdn.
1999-04-20 03:36:00 +00:00
Julio Sánchez Fernández
2b82bc2d63 The Root DSE does not depend on SLAPD_CONFIG_DN and friends.
Added a comment for supportedSASLMechanism to root_dse.c
1999-04-19 20:02:24 +00:00
Julio Sánchez Fernández
01385acc2a Beginning of ROOT DSE support 1999-04-19 18:21:53 +00:00
Gary Williams
532fb0961f honor the maxkids variable on NT 1999-04-19 17:13:14 +00:00
Kurt Spanier
f1e7ffb176 Delayed backend lock release to replog entry after successful add(). 1999-04-19 10:47:03 +00:00
Kurt Zeilenga
3041aafc2c Protect listener_tid from being killed after the listener has exited. 1999-04-17 05:21:30 +00:00
Kurt Zeilenga
c10bb54be0 Fix typo in write select. Fix errors in WINSOCK handling.
Add test listener no-thread_create experiment (behind ifdef).
1999-04-16 18:56:42 +00:00
Gary Williams
6bfc4ec022 adjust projet settings 1999-04-14 17:10:56 +00:00
Gary Williams
84f84c28b8 I moved slap_shutdown after the waitforkids. I also wait for each process to complete before returning from fork_child since I had two lockups on my NT box. 1999-04-14 16:56:23 +00:00
Gary Williams
a899d9e356 delete spurious project sha_test 1999-04-14 15:41:53 +00:00
Gary Williams
80aeab1723 get rid of unreferenced variable tmp 1999-04-14 15:41:19 +00:00
Gary Williams
e24a4ee074 get rid of unreferenced variable deleteoldrdn 1999-04-14 15:15:25 +00:00
Gary Williams
d2ab3f1d5d get rid of unreferenced variables metaph and newm 1999-04-14 15:13:59 +00:00
Gary Williams
8656d441ff put conditions on i, buf2 and c so we don't get unreferenced variable warnings 1999-04-14 15:13:10 +00:00
Gary Williams
af423fd393 fix Release configuration 1999-04-14 15:12:19 +00:00
Gary Williams
3a1aba86ab put conditions on hp so we don't get unreferenced variable warning 1999-04-14 15:11:57 +00:00
Gary Williams
f9ab18a57b lose unreferenced variable rc 1999-04-14 15:11:04 +00:00
Gary Williams
deea9c42a5 set up Release configuration 1999-04-14 15:00:17 +00:00
Gary Williams
0667d29905 update project settings 1999-04-14 14:20:02 +00:00
Gary Williams
e86ffc71f1 add result.c 1999-04-14 14:18:42 +00:00
Gary Williams
4ced2ec95d remove result.c 1999-04-14 14:18:26 +00:00
Gary Williams
579b8cc7c4 add mimic.c(this time with the actual change) 1999-04-14 14:14:20 +00:00
Gary Williams
e6f09030e4 add mimic.c 1999-04-14 14:13:06 +00:00
Gary Williams
c8f24043e5 if WIN32, add starttime 1999-04-14 14:12:49 +00:00
Gary Williams
1a7acaa945 fix arg loop, move starttime to mimic.c 1999-04-14 14:11:56 +00:00
Gary Williams
25474efe94 move starttime to mimic.c, change exit to return 1999-04-14 14:10:09 +00:00
Kurt Zeilenga
a3f9a59e4b Add XXX comment to cache modified from underneath kludge. 1999-04-13 22:41:14 +00:00
Gary Williams
12cd6ddfb1 add libslapd,ldif2 tools projects 1999-04-13 21:41:56 +00:00
Gary Williams
8059d1bee9 move most files to libslapd to make linking ldif tools easier 1999-04-13 21:41:25 +00:00
Gary Williams
a85ba4f2fc new project file 1999-04-13 21:40:44 +00:00
Gary Williams
0667782720 add section for NT to create processes 1999-04-13 21:34:00 +00:00
Gary Williams
23b4e99d03 new project file 1999-04-13 21:32:49 +00:00
Gary Williams
2401e3e921 new project file 1999-04-13 21:24:29 +00:00
Gary Williams
3bad16aa93 add starttime to make NT happy 1999-04-13 21:22:21 +00:00
Kurt Zeilenga
603be82c2f Fix linking errors (naming issues) 1999-04-13 20:04:32 +00:00
Kurt Zeilenga
08e617941c ldbm -> bdb2 1999-04-13 19:59:03 +00:00
Kurt Zeilenga
516db68b05 Fix entry.c typo in OBJS 1999-04-13 19:57:01 +00:00
Hallvard Furuseth
ec2072f1d5 neutralize previous add.c change until bdb2_back_entry_release_rw() is provided 1999-04-13 06:28:52 +00:00
Hallvard Furuseth
80e5c43346 Add dummy bdb2_back_entry_release_rw() to be completed later 1999-04-13 06:21:30 +00:00
Hallvard Furuseth
169d6d0200 Add entry.c to complete previous change 1999-04-13 06:15:03 +00:00
Hallvard Furuseth
62aa401bd7 Add struct backend_info->bi_entry_release_rw and related functions.
Move cache_return_entry_w() out of ldbm_back_add when the add is successful.
This change breaks back-bdb2, it needs equvalent changes of those in back-ldbm.
1999-04-13 06:08:28 +00:00
Kurt Zeilenga
ad35a9d4a6 Add trace message when found entry is busy. 1999-04-11 22:16:30 +00:00
Hallvard Furuseth
59e7798448 Fix typo ldap_pvt_thread_mutex_lock -> ldap_pvt_thread_mutex_unlock 1999-04-11 19:36:19 +00:00
Hallvard Furuseth
eaa023cfa9 Fix SPC -> TAB at the beginning of Makefile lines 1999-04-10 17:43:27 +00:00
Kurt Zeilenga
f16846eb15 Apply LDBM cache changes (c_mutex streamlining) to BDB2 and back. 1999-04-10 04:28:02 +00:00
Kurt Zeilenga
0317638cf6 Addition streamlining of code behind c_mutex. 1999-04-10 01:35:19 +00:00
Kurt Zeilenga
93fa38cd08 Apply fix to "group/group_objectclass/member_atribute" parsing
suggested by Gerrit Thomson
1999-04-10 01:34:55 +00:00
Kurt Zeilenga
f34bd50e30 Streamline code during finds to reduce contention on c_mutex.
Move Debug messages outside of c_mutex.  Other LDBM cache codes
also should be streamlined.  Resultant approaches should then
be applied to back-bdb2.
1999-04-09 18:33:52 +00:00
Kurt Zeilenga
a28f9e03be More errno handling changes for FreeBSD LinuxThreads. 1999-04-08 04:17:32 +00:00
Kurt Zeilenga
6743aebf3d Changes to support FreeBSD LinuxThreads port. Namely don't rely
on errno not getting changed by Debug().  Likely a problem elsewhere.
Tests run okay, excepting concurrency has "no such object" problems.
1999-04-08 03:57:25 +00:00
Kurt Spanier
2206a55064 Introduce free'ing of key into ldbm_nextkey() (no need for free'ing in
clients).
1999-04-07 13:17:39 +00:00
Kurt Spanier
85df05d3d6 Next try to fix the core dump problem on FreeBSD: eliminate ldbm_datum_free(),
because it's already done in ldbm_nextkey().
1999-04-07 13:15:51 +00:00
Hallvard Furuseth
30cdbc7657 Remove #ifdef SLAP_CLEANUP around closelog() 1999-04-07 01:23:25 +00:00
Kurt Zeilenga
73b846c011 Add ldap_pvt_thread_destory() to un-ldap_pvt_thread_initialize().
Move all SunOS routines (ie: _sleep() and its helpers) to thr_lwp.c
so that it's internals can be 'static'.  Add 'static' to thr_lwp.c.
Add comment to LWP:  NEEDS WORK, may not compile!  Need some
SunOS user to sort out the details.  Volunteers?
1999-04-06 21:57:16 +00:00
Hallvard Furuseth
d9d11a315f ifdef SLAP_CLEANUP: close db files, free memory, some other cleanup before exit 1999-04-06 01:55:11 +00:00
Kurt Zeilenga
cf4371d108 Backout last change... finish my first coke... try again later... 1999-04-05 18:30:56 +00:00
Kurt Zeilenga
66164a1b58 Share unlock and return between true and false paths. 1999-04-05 18:21:31 +00:00
Hallvard Furuseth
dae494e45d Delay free(e.e_ndn) in cache_find_entry_dn2id() to after "goto try_again" 1999-04-05 18:01:11 +00:00
Hallvard Furuseth
2b2c154ae6 Delay free(e.e_ndn) in bdb2i_cache_find_entry_dn2id() to after "goto try_again" 1999-04-05 18:00:57 +00:00
Kurt Zeilenga
371e1e5936 Remove extraneous do_close() prototype. Conflicts with perl internals. 1999-04-04 22:13:30 +00:00
Hallvard Furuseth
2915ed56db plug memory leak of li->li_nextid_file 1999-04-04 21:53:39 +00:00
Hallvard Furuseth
db859cee36 strdup/free li->li_directory when chaning, so unmalloced version won't be freed 1999-04-04 21:49:56 +00:00
Hallvard Furuseth
47f9f7e79d fix typo in comment in ldbm_back_close 1999-04-04 21:39:24 +00:00
Hallvard Furuseth
2b32e6afd7 Plug memory leaks 1999-04-04 21:34:33 +00:00
John Quillan
3f1fd3bcee Fix bug in compare.c where obj_ref to pb_obj_ref
Added call to perl "config" method so the the
perl module can have its own configuration
options.

Fix bug in init.c where the address of the be_private
object was being retrieved when it was already
a pointer.

Added the dn parameter to the modify.c call to the
modify method.  Not sure why this wasn't there
in the beginning.

Expects and array from the search method instead of
a scalar in search.c so that it can return search
results and a return code.

Added the demo file SampleLDAP.pm
1999-04-04 04:16:14 +00:00
Hallvard Furuseth
f172f7ee9c Remove superfluous \ at end of lines outside macros; DEC cc doesn't like them. 1999-04-03 09:20:41 +00:00
Hallvard Furuseth
730d267465 Add missing \n's in Debug statements 1999-04-03 03:28:17 +00:00
Hallvard Furuseth
9ebd9a0289 Add -U and -G options to set user and group id.
Move socket setup to set_socket(), called before the uid/gid change.
1999-04-03 03:19:07 +00:00
Kurt Zeilenga
e46877f89f cache: implement try_again loop if cache entry is not ready.
id2entry: when an error occurs attempting to insert fetched
entry into cache, check to see if entry was added by another
thread.  If so, return the entry added by the other thread.
The concurrency tests now run without the dreaded "no such object"
error messages!
1999-04-02 19:09:59 +00:00
Gary Williams
7d0ba58072 update project settings 1999-04-02 15:36:29 +00:00
Hallvard Furuseth
1e836c56bc Factor }' out of #if/...}/#else...}/#endif, so Emacs can match {' against `}' 1999-04-02 09:11:26 +00:00
Hallvard Furuseth
7fcc258d28 Fix the fix to the wait4child fix - forgot an #else 1999-04-02 08:30:02 +00:00
Hallvard Furuseth
7d8e7085e3 Trying again:
Fix wait4child change: Prefer wait3 over wait. Use SIGNAL instead of signal.
1999-04-02 04:12:18 +00:00
Hallvard Furuseth
815a62930c UNDO LAST COMMIT. 1999-04-02 03:45:33 +00:00
Hallvard Furuseth
45118be88e Fix wait4child change: Prefer wait3 over wait. Use SIGNAL instead of signal. 1999-04-02 03:23:20 +00:00
Hallvard Furuseth
d93ecb703a Update getopt() string and usage() 1999-04-01 22:31:24 +00:00
Hallvard Furuseth
d5938af750 Enclose `DB_ENV li_db_env' declaration in #ifdef HAVE_BERKELEY_DB2 1999-04-01 22:18:09 +00:00
Gary Williams
604f34817a add client tools 1999-04-01 21:46:01 +00:00
Kurt Zeilenga
dda1fb4ba0 Updates for NT4 (MSVC5++).
Removed external include/library paths from projects.  External paths should
be set via Tools | Options | Directories.  This allows each developer the
freedom to install external libraries where they desire.
Used libdb.lib instead of libdbs.lib to avoid thread conflicts.
Added hs_regex.lib to library input.  We require some form of regex, this
library works (and is relatively easy for the user to install).
Removed a little lint which MCVC5 detected.
Need to sort out single-threaded vs multithreaded library generation.
1999-04-01 20:26:09 +00:00
Gary Williams
1b79f745fe enable debug output for NT 1999-04-01 16:39:36 +00:00
Gary Williams
e5635b2662 NT port 1999-04-01 16:32:11 +00:00
Gary Williams
e6b47355f9 NT port 1999-04-01 14:50:34 +00:00
Kurt Spanier
1c7ebc514f Some minor clean-up; checking bdb2 for sync with ldbm. 1999-04-01 09:58:36 +00:00
Juan Gomez
3b4fdbfeb3 Added full v2 and v3 support for MODRDN/MODDN. 1999-03-31 02:53:27 +00:00
Juan Gomez
3eaae95aa1 Back with previous change, use ac/time.h include instead. 1999-03-31 01:28:42 +00:00
Juan Gomez
bbff96dd90 Do include of sys/time.h to define struct timeval used in back-bdb2/add.c
and back-bdb2/compare.c.
1999-03-31 01:15:51 +00:00
Kurt Zeilenga
058aad0312 Fix SLAPD_CONFIG_DN e_ndn bug. 1999-03-30 18:50:41 +00:00
Kurt Spanier
80400aba52 Fix ldbmcat crash problem: first use the key before deleting it! 1999-03-29 16:01:59 +00:00
Kurt Zeilenga
b9109a9f20 add wait macros. add LDAP_SIGCHLD. and other misc NT cleanups. 1999-03-29 09:04:35 +00:00
Kurt Zeilenga
db721ca821 Add ioctl_t for arg type (Unix requires 'int', Winsock requires 'u_long'). 1999-03-29 05:28:29 +00:00
Kurt Zeilenga
ff23537bcb Rework ac/socket.h for HAVE_WINSOCK:
tcp_close -> closesocket
  ioctl -> ioctlsocket
Modify codes to use tcp_close() instead of close() for sockets.
Modify ioctl codes to be compatible with WINSOCK.
1999-03-29 05:15:59 +00:00
Kurt Zeilenga
30665cb19a Misc header cleanup 1999-03-29 02:07:18 +00:00
Kurt Zeilenga
598b7473fe All implementations of lutil_lockf (aka ldap_lockf) block until
the lock is acquired.  Add comments to that effect.  Remove
unnecessary busy loops from slapd/lock.c and slurpd/lock.c.
1999-03-28 22:43:43 +00:00
Kurt Zeilenga
7adc0a65d0 Update lutil_lockf (aka: ldap_lockf) to hide implementation in
library, not header.  Eliminate need for <ac/unistd.h> to sometimes
include <fcntl.h> and/or <sys/file.h>.  Change lock API to expect
fd not FILE*.  Allows wider use and eliminates requirement that
lutil_lockf.h depencency on stdio.h.
Implemented lockf, fcntl, and flock locking in lutil/lockf.c.
Additional implementations (including no-op) may be needed.
Update slapd/lock.c and slurpd/lock.c to use new API.
1999-03-28 21:39:02 +00:00
Hallvard Furuseth
3f6dc76a59 Avoid integer truncation of v1->bv_len - v2->bv_len in value_cmp(,,SYNTAX_BIN,) 1999-03-28 01:40:54 +00:00
Hallvard Furuseth
4459780fb3 Add wait4child() 1999-03-27 16:21:44 +00:00
Will Ballantyne
918b9f8d86 argh, somehow bdb2 version overwritten by ldbm version. Fixed. 1999-03-26 16:34:47 +00:00
Will Ballantyne
4fbc5ed92c check for NULL newDN prior to final deref check 1999-03-26 05:36:26 +00:00
Kurt Zeilenga
668c8da980 Reenable counters. 1999-03-26 02:51:33 +00:00
Juan Gomez
90ebcb8bd9 Added support for newSuperior. 1999-03-24 21:45:15 +00:00
Juan Gomez
dccfdb97e9 Added a new function: build_new_dn(), which builds new dn for entries
being renamed through modrdn/moddn. This in preparation to add support
for MODDN v3.
1999-03-24 20:26:43 +00:00
Kurt Zeilenga
f3774d6ea3 Fix unlock bug in connection_read/write. Fix connection_read() to
ignore input when connection is closing.
1999-03-23 01:57:48 +00:00
Kurt Zeilenga
f1e15ddfa2 Improved "closing" handling. Remove fd from read set when state
changes to closing.  Need to add protection against read set races.
1999-03-23 00:38:57 +00:00
Kurt Zeilenga
6553a1fc77 Fix c_mutex typo. 1999-03-22 19:46:44 +00:00
Kurt Zeilenga
f8b9b03d53 Add trace to connection_get() to aid debugging. 1999-03-22 19:39:54 +00:00
Kurt Zeilenga
4b65e74fa8 slap_set_time() is no longer necessary. 1999-03-22 19:16:22 +00:00
Kurt Zeilenga
c9eacbdc64 Round 2 of connection management changes.
Mainly updated back-bdb2, back-passwd, back-shell to use slap_get_time().
1999-03-22 07:38:27 +00:00
Kurt Zeilenga
8f02beada9 PROTOTYPE: New connection management infrastructure designed to
remove race conditions on connection close.
BROKEN: various counters for dn=monitor.
Initial testing on FreeBSD (with and without pthreads) was successfull.
Have not yet tested preemptive threading environments.
Have not built against backends other than LDBM.
1999-03-22 07:14:54 +00:00
Kurt Zeilenga
f999e1350d Provide global assert solution. <ac/assert.h> (new) is now included
by portable.h with NDEBUG undefined.  This makes assert() is always
available and automatically disables itself when LDAP_DEBUG is undefined.
I've included a basic assert() for pre-STDC compilers.  It relies on
abort() which may not actually be available.  (well replace abort()
with whatever is appropriate if and when we're faced with a pre-STDC
compiler that doesn't have assert()).
1999-03-20 03:13:24 +00:00
Kurt Zeilenga
ab64c237f7 Use calloc properly... could result in too few bytes being allocated.
calloc(1, nelem*size) -> calloc(nelem, size)
1999-03-20 01:25:11 +00:00
Julio Sánchez Fernández
94b8e0830e slapd.conf and friends were being modified during the install step 1999-03-18 20:36:42 +00:00
Kurt Zeilenga
5a4babde00 Add DEFAULT_EDITOR to ldapconfig.h. Used by ldbmtest and ud. 1999-03-17 22:34:17 +00:00
Kurt Zeilenga
1676d61130 Use HAVE_PW_GECOS when needed. 1999-03-17 22:27:46 +00:00
Kurt Zeilenga
3550bc48c0 Add slapd -a address support. Allows you to bind to a specific
address.  Useful for running multiple servers in a virtual hosting
environment.
Modified test001-ldif2ldbm to verify this functionality.  Assumes
localhost is 127.0.0.1.
1999-03-17 03:56:25 +00:00
Kurt Zeilenga
4f60044d29 First cut at bind race fix. Passes our test suite at least. 1999-03-16 23:33:30 +00:00
Kurt Zeilenga
cc38cf6534 Cast pointer to strcasecmp to AVL_CMP. 1999-03-16 21:55:00 +00:00
Kurt Zeilenga
fa81f43f04 Initial check of connection states. Have only implemented
SLAP_C_ACTIVE vs SLAP_C_INACTIVE.  Need to implement BINDING and CLOSING.
Added fields tracking pending (on bind) ops.  Could also be used to
implement per-connection thread limits.
1999-03-16 02:59:59 +00:00
Ben Collins
0924180fa8 Used new ldap_(un)lockf() functions 1999-03-13 20:34:27 +00:00
Ben Collins
6023a2fe42 #ifdef for <sys/file.h> 1999-03-13 01:07:15 +00:00
Juan Gomez
f8a0a67e5f Fixed a bug related to the deallocation of memory for new_dn and new_ndn,
They must not be deallocated since they are used by the cache entry.
1999-03-10 22:17:54 +00:00
Hallvard Furuseth
b6d85256e7 "const"ify some static arrays, and related parameters/variables 1999-03-09 08:40:36 +00:00
Juan Gomez
c2a0632e63 Added support for deleteoldrdn. 1999-03-09 08:07:57 +00:00
Hallvard Furuseth
5ef648a109 Silence warnings: Remove unused variables. Enclose some initializers in in {}. 1999-03-09 07:15:35 +00:00
Hallvard Furuseth
ead12e1cda include lutil.h to get lutil_passwd() 1999-03-09 06:59:33 +00:00
Hallvard Furuseth
d3aa0e7129 Bugfix: Missing parens in `status = ldap_pvt_thread_create(...) != 0' 1999-03-09 06:27:36 +00:00
Juan Gomez
b9f9b8805a Fixed type by changing rdn_type to new_rdn_type. 1999-03-09 00:42:57 +00:00
Kurt Zeilenga
0b9c3953f2 Add dcobject & uidobject auxilary object classes. Useful for
using dc naming components with structural object classes that
don't allow a 'dc' attribute.
1999-03-08 22:19:48 +00:00
Juan Gomez
23b3217b66 Added software to add the new rdn as an attribute to the entry.
(First step towards full LDAPv2 support).
1999-03-07 09:31:54 +00:00
Juan Gomez
845bf15d89 Fixed typo in
conn->c_protocol == LDAP_VERSION3;
1999-03-07 09:18:25 +00:00
Hallvard Furuseth
3277a27b10 Remove unused variables 1999-03-06 16:29:05 +00:00
Hallvard Furuseth
984bdfa605 Remove unused variables 1999-03-06 06:33:34 +00:00
Kurt Zeilenga
588a458d78 MSVC5 cleanup...
lber: ifdef'ed out lber_..set_nonblock() function because it used ioctl's.
  If it remains, it needs to be written to support various methods for
  setting non-blocking.  ioctls should probably be last choice.  configure
  could detect existance of fcntl(), ioctl(), etc.
bdb2:
  added .dsp/.dsw files and did some basic cleanup (still needs work).
1999-03-06 00:57:25 +00:00
Juan Gomez
654f21b237 Implemented newSuperior handling. 1999-03-05 19:14:23 +00:00
Kurt Spanier
6da27229d9 1. Fix of ldbmcat segmentation fault bug (ITS#85 and #81).
2. Make ldbm_Env a failure-safe entity.
1999-03-05 11:24:42 +00:00
Kurt Spanier
3f76ee7a0b Make dbEnv a private toy of back-bdb2. 1999-03-05 10:25:55 +00:00
Juan Gomez
3ba99a75ef Added parameter newSuperior in preparation to support
LDAP v3 MODDN request.
1999-03-05 03:38:12 +00:00
Juan Gomez
07a5f765bb Added parsing of newSuperior field for requests that
carry it. This in preparation to support LDAP v3 MODDN
request.
1999-03-05 03:37:49 +00:00
Juan Gomez
9fc5e8a409 Rename
int add_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
int delete_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
int replace_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
to
int bdb2i_add_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
int bdb2i_delete_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
int bdb2i_replace_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
So that ldbm and db2 backends can coexist.
1999-03-05 01:33:32 +00:00
Juan Gomez
b41a79fe16 Renamed
int add_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
int delete_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
int replace_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
to
int bdb2i_add_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
int bdb2i_delete_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
int bdb2i_replace_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
So that ldbm and db2 backend can coexist
1999-03-05 01:28:38 +00:00
Hallvard Furuseth
47093d0617 Protoize cnvt_str2int() 1999-03-04 13:51:14 +00:00
Hallvard Furuseth
94c6048f2f Print entry ID with format %ld, not %d 1999-03-04 13:18:49 +00:00
Hallvard Furuseth
536aab01e4 Print tag with format %lu, not %d 1999-03-04 13:17:28 +00:00
Hallvard Furuseth
6f8c9a7890 Use HAVE_STDARG to choose between stdarg and varargs version of debug_printf. 1999-03-04 12:58:56 +00:00
Juan Gomez
34861cd15b Added prototypes for rdn_attr_type() and rdn_attr_value(), which are
utility functions added to support the modrdn v3 implementation.
These parse and rdn of the form "attribute_type = attribute_value"
returning "attribute_type" and "attribute_value" respectively.
1999-03-04 00:35:45 +00:00
Juan Gomez
943cfaf41a Added get_next_substring(), rdn_attr_type(), and rdn_attr_value() which
are needed in the implementation of modrdn v3.
1999-03-04 00:31:19 +00:00
Juan Gomez
68a413a601 Made add_values(), delete_values(), and replace_values() so they can be
used in implementing modrdn v3.
1999-03-03 22:55:28 +00:00
Juan Gomez
ddf04f5900 Made add_values(), delete_values(), and replace_values() so they can be
used in implementing modrdn v3.
1999-03-03 22:00:16 +00:00
Juan Gomez
98c2a61313 Made add_values(), delete_values(), replace_values() so they can be used
for implementing modrdn v3.
1999-03-03 21:58:51 +00:00
Hallvard Furuseth
3250aef49c function pointers are incompatible with `void *'; remove NULL or replace with 0 1999-03-03 18:49:59 +00:00
Hallvard Furuseth
69a93a0582 function pointers are incompatible with `void *'; remove NULL or replace with 0 1999-03-03 17:02:10 +00:00
Kurt Zeilenga
aa38035780 Add protect against new connection descriptor being to large for
our connection table.
1999-03-02 21:06:42 +00:00
Kurt Zeilenga
fdc44bf313 Apply ldbm bind() change to bdb2 code. 1999-03-02 20:42:29 +00:00
Bart Hartgers
8153a4039b The new&improved Sockbuf. This adds the infrastructure on which
support for TLS and SASL will be build.

Please inform me of any problems.
1999-03-02 20:23:14 +00:00
Bart Hartgers
e0fdd89432 Annoying little son of a `free' BUG fixed. 1999-03-02 20:14:11 +00:00
Kurt Zeilenga
4e160e83b6 Replace IFP() with appropriate full prototypes:
AVL_CMP, AVL_DUP, AVL_FREE, AVL_APPLY.
Apply casts as needed.
Change data pointer from caddr_t to void *.
1999-03-02 00:32:59 +00:00
Kurt Zeilenga
a8a05cbe48 Update NT port with support for -lldap_r and -lldbm.
Also add initial slapd .dsw/.dsp files.  Still needs work (mainly syslog).
1999-03-01 22:37:05 +00:00
Kurt Zeilenga
3984323bf9 Fix minor memory leak and remove redundant be_isroot_pw() checks.
Suggested by Pierangelo Masarati <pmasarati@bci.it> in post to -bugs.
1999-03-01 19:42:06 +00:00
Kurt Spanier
5d2699b7ce Introduction of first version of transaction processing (TP) into BDB2. 1999-03-01 11:30:18 +00:00
Ben Collins
945f8e10a0 Added verclean-local-srv since veryclean was not being run in the back-* and related directories 1999-02-28 17:07:47 +00:00
Ben Collins
b14d7b35ed Changed general debug levels too LDAP_DEBUG_SHELL 1999-02-28 05:55:48 +00:00
Hallvard Furuseth
1d8ae81a06 Fix previous change to strtok_quote 1999-02-23 15:48:47 +00:00
Hallvard Furuseth
6b40ed4882 Make strtok_quote treat the character following \ as a normal character. 1999-02-23 15:40:18 +00:00
Ben Collins
b0250a119f Changed LDA_DEBUG_ statements to more appropriate ones 1999-02-23 03:51:33 +00:00
Hallvard Furuseth
79f7c85067 Add locale support (slapd.conf keyword "locale") to slapd if HAVE_LOCALE_H 1999-02-22 21:01:24 +00:00
Hallvard Furuseth
73db912500 Cast char' arguments to ctype.h functions to unsigned char'.
These functions require their arguments to be in the range of `unsigned char'.
1999-02-22 17:57:22 +00:00
Kurt Spanier
9cb23b462e More timing for performance testing. Re-introduction of cache.c_mutex. 1999-02-22 11:22:44 +00:00
Kurt Zeilenga
aa17fdd0bd Use ldap_pvt_strtok directly and unconditionally.
Implementation no longer uses strtok_r(), it may be broken
or have an odd prototype.
Update configure not to check for strtok/strtok_r nor require
strtok_r to LDAP_API_FEATURE_X_OPENLDAP_REENTRANT.
1999-02-20 20:12:03 +00:00
Hallvard Furuseth
0fe0efeeac wrap bi_acl_group in #ifdef SLAPD_ACLGROUPS 1999-02-20 08:53:48 +00:00
Hallvard Furuseth
1fda8f9382 read_config() did not return a value 1999-02-20 08:18:07 +00:00
Ben Collins
809c6570e4 Converted strdup()'s to ch_strdup() 1999-02-19 07:55:20 +00:00
Kurt Spanier
3a9f96ec0d Code clean-up. 1999-02-18 15:33:15 +00:00
Ben Collins
8667671d17 * Removed uneeded cvs keywords
* Fixed unfree'd 'char *results' in all tcl_* functions (only unfree'd in
  certain cases, moved the free to the actual function) so no more mem
  leaks. Tested this with over 500,000 access's for testing :)
* Miscellaneous source style and tabulation fixes
1999-02-18 02:18:39 +00:00
Kurt Spanier
ac4cb22f1c Elimination of entry- and cache-level locking in back-bdb2.
Slight adaption of concurrency-test to enable even more writers/readers.
1999-02-17 11:13:22 +00:00
Ben Collins
a3c9bec0c5 Missing file 1999-02-17 02:23:18 +00:00
Ben Collins
6b09ba64d0 Style changes, added cvs keywords 1999-02-17 02:05:28 +00:00
Ben Collins
d2d5748580 Updated some items 1999-02-17 02:04:54 +00:00
Ben Collins
197e77ea8d Completed open/close/destroy implementations 1999-02-17 02:02:11 +00:00
Ben Collins
749404b83f Implemented the open, init functions correctly 1999-02-17 01:55:54 +00:00
Ben Collins
8c3f485d8b Implemented all of the (db_)destroy and (db_)close functions 1999-02-17 01:55:03 +00:00
Ben Collins
78a5ebe216 Moved tcl_back_db_open() and interpreter init to tcl_init.c 1999-02-17 01:53:59 +00:00
Ben Collins
1d1e8f75b6 Added return() 1999-02-17 00:32:49 +00:00
Ben Collins
86e1568752 fixed exit()'s to be return()'s 1999-02-17 00:30:36 +00:00
Ben Collins
8a2839b672 keyword update 1999-02-17 00:26:05 +00:00
Ben Collins
24697ea2fc $Id update 1999-02-17 00:24:40 +00:00
Kurt Zeilenga
c2b7c9e2db Add ac/errno.h and use other generic headers when available. 1999-02-16 18:07:19 +00:00
Kurt Spanier
39f0066db4 Addition of a new Concurrency Test fro testing slapd performance and
correctness of locking schemas in backends.
In back-bdb2 open NEXTID during startup and close at shutdown.
1999-02-15 10:49:20 +00:00
Kurt Zeilenga
a71f328831 Import Ben Collins <bcollins@debian.org> Back-TCL for SLAPD. 1999-02-14 19:20:14 +00:00
Kurt Spanier
548942edbe BugFix and selection in the test-suite of the bdb2 backend-specific
slapd server timing via a new slapd command line option '-t'.
1999-02-12 15:22:43 +00:00
Kurt Spanier
2cf83d84ee Server timing as a private feature of the bdb2 backend. 1999-02-12 14:36:16 +00:00
Kurt Spanier
6e63b58a3e Update of back-bdb2 to KDZ's new entry lock schema.
Fix of a back-bdb2 --> back-ldbm leakage (==> new bdb2-specific DB file suffix).
1999-02-12 12:13:03 +00:00
Kurt Zeilenga
75ee1d8393 Update tools to print ID's using "%ld" instead of "%lu". 1999-02-11 21:26:57 +00:00
Kurt Zeilenga
2a20131eaa Consistently use %ld for printing IDs. %lu was used in many cases.
I rather have NOID printed as "-1".  It it could argued that ID
should be signed.
1999-02-11 18:19:52 +00:00
Kurt Zeilenga
c2c0d9687f Complete entry_cmp() migration (remove rename macros). 1999-02-11 17:52:28 +00:00
Kurt Zeilenga
745a10f080 Update LDBM cache so that it manages it's own state.
cache_set_state() and state args are no history.
Move cache_entry_cmp() and friends to slapd/entry.c to allow sharing
of functions between backends..  Renamed to entry_cmp().
1999-02-11 17:46:56 +00:00
Kurt Zeilenga
88c43a1e6e Move LDBM-backend specific fields of Entry struct into a private struct.
The new e_private field can be used for any backend purpose.  In LDBM,
it's used to point th the private entry info struct.  The LDBM entry
info struct is only visible to the LDBM cache.
WARNING: This change has not be ported to other backends!  Breakage is likely.
1999-02-10 18:28:25 +00:00
Kurt Spanier
529caeddd0 Elimination of un-used code in bdb2i_cache_open and friends.
Provision for a bdb2 backend-specific DB file suffix.
Fix of the double-open of backend types.
1999-02-10 13:19:11 +00:00
Kurt Zeilenga
191752c9a7 Fix modrdn bug in back-bdb2 as well. Probably should move
dn rewriting to frontend dn.c function.
1999-02-09 18:07:01 +00:00
Kurt Zeilenga
fc022ed0d4 Patch modrdn to remove extra space. 1999-02-09 17:58:13 +00:00
Kurt Zeilenga
eb8dcb6e21 Add a field to count the number of databases per type (bi_nDB) to
the backend type info structure.  Use this filed to control open
and close such that backend's without databases are skipped.
1999-02-09 17:41:56 +00:00
Kurt Spanier
42f6e78dd4 Integration of the BDB2 backend into the new init/startup/shutdown schema.
Integration into ./configure ( --enable-bdb2 ).
Adaptation of the test-suite ( 'make' -> ldbm; 'make bdb2-local' -> bdb2 ).
Minor fixes in slapd/libldbm.
1999-02-08 11:42:14 +00:00
Kurt Zeilenga
36a06168c5 Fix backend_destroy to call bi_destroy instead of bi_close 1999-02-07 18:24:05 +00:00
Kurt Zeilenga
587535a310 Really fix those reader/writer lock asserts... 1999-02-07 17:57:50 +00:00
Kurt Zeilenga
7eaae29f6f Fix cache asserts on entry writer locks. 1999-02-07 02:50:10 +00:00
Kurt Zeilenga
e6e28362a1 Move SIGNAL() calls to main so that any thread can accept async
signals aimed at the process.
1999-02-06 16:00:00 +00:00
Kurt Zeilenga
7f804b5c1b Fix no backend type case in backend_init. 1999-02-06 15:56:14 +00:00
Kurt Zeilenga
dde7e3dfa6 Don't call idl_free() unless necessary. 1999-02-05 23:46:03 +00:00
Kurt Zeilenga
63f5ec8f8b remove ;; typo 1999-02-05 17:39:38 +00:00
Kurt Spanier
d92b9d3c9e Introduction of a new Berkeley DB version 2 (!) specific backend.
BEWARE: the backend will be compiled.
        the backend will NOT be invoked, yet.
        the backend CANNOT be invoked, yet, because it is NOT yet
            integrated into the new initialization/startup environment
            of the slapd server.
1999-02-05 16:23:03 +00:00
Kurt Spanier
8107ec91f0 Fix braindead signal handling in linux kernal threads.
First version with waiting on int to become 0; should be implemented
  via conditional variable...
Fix of typos.
First anchor for new bdb2 backend.
1999-02-05 13:20:57 +00:00
Kurt Zeilenga
216049bd12 New Frontend->Backend Interface
Separates per backend type from per backend database initialization
	and startup.  Also supports per type / per backend shutdown.
New frontend startup/shutdown routines are also provided:
	slap_init() slap_startup() slap_shutdown() slap_destroy()
New frontend->backend startup/shutdown is managed by:
	backend_init() backend_startup() backend_shutdown backend_destroy
backend_init() now calls bi_init() to initial all function pointers
for the backend (excepting bi_init() which is now the only hardcoded
entry point).  New entry points are detailed in slap.h struct
backend_info.  backend_info is a per database type structure.
Besides the new startup/shutdown entry points, the new interface
also supports per backend type configuration options.  One could have:

	backend bdb2	(new Berkeley DB 2 backend)
	bdb2_home	/directory

	database bdb2
	...

	*** This code is fairly experimental ***
	*** Much cleanup and testing is still needed ***

see slap.h for details on struct backend_db and backend_info.
1999-02-05 09:03:47 +00:00
Kurt Zeilenga
2b8970a324 Fix forkandexec() prototype. 1999-02-04 19:01:21 +00:00
Will Ballantyne
44c5c21078 additional checks around derefAlias_r call:
check for alias problem
check for alias != entry
check for null entry in subsequent switch statement
1999-02-04 18:55:58 +00:00
Kurt Zeilenga
72400d11fc Fix mutex initialization. new init function only has one argument. 1999-02-04 18:20:26 +00:00
Kurt Zeilenga
366701bdf7 Fix dbcache/entry lock deadlock. If dbcache lock is held, it's
okay to read and write LDBM specific fields (state, refcnt,
LRU.  The id field, though is read-only once set.
cache_find_entry_dn2id(), hence, does not require any entry locks.
cache_find_entry_id() must do a entry_rdwr_trylock() and back
off if busy.
Add new rdwr lock code with trylock() functionality.
Implement entry_rdwr_trylock().
1999-02-04 18:00:50 +00:00
Kurt Zeilenga
6b05425d0f Minor fixes to complete backout of initialization/startup changes. 1999-02-04 17:45:59 +00:00
Kurt Zeilenga
d27b2f811e Backout recent initialization/startup changes in prep for new
frontend->backend interface.
1999-02-04 17:33:46 +00:00
Kurt Zeilenga
fc44d42c53 Backout startup/initialization changes in preparation for new
frontend->backend interface.
1999-02-04 17:28:49 +00:00
Kurt Zeilenga
c6882d4670 Remove rwlock diag messages. 1999-02-04 17:24:26 +00:00
Kurt Zeilenga
efce9cffb4 Use LDAP_ALIAS_DEREF_PROBLEM for all problem dereferencing aliases.
LDAP_ALIAS_PROBLEM is now only used if the alias itself is mangled.
1999-02-04 17:23:34 +00:00