Commit Graph

996 Commits

Author SHA1 Message Date
Kurt Zeilenga
48d5465ab7 Add support for "foo:< http://localhost/path.
Requires FreeBSD's -lfetch...
Implementations to other URL APIs encouraged.
Probably should be moved to -llutil.
1999-07-31 03:23:26 +00:00
Kurt Zeilenga
b73b0c6158 Enhance LDIF handling
ldapsearch:
    use draft guidelines for determining when to use
    -t only writes binary attributes to files
    -tt writes all attributes to files
    output now lists URL instead of path to such files
    -T dir can be used to specify directory to create temp files in
    -V urlprefix can be used to change the URL prefix
    LDIF is now commented (can be disabled using -LL)
    LDIF now contains version attribute (can be disabled with -LLL)
LDIF:
    put interface changed to allow caller to specify how to encode
    put interface uses draft guidelines for determine when to base64 encode
    wrapping kludged to match old off by one bug
Tests:
    removed trailing space from some attributes (to avoid base64 encoding)
    enabled -LLL in defines.sh (should sed output to remove
        wrapping/comments/redundant separators)
Misc:
    updated codes outputting LDIF to use new put interface
TODO:
    handling of version attribute on input
    handling of URLs on input (ie: fetch URL)
1999-07-30 23:00:02 +00:00
Julio Sánchez Fernández
18393e882c When recreating a database from an ldif file created by ldbmcat,
NEXTID would not be set to one higher than the highest number
used, but to one higher than the last entry in the ldif file.
1999-07-30 18:53:23 +00:00
Julio Sánchez Fernández
3a1aab088d IDs in the LDIF input were not being used in id2children creation. 1999-07-30 18:37:00 +00:00
Kurt Zeilenga
17a975b6fb Very crude LDIF changes:
add MODRDN newSuperior support
	add '#' support to ldapmodify (but not slurpd and ldbm tools)
1999-07-29 21:25:39 +00:00
Kurt Zeilenga
79e28bda6f Fix modlist bug in last commit 1999-07-29 18:19:06 +00:00
Kurt Zeilenga
51d16c18a9 Save attributes until we've completed schema check and
modified indices.
1999-07-29 04:41:49 +00:00
Kurt Zeilenga
4bf65c0d0a Add suffixalias.c 1999-07-29 02:32:40 +00:00
Kurt Zeilenga
de8a1d518a Slightly better ITS#238 fix than last commit... has Debug
message, doesn't bother to open/close index files...
1999-07-28 23:19:16 +00:00
Kurt Zeilenga
0e4e5c7a13 Fix index_change_vals NULL vals bug (ITS#238) 1999-07-28 22:57:52 +00:00
Kurt Zeilenga
5456f4ed18 Default lastmod to ON. 1999-07-27 20:05:37 +00:00
Kurt Zeilenga
9c61bc561f Return LDAP_CONSTRAINT_VIOLATION if user attempts to modify
a non-user-mod attribute (such as timeStamps).
Move generation of add_modify_attrs to frontend.
update of add_modify_attrs on modrdn needs work (currently
not updated to maintain consistency with replicas).
1999-07-27 20:00:31 +00:00
Kurt Zeilenga
008bbf56db Fix -USLAPD_RLOOKUPS 1999-07-27 18:49:32 +00:00
Kurt Zeilenga
c12547cf3b Resurrect suffix aliasing... 1999-07-27 18:43:30 +00:00
Kurt Zeilenga
44e15153e7 Fix "dn" index. Only "sub" was being generated instead of "eq,sub". 1999-07-27 00:51:19 +00:00
Kurt Zeilenga
f374c39ab0 move wsa error to -llutil 1999-07-27 00:38:29 +00:00
Kurt Zeilenga
4d72e20bae Relocate to -llutil 1999-07-27 00:37:48 +00:00
Howard Chu
04c5711506 Moved unbind processing into connection_destroy. unbind handler is not needed. 1999-07-25 22:16:01 +00:00
Howard Chu
f491c89387 Fix unportable code. Thanks, Hallvard. 1999-07-25 22:13:52 +00:00
Kurt Zeilenga
b9764fff76 Back out paralyzing changes. 1999-07-24 21:40:58 +00:00
Howard Chu
5692be1fe4 Minor changes to support parallel make. 1999-07-24 09:21:34 +00:00
Kurt Zeilenga
a39cf6f93d Add support for LDAP_ALL_OPERATIONAL_ATTRIBUTES ("+") (based on
LDAPext discussions).
Add attrs and attrsonly support to monitor/config info.
Add rdn attributes to schema/monitor/config.
Add extensibleObject objectclass to schema/monitor/config.
Add top objectclass to rootdse/monitor/config.
Remove opattrs option from send_search_entry().
1999-07-24 03:39:23 +00:00
Kurt Zeilenga
06b667b8c6 Move subschemasubentry from "no-user-mod operational" to "operational"
as it's not stored the directory.
1999-07-24 02:22:14 +00:00
Kurt Zeilenga
6ba2272321 Adhere to "servers will not return operational attributes" in
all cases (including root dse).
1999-07-24 02:12:42 +00:00
Kurt Zeilenga
cabe6ebe16 Really fix subschemasubentry... 1999-07-24 01:27:32 +00:00
Kurt Zeilenga
7ee088518c Fix subschemasubentry operational attribute. 1999-07-24 00:45:25 +00:00
Julio Sánchez Fernández
44e371d45c Add missing semicolon. 1999-07-23 09:45:34 +00:00
Randy Kunkee
820ac76ceb Include sys/param.h on OSF4.0e to define MAXPATHLEN. 1999-07-23 00:59:27 +00:00
Kurt Zeilenga
d147e609d2 Implement TCP_NODELAY on both client and server side. 1999-07-22 21:49:35 +00:00
Kurt Zeilenga
f0c1fc37f5 Fix IP: typo in peername 1999-07-22 20:37:56 +00:00
Kurt Zeilenga
983f43785b Fix "*" op-attr search 1999-07-22 20:19:18 +00:00
Kurt Zeilenga
766b78765f Typo made all missed all aliasedobjectname values. 1999-07-22 19:17:16 +00:00
Kurt Zeilenga
c9778dd116 Implement better DN checking... make sure attribute type is
an OID or a proper type string (letter followed by 0 or more
alnum/-).
1999-07-22 19:06:56 +00:00
Kurt Zeilenga
68d561a97b Add limited LDAP_INVALID_DN_SYNTAX support. dn_normalize{,_case}() now returns
NULL does not meet basic syntax rules.
1999-07-22 17:14:42 +00:00
Kurt Zeilenga
3f91cffa15 Fix unknown critical extensions. 1999-07-22 05:06:41 +00:00
Kurt Zeilenga
42304b7ada Fix control parsing and controls free routine. 1999-07-22 04:47:58 +00:00
Kurt Zeilenga
0ed1a76d27 Release writer lock on new parent. 1999-07-22 03:42:02 +00:00
Kurt Zeilenga
5600097ae1 Update ACL field names and usage statement to match -devel post 1999-07-22 00:50:11 +00:00
Kurt Zeilenga
a11630f9b8 Fix maxDeref directive 1999-07-22 00:49:25 +00:00
Kurt Zeilenga
d5b1892ccc Fix acl parse bug 1999-07-21 21:08:05 +00:00
Kurt Zeilenga
933908f72f ACL CHANGES:
by <who> <access> changed to by <who>+ <access> (joined with AND)
  added peername=<regex> sockname=<regex> url=<regex>
  removed addr=<regex> (use peername instead).
replace dn_upcase with str2upper and str2lower.  Use where needed.
1999-07-21 20:54:23 +00:00
Gary Williams
b8b68f0668 set tls_port to zero if !defined(HAVE_TLS) to satisfy assert in slapd_daemon_init 1999-07-21 15:08:50 +00:00
Julio Sánchez Fernández
f0f29cd82e Backout the input exhaustion change, it loops. Still looking for
the right way.
1999-07-21 13:22:35 +00:00
Gary Williams
f4eb2feba5 use rd instead of i looking for listeners (line 848) 1999-07-20 21:55:06 +00:00
Julio Sánchez Fernández
288a28a762 Add support for TLSVerifyClient. 1999-07-20 18:05:50 +00:00
Julio Sánchez Fernández
504038ffac Move the input data exhaustion loop to connection.c from daemon.c 1999-07-20 18:03:29 +00:00
Julio Sánchez Fernández
76227acb1f Move the input data exhaustion loop to connection.c from daemon.c
Let transport (TLS or somesuch) force reading or writing on
sockets even if the higher layers think otherwise.
1999-07-20 18:02:44 +00:00
Julio Sánchez Fernández
535cc34421 If we did gethostbyname, we need no further address manipulation. 1999-07-20 11:26:44 +00:00
Kurt Zeilenga
cb94e155ae Don't call Debug inside a signal handler 1999-07-20 07:11:56 +00:00
Kurt Zeilenga
b2937bee5b s/struct entry/Entry/ 1999-07-19 21:08:59 +00:00
Kurt Zeilenga
598c472bf9 s/backend_db/slap_backend_db/ 1999-07-19 21:01:07 +00:00
Kurt Zeilenga
6847e329bc Fix new URL startup code. 1999-07-19 20:48:19 +00:00
Kurt Zeilenga
170836751a Namespace changes
added slap_ and ldbm_ to many structures
  added typedefs to many structures
  used typedefs
New main.c argument parsing with ldap url support (replacing -a address).
New sockaddr_in handling and support for multiple listeners.
1999-07-19 19:40:33 +00:00
Hallvard Furuseth
30b3958f94 Introduce got_<gid,uid> (the r1.4 change misbehaved with -user <root>).
Also free <user> in !HAVE_GETPWUID case.
1999-07-18 01:04:49 +00:00
Kurt Zeilenga
12f481d657 Import patches mistakenly applied to OPENLDAP_DEVEL_REFERRALS.
ldap_modify: delete of last attribute value should delete attribute (ITS#229)
thr_nt: use sleep to yield
1999-07-18 00:33:30 +00:00
Kurt Zeilenga
f92d01c2bb fix substring_comp_candidates logic if intersection of candidates
is ever empty.  See ITS#228.
1999-07-16 22:26:57 +00:00
Kurt Zeilenga
059ee8c86d (re)introduce o_connid such that STATS doesn't need c_mutex (which it
didn't bother to acquire)...
1999-07-16 22:24:32 +00:00
Hallvard Furuseth
425bab2c47 Add comment thatPass socklen_t* instead of int* to getsockopt, accept, getpeername, recvfrom 1999-07-16 18:57:11 +00:00
Julio Sánchez Fernández
0053b27ce0 Look on connection_read() if it returns positive so it has a chance
to exhaust all protocol units received from the transport layer.
I think this is the necessary fix for the TLS-data-ready/
socket-not-ready issue, but I have not experimented that problem
yet, so I am unsure about its effectiveness.
Now, do we need something like that for connection_write?  How would
we go about implementing it?
1999-07-16 18:53:30 +00:00
Julio Sánchez Fernández
ea8669c37d Clear c_needs_tls_acccept on ldap_pvt_tls_accept errors 1999-07-16 18:48:13 +00:00
Hallvard Furuseth
5ab862aee7 Pass socklen_t* instead of int* to getsockopt, accept, getpeername, recvfrom 1999-07-16 18:43:10 +00:00
Julio Sánchez Fernández
68b508d2f0 Move calls to ldap_pvt_tls_accept to connection_read instead of
connection_init so that we get into the select() logic.
Make use of new flags in the connection.
BTW, and before I forget, it sort of works.  I have connected with
a Netscape client using a secure connection and did a failed
search (my test database is empty), but the trace looked correct.
Make sure you have your CA certificate in your Netscape preinstalled.
Otherwise, the connection fails with error 0xFFFFFFFF that is rather
uninformative.
1999-07-16 15:52:17 +00:00
Julio Sánchez Fernández
a4a675f987 Two new flags in Connection. One to indicate that it is a raw TLS
section (that is, not SASL).  The second to indicate that we need to
do SSL_accept on this connection.
1999-07-16 15:43:47 +00:00
Julio Sánchez Fernández
8af470a543 Fix syntax oid for type 2.16.840.1.113730.3.1.34 (ref) 1999-07-16 10:51:31 +00:00
Julio Sánchez Fernández
ac49f25f75 Definitely, 'dn' and 'distinguishedName' are different things. The
former is a pseudo attribute type used internally by slapd to represent
the distinguished name of an entry and its existance should not be
visible.  The latter is an "abstract" attribute type that is not meant
to exist in practice except as supertype of other dn-valued types.
So, the definition of attribute type 2.5.4.49 has been changed to be
just distinguishedName.  Work on the OPENLDAP_DEVEL_SCHEMA branch will
treat pseudo attributes especially and will not be visible to the
clients.
1999-07-16 10:39:40 +00:00
Julio Sánchez Fernández
fd8b582aa9 We should stop using SSL to refer to TLS. This is a first step. 1999-07-16 10:28:51 +00:00
Kurt Zeilenga
73276e84ae Import experimental referral implementation from OPENLDAP_DEVEL_REFERRALS.
Includes support for update referral for each replicated backend.
	Reworked replication test to use update referral.
Includes major rewrite of response encoding codes (result.c).
Includes reworked alias support and eliminates old suffix alias codes
(can be emulated using named alias).
Includes (untested) support for the Manage DSA IT control.
Works in LDAPv2 world.  Still testing in LDAPv3 world.
Added default referral (test009) test.
1999-07-16 02:45:46 +00:00
Kurt Zeilenga
9568a013a8 Backend lock wasn't being released properly. 1999-07-16 00:16:54 +00:00
Julio Sánchez Fernández
edb1d671f8 Initialize the TLS environment *after* reading the config files. 1999-07-15 21:07:01 +00:00
Julio Sánchez Fernández
fd49eacc4b Parse more TLS options in slapd.conf 1999-07-15 21:05:08 +00:00
Julio Sánchez Fernández
d92c7c1c7d A couple of options for TLS configuration. Still a conflict here,
the default context is initialized before the config file is read,
so the locations are not know at context initialization.
1999-07-15 15:04:02 +00:00
Julio Sánchez Fernández
1df71e1814 Get rid of two compilation warnings. One is thought to be properly
taken care of.  The second, however, on remove_old_locks is unclear.
1999-07-14 19:51:35 +00:00
Julio Sánchez Fernández
e74ff638ba Parsing of flag -T was falling through to the default case.
Init the TLS environment if necessary.  Lots of things needed here,
in particular, preparing properly the default context.
1999-07-14 19:49:39 +00:00
Julio Sánchez Fernández
6d75d0f8fb connection_init now takes one more argument that indicates whether to
use TLS right away or not on that connection.
1999-07-14 19:44:18 +00:00
Julio Sánchez Fernández
c18d6e7ecf Only bind on TLS port if explicitly requested with -T, otherwise all
kind of conflicts happen when running tests.
1999-07-14 13:39:30 +00:00
Julio Sánchez Fernández
5b7babdee4 Bind and listen on TLS port too 1999-07-14 13:16:13 +00:00
Julio Sánchez Fernández
8542e45380 Extend slapd_args with TLS info 1999-07-14 13:14:54 +00:00
Julio Sánchez Fernández
0dac59ca26 Include $(TLS_LIBS) 1999-07-13 19:15:14 +00:00
Kurt Zeilenga
12b87ceebc Fix debug message. 1999-07-13 08:24:26 +00:00
Hallvard Furuseth
fb3b8e5ef1 Fix LDAP_CONNECTIONLESS code rot 1999-07-13 06:39:55 +00:00
Hallvard Furuseth
c4a13efbea Fix NULLxxx -> NULL 1999-07-13 06:37:19 +00:00
Hallvard Furuseth
4e80e9b9f2 Add opattrs=0 arg to send_search_entry() call 1999-07-13 05:05:59 +00:00
Hallvard Furuseth
b5455b8e47 Erase bad space from blank Makefile line 1999-07-13 04:13:21 +00:00
Hallvard Furuseth
55fa595f56 Add missing newline at EOF 1999-07-13 04:11:49 +00:00
Hallvard Furuseth
7e3ede2e01 Erase bad space from blank Makefile line 1999-07-13 04:01:25 +00:00
Kurt Zeilenga
5e14b911e6 Mirror <ac/time.h> inclusion made in re12 1999-07-09 21:10:19 +00:00
Kurt Zeilenga
469baeb3c0 Forgot the most important part of unsolicited notifications... exop! 1999-07-07 18:53:51 +00:00
Kurt Zeilenga
e9c2895472 Add support for unsolicited notifications. 1999-07-07 18:51:39 +00:00
Kurt Zeilenga
b8edef2b2c Copy LDBM bind "ACL_AUTH" and SASL framework to bdb2. 1999-07-07 18:47:51 +00:00
Kurt Zeilenga
7541ccbe10 Fix CRITICIAL typo. 1999-07-07 18:32:41 +00:00
Kurt Zeilenga
6c1758ae33 Add matching rule assertion structure to filter union. 1999-07-07 18:02:32 +00:00
Kurt Zeilenga
fb593fc5b9 Add controls.c to pick up get_ctrls(). 1999-07-05 23:08:43 +00:00
Kurt Zeilenga
32cefa43a0 Add controls.c: initial version of get_ctrls() 1999-07-05 23:04:35 +00:00
Kurt Zeilenga
00086db3f6 Add get_ctrls()... 1999-07-05 23:01:17 +00:00
Kurt Zeilenga
51d1c90887 unifdef -DSLAPD_ACLGROUPS -DSLAPD_ACLAUTH 1999-07-05 06:26:26 +00:00
Kurt Zeilenga
549c89f817 Regarding previous commit:
Fix broken ACL macros.
	Fix o_dn/o_ndn == NULL vs "".
1999-07-04 19:53:00 +00:00
Kurt Zeilenga
49f39bc4cf o_dn/o_ndn must not be NULL. Set to "" upon receiving bind request. 1999-07-04 19:37:25 +00:00
Kurt Zeilenga
106eef41d8 HEADS UP: connections are forced to "anonymous" status upon receiving
of a bind request and, upon failure, are left "anonymous."

Rework ACL code to hide access testing within macros to facilate additions
and eventual redesign.

Addition of #ifdef SLAPD_ACLAUTH to conditional include EXPERIMENTAL
"auth" access controls.  Adds ACL_AUTH "auth" access level (above none,
below "compare").  bind requires anonymous access at this level or above access
to "entry"/"userPassword"/"krbName".  This allows administrators to restrict
which entries can be bound to.  (This will likely become default behavior
after testing has completed).
1999-07-04 18:46:24 +00:00
Kurt Zeilenga
daf40a51c1 Abandon all operations upon receiving a BindRequest. 1999-07-02 21:42:53 +00:00
Kurt Zeilenga
b7bbc7504d More bind changes to support SASL/DIGEST.
Added configuration support for "digest-realm <realm>" configure directive.
Added connection state and bind_in_progress fields to cn=monitor connection
attribute.
1999-07-02 19:48:07 +00:00
Kurt Zeilenga
175ace59c8 Send LDAP_SASL_BIND_IN_PROGRESS if o_bind_in_progress is true. 1999-07-02 00:46:28 +00:00
Kurt Zeilenga
6f8fad20f2 Add conn/op bind_in_progress flags such that operations can detect
if multiple step SASL binds are in progress.
1999-07-02 00:04:47 +00:00
Kurt Zeilenga
97bc107537 Add macros to support testing of error categories to ldap.h
Modify ldap_result to assert returned error is not an one reserved
for API use.
Modify frontend LDAP operation routines to return an error code.
The returned value will be used to determine if an unsolicited notification
should be sent to the client.
Need to review returned error codes.  Namely some LDAP_PROTOCOL_ERROR
will like need to be changed (as they will cause unsolicited notifications).
1999-07-01 21:20:45 +00:00
Kurt Zeilenga
d7b311c6e1 s/LDAP_NOT_SUPPORTED/LDAP_UNWILLING_TO_PERFORM/ 1999-07-01 04:43:48 +00:00
Kurt Zeilenga
ddd0559284 Fairly complete slapd SASL bind parsing... and centralized cleanup code.
Update error strings and cldap misuse of server error.
1999-07-01 04:42:01 +00:00
Kurt Zeilenga
129ee42f37 NO-OP SASL parsing... DIGEST-MD5 coming soon. 1999-07-01 03:18:00 +00:00
Kurt Zeilenga
f9db1ea889 Rework BER decoding with lieu of LDAPv3 controls (coming soon).
Add place holder for handling LDAPv3 extended operations (coming soon).
1999-06-30 22:43:27 +00:00
Kurt Zeilenga
14820afdd9 Reimplement connection counters. Format of "connection" attribute
changed significantly.
1999-06-30 02:50:40 +00:00
Kurt Zeilenga
9225707a06 Modify lutil_passwd to accept a third argument char** methods to
specific which methods may be used.  This will facilate development
of a slapd config directive "passwordMethod ..." to specify which
methods should be allowed.
1999-06-29 22:24:53 +00:00
Kurt Zeilenga
fe00263875 expose oc_check_operational from schema.c
Use everywhere.
Apply search ACLs to operational attributes.
Only provide operational attributes when explicitly requested.
1999-06-29 04:52:55 +00:00
Kurt Zeilenga
a7dfc2aada Add sasl "mech" argument to backend bind routines. 1999-06-29 03:29:26 +00:00
Kurt Zeilenga
1ee85df297 Add framework for sasl and controls. 1999-06-29 03:17:22 +00:00
Kurt Zeilenga
c0af81253a remove obsolete file. 1999-06-29 03:01:02 +00:00
Kurt Zeilenga
dcc5bdfe7e Log out to stderr, add LDAP_VERSION3 support to bind.c and modrdn.c 1999-06-29 01:02:48 +00:00
Kurt Zeilenga
2660d0b42f Remove old U-Mich v3.0 and OLD_LDAP_* crud.
Leave only LDAPv2+ and LDAPv3.
1999-06-29 00:03:34 +00:00
Kurt Zeilenga
cf89dd83cd don't set unsigned variables to -1 and expect them to be negative.
verify uid/gid are positive, not non-negative.
1999-06-27 03:58:06 +00:00
Bastiaan Bakker
5a470f8959 Merged dynamic module support patch (see ITS #196). To enable, run ./configure w
ith --enable-modules. GLib v1.2 or higher is required.
1999-06-24 17:06:34 +00:00
Bastiaan Bakker
e2b5b21155 Added connection initialisation and destruction notification. Now backends can register functions in backend_info.bi_connection_init and backend_info.bi_connection_destroy that will be called when a connection is initialized or destroyed. 1999-06-23 12:31:35 +00:00
Kurt Zeilenga
0b924192e7 Move nt_debug to -llutil and generalize for all platforms. 1999-06-21 22:52:28 +00:00
Kurt Zeilenga
2fda53f375 Add missing arguments to Debug() calls... and adapt nt_debug for general
use.
1999-06-21 22:36:13 +00:00
Kurt Zeilenga
6bd26a6aed remove lint. 1999-06-21 22:35:02 +00:00
Kurt Zeilenga
52e69dfc14 All "o=foo" add to suffix "" if bound as root. 1999-06-19 05:11:18 +00:00
Kurt Zeilenga
c57e5952f9 Use ber_mem* and friends 1999-06-19 05:08:13 +00:00
Kurt Zeilenga
f9a560114a Allow adding of dn: o=foo if suffix is "" and rootdn. 1999-06-19 04:26:17 +00:00
Kurt Zeilenga
13ac82621b Limit the check to a 4 tries every timeout. 1999-06-19 03:23:49 +00:00
Kurt Zeilenga
2d720643be experimental connections_timeout_idle() implementation. 1999-06-19 03:20:01 +00:00
Kurt Zeilenga
669b8f4047 ber_int_t, ber_tag_t, ber_socket_t, ber_len_t
added lber_types.h.nt, lber_types.h.in
removal of NULLxxx internal macros (in favor of NULL).
ch_free added to slapd,slurpd/ch_malloc.c
#define free ch_free (should be removed after s/free/ch_free/g) in proto-slap.h
ch_malloc and friends use ber_memalloc and friends
1999-06-18 23:53:05 +00:00
Kurt Zeilenga
7e4b3bc2e7 initial commit of idletimeout code... everything but the actual timeout. 1999-06-18 22:54:19 +00:00
Gary Williams
07e5656797 allow service name to be passed in for install/remove 1999-06-18 21:35:18 +00:00
Gary Williams
f0ea6f2ee4 add define of service name (shared in main and nt_svc, that's why it's here) 1999-06-18 21:34:24 +00:00
Gary Williams
49d9c99d58 fix comment format, allow service name to be passed in (-v option) 1999-06-18 21:33:39 +00:00
Gary Williams
1971837778 fix comments (remove // style), free(ptr) in slapd_daemon_task was causing heap failure 1999-06-18 21:31:53 +00:00
Gary Williams
e2a1216bda change DIRSEP to LDAP_DIRSEP 1999-06-18 21:21:32 +00:00
Kurt Zeilenga
8e10bd5f81 Fix up NT slapd.dsp and nt_svc.c so that slapd builds under MSVC5. 1999-06-17 19:03:41 +00:00
Kurt Zeilenga
b0aea66d1d Recommit NT service changes (untested) with changes to resolve
compiling errors on other platforms.  Will need to update NT projects.
1999-06-17 18:46:02 +00:00
Julio Sánchez Fernández
5d8b65deb1 Have the normalize routines process white space in the required way.
Code untested, but it is not used yet.
1999-06-17 16:10:38 +00:00
Julio Sánchez Fernández
10eb260e9c Some sample routines for implementing matching rules.
Some matching rule definitions modified to use said routines.
Default appropriately all other matching rules.
1999-06-17 15:07:35 +00:00
Julio Sánchez Fernández
45679394e0 If we are inheriting the syntax from a superior, we'd rather inherit
the length too.
1999-06-17 15:05:02 +00:00
Julio Sánchez Fernández
9ec2849a6d Fix handling of SYNTAX_CES by making use of some matching rules in
X.520 that were not inherited by RFC2252.
Fill in properly the matching rule oids when converting an attribute
type definition in the old format.
1999-06-17 13:11:30 +00:00
Julio Sánchez Fernández
66279c696c Defined 3 new matching rules taken from X.520 that were necessary to
do properly SYNTAX_CES.  Documented all other matching rules from
X.520 that we do not use.
1999-06-17 13:08:40 +00:00
Kurt Zeilenga
bbc568b21f ldapconfig.h vs ldap_config.h changes
backout previous nt changes (actually, just don't include nt_svc.c)
1999-06-17 04:43:24 +00:00
Kurt Zeilenga
21e081dc5b Separate autoconf generated values from "defaults".
ldap_defaults.h incorporates non-generated ldapconfig.h values.
	ldap_config.h.in is new template for autoconf generated defaults
		(namely directories and paths)
	ldap_config.h.nt, NT template (must be manually copied)
	s/<ldapconfig.h>/<ldap_defaults.h>/
	s/DIRSEP/LDAP_DIRSEP/ & s/DEFAULT_/LDAP_/
1999-06-17 03:54:25 +00:00
Kurt Zeilenga
23c4b81819 Backout NT Service changes.... breaks Unix builds... 1999-06-17 00:51:12 +00:00
Kurt Zeilenga
36cb034611 Add test for resched state change in connection_get 1999-06-17 00:48:51 +00:00
Gary Williams
bfa86bcf57 new module to support slapd as NT service 1999-06-16 19:16:34 +00:00
Gary Williams
4d13d4071a add code to support slapd as NT service 1999-06-16 19:15:35 +00:00
Gary Williams
2ffc4b19ea check addr for NULL before copying 1999-06-16 19:15:03 +00:00
Gary Williams
17c9a5798a NT service code for slapd 1999-06-16 19:14:29 +00:00
Julio Sánchez Fernández
f5d28c6df5 Fixed bogus handling of objectclass in oc_schema_check. 1999-06-16 12:11:47 +00:00
Juan Gomez
4a683c204d Replaced add/delete_value() by change_value() and index_add/delete_value()
by index_change_values(). The functions were exactly the same but for
one call.
1999-06-15 23:56:28 +00:00
Kurt Zeilenga
8f8cf6d3b1 Fix a couple of nits. ldbmtest still needs to be ported to NT. 1999-06-15 21:17:26 +00:00
Kurt Zeilenga
6fc999e214 Remove meantion of ldapd from main README, add README in servers/ldapd
stating ldapd is not supported nor actively maintained, and the code
may suffer from bitrot.  Update configure warnings.
1999-06-15 21:09:46 +00:00
Juan Gomez
5b0e434d93 Enabled deletion of stale index entries. (EXPERIMENTAL) 1999-06-15 20:06:16 +00:00
Juan Gomez
e1819eaff9 Added function delete_value() to remove entries from the index files
when necessary.
1999-06-15 19:50:20 +00:00
Julio Sánchez Fernández
74ff331014 Initial RFC2252-compliant version. 1999-06-15 12:40:46 +00:00
Julio Sánchez Fernández
c5060e655f We don't have a definition for caseIgnoreListSubstringsMatch, disable
references to it for now.
Fix some broken definitions.
We don't have a definition for caseIgnoreIA5SubstringsMatch either,
delete for now.
Define buildingName, it was being referenced.
1999-06-15 12:39:35 +00:00
Julio Sánchez Fernández
7ef4ec98b7 We don't have a definition for caseIgnoreListSubstringsMatch, disable
references to it for now.
1999-06-15 12:37:06 +00:00
Julio Sánchez Fernández
759bfa0c51 Activate checking of matching rules and syntaxes.
Make matching rules link to their syntaxes.
Many more matching rules and syntaxes.
Protect schema_init from multiple invocations.
1999-06-15 12:35:29 +00:00
Julio Sánchez Fernández
4cfb0be242 Activate support of matching rules and syntaxes, inherit them from superiors. 1999-06-15 12:32:21 +00:00
Julio Sánchez Fernández
fc44e7ddef New error code, fixed definition of smr_syntax. 1999-06-15 12:30:51 +00:00
Julio Sánchez Fernández
5adb15f681 More error codes. 1999-06-15 12:28:54 +00:00
Julio Sánchez Fernández
803d6d1204 Moved call of schema_init from main to read_config. 1999-06-15 12:26:07 +00:00
Kurt Zeilenga
61eaffeed2 connection_get forgot to unlock c_mutex in not used case! 1999-06-14 20:33:21 +00:00
Kurt Zeilenga
e2e1cb76cb Remove check for inactive streams before connection_read/_write
calls.  Such checks are ineffective it protecting connection_read/_write
from being called inactive streams.  connection_read/_write have their
own protection against such (in connection_get()).
1999-06-14 20:28:30 +00:00
Julio Sánchez Fernández
87b86a52e4 Matching rules and syntaxes, initial step.
schema_init, seeding of standard syntaxes and matching rules.
1999-06-14 19:10:07 +00:00
Juan Gomez
499b8fdc04 Added index_delete_values() in preparation for changes that will keep
index files clean.
1999-06-14 18:16:05 +00:00
Juan Gomez
24ec5ded59 official -> canonical 1999-06-14 16:37:46 +00:00
Juan Gomez
bf49544833 s/official/canonical/ & s/at_on/at_cn/ 1999-06-14 16:36:00 +00:00
Julio Sánchez Fernández
a3f63029f4 Some changes to be more inline with the constification done on the library. 1999-06-14 14:34:07 +00:00
Julio Sánchez Fernández
53ae3dc5c0 Initial definitions for syntaxes and matching rules. 1999-06-14 14:32:40 +00:00
Kurt Zeilenga
cb68aab469 s/ldap_open/ldap_init/ calls... ldap_open is deprecated. 1999-06-13 21:49:35 +00:00
Kurt Zeilenga
6950e8e403 Change referral comment to point to root.openldap.org instead of umich.edu.
Both do not return anything useful.
1999-06-12 21:02:11 +00:00
Kurt Zeilenga
18e5e729ac Resched changes struct state without lock to avoid deadlock.
Hence connection_get must recheck struct state after obtaining
c_mutex to detect close.
1999-06-12 00:29:41 +00:00
Kurt Zeilenga
35e91be482 connection_get:
Connection could be closed before acquiring connections_mutex.
	if c->c_struct_state == SLAP_C_UNUSED, return NULL.
1999-06-12 00:03:39 +00:00
Kurt Zeilenga
0dda34c9e4 Add additional assert in connection get for race debugging. 1999-06-11 23:19:31 +00:00
Juan Gomez
f3b3c68792 Added at_official_name() to enable uniform naming of index files. 1999-06-11 20:49:41 +00:00
Juan Gomez
7d8330fd40 Added code for uniform naming of index files. 1999-06-11 20:42:48 +00:00
Juan Gomez
c8fac1864c Added at_ooficial_type() for uniform naming of index files. 1999-06-11 20:41:07 +00:00
Kurt Zeilenga
3cfd58eed8 EXPERIMENTAL: move slapd_remove to connections_read/_write as they
acquire c_mutex.
1999-06-11 19:10:45 +00:00
Kurt Zeilenga
35eff96dad Add Debug to help sort out race condition. 1999-06-10 22:21:51 +00:00
Kurt Zeilenga
368628e9d5 Close inactive streams instead of asserting condition. 1999-06-10 22:06:05 +00:00
Kurt Zeilenga
571e8c098d Add cheap EBADF loop protection. 1999-06-10 21:11:21 +00:00
Kurt Zeilenga
9c793f15f4 Fix typo in last commit. 1999-06-10 15:55:00 +00:00
Kurt Zeilenga
446ef413f6 Don't shutdown when select() returns EBADF. 1999-06-10 03:11:22 +00:00
Kurt Zeilenga
64bb1a99f4 Fix unprotected (and bad) FD_SET asserts. 1999-06-10 02:52:51 +00:00
Kurt Zeilenga
5555cc26b9 disable referral directive. 1999-06-09 23:43:22 +00:00
Julio Sánchez Fernández
63498d1a21 Removed unnecessary definition that is already in core.schema. 1999-06-09 11:08:10 +00:00
Julio Sánchez Fernández
7c4fb74a19 Fixed some syntax errors. 1999-06-08 17:41:09 +00:00
Kurt Zeilenga
ccad4c8225 s/LDAP_OPT_MATCH_STRING/LDAP_OPT_MATCHED_DN/ 1999-06-05 20:27:43 +00:00
Kurt Zeilenga
9a0caa6258 Initialize connection pointer to NULL else won't be able to
detect connection table full properly.
1999-06-04 22:57:19 +00:00
Kurt Zeilenga
95889bc7d8 Fix typo in previous commit. 1999-06-04 22:15:35 +00:00
Kurt Zeilenga
d3181b56b8 Add diagnostics. 1999-06-04 21:43:06 +00:00
Kurt Zeilenga
22e981eef3 Close hit socket. 1999-06-04 21:42:25 +00:00
Kurt Zeilenga
5b218b7671 Move WAKE_LISTENER call behind &connection_mutex to eliminate
race condition on file descriptor sets.
1999-06-04 01:05:29 +00:00
Kurt Zeilenga
ef3b182380 Add cn=monitor, cn=config, cn=schema to namingContexts. 1999-06-03 19:58:05 +00:00
Kurt Zeilenga
9fef42d3f8 Enable browsing info in MSVC debugging configurations.
Toy with dllimport/dllexport stuff (think I'll leave the real dll work to
somebody else).
Added ldap_strdup() wrapper of ber_strdup().
1999-06-03 18:24:22 +00:00
Kurt Zeilenga
acd57577f4 s/DEFAULT_DIRSEP/DIRSEP/ 1999-06-03 01:03:52 +00:00
Kurt Zeilenga
21c70857f1 s/<stdlib.h>/<ac/stdlib.h>/ 1999-06-03 00:37:44 +00:00
Kurt Zeilenga
f472d3abcf No anonymous unions. 1999-06-02 22:40:58 +00:00
Kurt Zeilenga
bed6465529 Make first argument of *_get_option const (experimental).
Make _MOD_SOFTADD 0x1000 to minimize chance of conflict with legit changes
to API spec.
Fix memory leak in ldap_mods_free() and minor memory allocator issues.
1999-06-02 21:38:48 +00:00
Kurt Zeilenga
c10742a7b5 Add prototype for at_add(). 1999-06-02 21:29:45 +00:00
Kurt Zeilenga
e44c8504f3 value_normalize can change the length of value. Fixed
use in index_add_value(), but should modify value_normalize
to use a struct berval * instead of a char* pointer...
1999-06-02 20:29:35 +00:00
Kurt Zeilenga
12176a0af9 Update Release/SRelease include paths 1999-06-02 04:08:50 +00:00
Kurt Zeilenga
14b04f4d0b Fix -ULDAP_DEBUG lint. 1999-06-02 03:09:40 +00:00
Kurt Zeilenga
fea91d7ad2 Used pre-normalized len of e_dn instead of just using e_ndn (and it's len). 1999-06-02 00:09:18 +00:00
Kurt Zeilenga
6d6e0dde91 Shouldn't need <sys/stat.h>. 1999-06-01 18:57:34 +00:00
Julio Sánchez Fernández
ae4c85b84f Fudge oc_kind on synthesized objectclasses so that they are STRUCTURAL
instead of ABSTRACT.
1999-05-31 15:17:42 +00:00
Kurt Zeilenga
4c14412929 Remove lint. 1999-05-31 05:39:51 +00:00
Julio Sánchez Fernández
21577a0966 Some definition reordering to satisfy dependencies. 1999-05-30 00:08:59 +00:00
Julio Sánchez Fernández
ae481022f9 Oops, fp_parse_line tokenizes in place, so we need to take a copy of
input before letting fp_parse_line ruin it.
1999-05-30 00:07:40 +00:00
Julio Sánchez Fernández
663d7e8627 Lose previously commented out old code.
Robustness fixes.
Fixed error reporting of non-existing attribute superior.
1999-05-30 00:05:24 +00:00
Kurt Zeilenga
fbc0bd013e Minor adjustments to better handle NT vs UNIX. 1999-05-29 18:57:23 +00:00
Kurt Zeilenga
4e5ed2dffc Changed lc_conn to be a pointer to a BerElement to aid in state management.
Added validation to exposed opaque data structures (BerElement, Sockbuf,
and LDAP).  Added macros BER_VALID, SOCKBUF_VALID, LDAP_VALID.
Added ber_pvt_ber_bytes() and ber_pvt_ber_remaining() macros to hide
some ber internals.  These really should be handled by ber_get_option().
1999-05-28 19:33:05 +00:00
Julio Sánchez Fernández
a97e3e94e6 Provide (and use) #define shortcuts
Really kill global_oc & global_at
Publish schema through LDAP (really, it's there at last :-)
1999-05-28 18:56:47 +00:00
Julio Sánchez Fernández
7f357399cf First step in new schema support. 1999-05-28 14:27:07 +00:00
Kurt Zeilenga
a0d2b3c5a0 Apply string literal strdup fix to BDB2. 1999-05-27 23:06:53 +00:00
Kurt Zeilenga
0ce6ddb80c Make a copy of "dn" to avoid modification of string literal. 1999-05-27 23:04:28 +00:00
Kurt Zeilenga
2d1cf97a56 move connection_close call from connection_input to connection_resched
to avoid accessing c_conn_state after close.
1999-05-27 06:22:59 +00:00
Kurt Zeilenga
5936f97edc Make connection_first/next/done reentrant. 1999-05-27 05:52:38 +00:00
Kurt Zeilenga
f9219d3368 remove redundant memset 0 of connection entry after calloc. 1999-05-27 02:44:13 +00:00
Kurt Zeilenga
1ee8cc51a8 Add comment concerning connections mutex. Need to analysis
locking requires and possibly restructure locking.
1999-05-27 02:29:18 +00:00
Kurt Zeilenga
77cc20be52 Lock (connections_mutex) should be acquired by caller. 1999-05-27 02:16:39 +00:00
Kurt Zeilenga
b458560a9e Add assert( s != NULL ) 1999-05-27 01:36:38 +00:00
Kurt Zeilenga
ce71f6f0dc Update main comment. 1999-05-26 22:25:45 +00:00
Julio Sánchez Fernández
6a66967eef Fix compilation errors, mod declared as LDAPMod, but used inconsistently
as LDAPMod (but incorrectly).  Please review this change, I am not sure
I understood what was intended.
1999-05-26 19:33:23 +00:00
Juan Gomez
cafd83f168 Relocated nis schema. 1999-05-26 18:37:30 +00:00
Juan Gomez
4bb24d506a Mirror modrdn special case fix to db2. 1999-05-26 12:29:54 +00:00
Juan Gomez
d45daae091 Fix name typo 1999-05-26 12:27:06 +00:00
Juan Gomez
335f9f8f32 Make bdb2i_modify_internal() public. 1999-05-26 12:22:10 +00:00
Juan Gomez
14a02c40c0 Make bdb2i_back_modify_internal() public so it can be reused from
modrdn.
1999-05-26 12:19:31 +00:00
Juan Gomez
128f31dc3c Added fix to allow modrdn whose new rdn was already an attr value. 1999-05-26 11:59:54 +00:00
Juan Gomez
c5c91399ab Again mirroring LDAMP_MOD_SOFTADD changes.... 1999-05-26 11:54:39 +00:00
Juan Gomez
0512d17f07 Mirroring changes related to indexing to db2 backend...
someone better comes up with a solution for this replication soon!
1999-05-26 11:51:49 +00:00
Juan Gomez
03740bd1f4 Added support for LDAP_MOD_SOFTADD. 1999-05-26 11:45:17 +00:00
Juan Gomez
5a16e3b9e9 Fixed index file naming bug and added support for LDAP_MOD_SOFTADD. 1999-05-26 11:41:14 +00:00
Juan Gomez
25f64385ca Add LDAP_MOD_SOFTADD const. 1999-05-26 11:30:18 +00:00
Juan Gomez
5b272f193f Added include <ac/time.h> needed for struct timeval... 1999-05-26 10:45:51 +00:00
Howard Chu
587837717b Obsolete file. Oops. 1999-05-26 02:52:37 +00:00
Howard Chu
967d1dcb2d For ITS#157: Added LDAP backend for slapd, which also required adding
LDAP_OPT_MATCH_STRING to ldap.h and libldap/options.c.
1999-05-26 02:35:20 +00:00
Howard Chu
31a0c4a917 For ITS#158: keep mixed-case backend suffix in addition to upcased suffix. 1999-05-25 21:40:40 +00:00
Kurt Zeilenga
1a7d72e629 setsockopt( SO_KEEPALIVE ) on the listen() socket. Will be
inherited on accept().
1999-05-24 22:20:34 +00:00
Kurt Zeilenga
42c5a40b78 Implement keep alives. Probably should be a configuration option. 1999-05-24 21:57:26 +00:00
Kurt Zeilenga
84b0693eee Remove empty else and other minor cleanup. 1999-05-23 00:26:47 +00:00
Kurt Zeilenga
22d98c85c3 ldap.h:
added comments
 removed LDAP_MAX_ATTR_LEN
 removed LDAP_COMPAT* from <ldap.h> but not code.
 move LDAP_DEFAULT_REFHOPCOUNT to ldap-int.h
 added experimental options macros
 added LDAP_CONTROL_REFERRALS macros
libldap:
 Replace ld_attrbuffer with per use allocated attributed.
 ldap_first/next_attribute attributes now must be freed (as per draft).
 unifdef -DLDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
1999-05-22 06:11:48 +00:00
Kurt Zeilenga
6b45dde2e6 Removed too much LINT. 1999-05-22 00:31:36 +00:00
Kurt Zeilenga
e05688d25e Remove LINT. 1999-05-21 23:15:47 +00:00
Kurt Zeilenga
450b02ca58 s/WIN32/HAVE_WINSOCK/
remove old Version.c
1999-05-21 03:53:37 +00:00
Kurt Zeilenga
60a068ae89 don't free connections[i] 1999-05-21 03:52:08 +00:00
Kurt Zeilenga
6762f1d48a Should not have freed ber_buf when freeing temp copy 1999-05-20 22:01:38 +00:00
Juan Gomez
1426f2b1bd Do code reuse through ldbm_modify_internal(). 1999-05-19 18:27:25 +00:00