Commit Graph

170 Commits

Author SHA1 Message Date
Kurt Zeilenga
ee6d1a4d40 Check for NULs in DNs. 2002-02-13 16:41:41 +00:00
Pierangelo Masarati
a117c5eee7 use ldap_bv2[r]dn and turn ldap_str2[r]dn into wrappers 2002-02-13 11:46:33 +00:00
Pierangelo Masarati
959edd88c0 prepare for ldap_bv2dn() 2002-02-13 10:05:22 +00:00
Kurt Zeilenga
2a2d6cc93e Add embedded NUL checks, fix last commit 2002-02-13 09:26:25 +00:00
Kurt Zeilenga
7c962f3dd4 dnValidate needs to check for embedded NULs. 2002-02-13 09:20:07 +00:00
Kurt Zeilenga
275f3be363 Misc. DN fixes and cleanups, namely don't muck with AVA_BINARY values
Also, pass empty_bv when bv_val is NULL.
2002-02-13 06:35:27 +00:00
Kurt Zeilenga
b2d948f0e5 Quick (and expensive) fix to detect DNs with embedded NULs 2002-02-13 04:20:11 +00:00
Howard Chu
d937237987 Eliminated dn_normalize. No more migration. 2002-01-26 14:51:45 +00:00
Howard Chu
6bac96b0bd Changed dnParent to void instead of int. (It always returned success...) 2002-01-26 08:44:59 +00:00
Kurt Zeilenga
309870fa9c Remove deprecated routines and a little lint. 2002-01-26 07:32:13 +00:00
Howard Chu
b907603b2d Fix previous commit 2002-01-26 06:52:11 +00:00
Howard Chu
07d0f4e411 Changed be_issuffix and dnParent to take struct bervals.
Changed dn_rdnlen, assumes an already pretty/normalized DN.
Added slap_empty_bv, a zero-length non-NULL berval.
2002-01-26 05:27:28 +00:00
Pierangelo Masarati
f74e81aa99 check on escaped rdn separator not needed any more 2002-01-22 08:30:32 +00:00
Pierangelo Masarati
3894bd332b fix dnParent to return '' if the dn is a rdn 2002-01-17 22:36:53 +00:00
Pierangelo Masarati
d70f117b69 first round at eliminating dn_parent ... 2002-01-17 19:05:21 +00:00
Pierangelo Masarati
1092fcfed8 remark for future (questionable) optimization 2002-01-16 18:51:20 +00:00
Pierangelo Masarati
3d9377f764 compare attribute type, not value 2002-01-16 12:06:42 +00:00
Kurt Zeilenga
3bfab4699e Remove last uses of dn_validate() 2002-01-16 03:01:19 +00:00
Kurt Zeilenga
d2f5d75885 Remove unused deprecated DN routines.
Only dn_validate, dn_normalize, and dn_parent remain (for now).
2002-01-16 00:16:51 +00:00
Kurt Zeilenga
13af7fb073 Misc. cleanup, remove lint, remove unused deprecated functions, etc. 2002-01-15 07:29:15 +00:00
Kurt Zeilenga
39c02506de Fix problems caused by lint removal 2002-01-09 18:18:36 +00:00
Kurt Zeilenga
bc1cd95149 Rework control infrastructure a bit. Add subentries visibility control. 2002-01-09 06:29:54 +00:00
Kurt Zeilenga
0e2af54a3f Update copyright statements 2002-01-04 21:17:25 +00:00
Kurt Zeilenga
763c0de59b Rework filter code
Misc cleanup / lint removal
2002-01-02 17:06:56 +00:00
Howard Chu
b2809cb330 Fix dnParent to return "" for root 2002-01-01 13:32:10 +00:00
Howard Chu
6fa6ac6676 Fix dnValidate 2002-01-01 09:40:57 +00:00
Howard Chu
776ce133e9 More str2rdn tweaks 2001-12-30 09:42:58 +00:00
Howard Chu
5d28b4555e Reorganize LDAPAVA allocation layout 2001-12-30 06:56:57 +00:00
Howard Chu
c5529b489b fix uninitialized vars 2001-12-30 00:24:44 +00:00
Howard Chu
185ff129b5 Change struct berval * to struct berval in various structures 2001-12-29 15:01:10 +00:00
Howard Chu
a191392e2e Changed LDAP_AVA struct berval * to struct berval. 2001-12-29 10:35:24 +00:00
Howard Chu
975a5e9a24 Added dnPretty2/dnNormalize2 using preallocated destination berval 2001-12-29 04:48:00 +00:00
Pierangelo Masarati
c8335e7d14 strengthen previous commit 2001-12-28 15:56:18 +00:00
Pierangelo Masarati
9dab474fa4 fix realloc bug 2001-12-28 15:28:10 +00:00
Pierangelo Masarati
cd8eb327d6 more exploitation of efficient parsing 2001-12-28 15:13:16 +00:00
Pierangelo Masarati
2f3f7c6765 ldap_str2rdn() can parse without allocating a LDAPRDN* (not very clean, though); used by dn_rdnlen 2001-12-28 12:50:48 +00:00
Howard Chu
65636e0855 Changed dnExtractRdn to use a provided berval instead of allocating one.
Use ldap_dn2bv and ldap_rdn2bv instead of the *2str versions.
2001-12-28 10:04:53 +00:00
Howard Chu
d6a37432bd Changed dn_rdn/dn_rdnlen to struct berval 2001-12-28 08:38:24 +00:00
Howard Chu
292c575c1f Added dnPrettyNormal, do both Pretty and Normalize at once to save
some ldap_str2dn overhead.
2001-12-28 07:27:15 +00:00
Kurt Zeilenga
cefce9c965 dnExtractRDN should take a struct berval DN. 2001-12-27 17:17:01 +00:00
Pierangelo Masarati
70e7d58c7d small improvement and prototyping 2001-12-27 15:15:30 +00:00
Kurt Zeilenga
cddf7e0e00 More struct berval DN changes
decrease dependency on dn_validate/dn_normalize
2001-12-27 07:13:13 +00:00
Howard Chu
3e826ae1c7 More struct berval fixes for modrdn 2001-12-27 00:58:14 +00:00
Howard Chu
bbcb0f8a7f Replace strcat with slap_strcopy 2001-12-26 16:25:18 +00:00
Kurt Zeilenga
f443af5a57 Remove unneeded cheats. hyc found/fixed my bug (in slap.h) 2001-12-24 20:42:05 +00:00
Kurt Zeilenga
5ccff70aa3 update comment
make tests (0-4) now works! (w/ dnNormalize/dnMatch cheats)
2001-12-24 20:29:59 +00:00
Kurt Zeilenga
b735ca3237 Add some cheats to dnNormalize and dnMatch to workaround
ava normalization issues.
2001-12-24 20:07:19 +00:00
Pierangelo Masarati
cbe43a8540 more re-engineering; now rdn_attrs() and so are written in terms of ldap_str2rdn; some functions are deprecated 2001-12-24 18:42:51 +00:00
Kurt Zeilenga
d047cc854e Require the struct berval **out argument of dnPretty/dnNormalize
point to a NULL pointer, that is assert( *out == NULL ).
Eventually, we'll allow **out to point to a preallocated
struct berval (to avoid unnecessary allocation).
2001-12-24 18:38:20 +00:00
Kurt Zeilenga
f6085d3f82 Every quick mod to use a struct berval for e_dn/e_ndn. No bv_len yet. 2001-12-24 16:53:47 +00:00
Pierangelo Masarati
7bf6ec940b re-engineered some dn related functions with ldap_dn* functions; helpers should be used instead of deprecated functions in code 2001-12-24 15:48:35 +00:00
Kurt Zeilenga
d0abe6f59f Misc DN cleanup, no functional changes 2001-12-24 06:00:02 +00:00
Kurt Zeilenga
e701812f27 Make note of deprecated DN routines. Need to write
"struct berval" versions
2001-12-24 04:39:15 +00:00
Kurt Zeilenga
9d56c59d1b Minor cleanup, rename ldapava_free_*() routines and
don't expose symbols of ava helper routines
2001-12-23 22:46:37 +00:00
Kurt Zeilenga
7a6e80cdcd Zap dn_match(), cleanup up prototype header 2001-12-23 20:23:15 +00:00
Kurt Zeilenga
50d57151a7 Move dnValidate, dnNormalize, dnPretty to dn.c 2001-12-23 01:19:46 +00:00
Kurt Zeilenga
0c28b66a75 use dnPretty instead of dn_pretty 2001-12-23 00:43:57 +00:00
Pierangelo Masarati
cea4556910 allow empty suffix 2001-12-12 07:56:17 +00:00
Pierangelo Masarati
7330016026 strengthen dn_issuffix 2001-12-11 12:36:54 +00:00
Howard Chu
ebadb3737f Added dn_issuffixbv() like dn_issuffix, but with bervals. 2001-12-09 03:02:29 +00:00
Howard Chu
fd93e0721b Cleanup previous commit 2001-12-08 11:15:55 +00:00
Howard Chu
ad9d17d537 Added dn_rdnlen. Fixed rdn leak in limits.c. 2001-12-08 11:08:26 +00:00
Howard Chu
e2c2de11c3 Converted all use of dn_parent to the in-place version. (Fixed a pdn leak
in back-sql along the way.)
2001-12-08 10:37:42 +00:00
Howard Chu
3fce8e0e80 Turned dn_parent into dn_parent1, returning in-place pointer. Made
dn_parent return ch_strdup of dn_parent1 for compatibility.
2001-12-08 08:41:39 +00:00
Kurt Zeilenga
ea8f7aaab3 Pretty the entry DNs on add but not rename (yet). 2001-12-08 06:57:06 +00:00
Pierangelo Masarati
379e0e9d50 another step towards schema aware normalization: ava sorting in rdns; now by defining USE_LDAP_DN_PARSING both the new dn parsing and the server side normalization is used. There might be, every now and then, a flaw mostly due to naive normalization of pseudo-dn (thinking about some acl/regex stuff and so) 2001-12-05 19:26:30 +00:00
Pierangelo Masarati
09626cc1d5 of course we don't need debug stuff any more ... :) 2001-12-04 20:27:26 +00:00
Pierangelo Masarati
9004262d95 reimplement dn_validate/normalize/(match) using the ldap_str2dn/dn2str stuff; need to #define USE_LDAP_DN_PARSING 2001-12-04 20:22:26 +00:00
Kurt Zeilenga
b5504a1c36 Clean up some misplaced 'extern' declarations (should be headers) 2001-12-04 19:57:09 +00:00
Pierangelo Masarati
aee3600276 minor cleanup 2001-11-17 16:18:07 +00:00
Kurt Zeilenga
7000f3e8cb Zap old DN code 2001-07-21 23:45:04 +00:00
Kurt Zeilenga
5cb6b1ce02 Back out DN changes, needs more work 2001-07-21 22:44:55 +00:00
Pierangelo Masarati
a453d7eacf dn_validate/dn_normalize has been rewritten by
David A. Cooper <david.cooper@nist.gov> (ITS#1232)
according to draft-ietf-ldapbis-dn-05.txt

A copyright statement follows:

  The functions normalize_unicode(), get_hexpair(), write_hex_pair(),
  get_next_byte(), get_next_char(), get_ber_length(),
  ber_parse_primitive_string(), ber_parse_string(), String_normalize(),
  DirectoryString_normalize(), PrintableString_normalize(),
  IA5String_normalize(), ber_parse_primitive_bitstring(),
  ber_parse_bitstring(), getNext8bits(), bitString_normalize(), match_oid(),
  match_key(), get_validated_av_in_dn(), get_validated_rdn_in_dn(),
  and get_validated_dn() in this file were developed at the National Institute
  of Standards and Technology by employees of the Federal Government in the
  course of their official duties. Pursuant to title 17 Section 105 of the
  United States Code the code in these functions is not subject to copyright
  protection and is in the public domain. The copyright for all other code in
  this file is as specified below.
2001-07-13 08:21:14 +00:00
Pierangelo Masarati
27e5c484e6 reworked rdn_attrs to use ldap_explode_rdn; maybe we should remove escapes "\" from parts directly in ldap_explode_rdn 2001-07-10 18:19:22 +00:00
Pierangelo Masarati
38ce12a6f6 added rdn_attrs: parses a rdn and returns types and values in two arrays (honors '+' separator according to RFC 2253) 2001-07-06 12:22:01 +00:00
Pierangelo Masarati
901ce99dde added a comment to rdn_validate: needs to be rewritten according to dn_validate 2001-07-05 20:33:15 +00:00
Pierangelo Masarati
cd74b62fd2 rdn check to prevent illegal rdns in modrdn (copied from dn_rdn) fixes ITS#1102 2001-07-05 08:40:40 +00:00
Stig Venaas
b371357c13 Made dnNormalize() do Unicode normalization and case folding.
dn_normalize() now uses dnNormalize() and fails if normalized string is
longer than original string.
2001-01-25 16:51:59 +00:00
Gary Williams
f49fd8a98e fix format 2001-01-17 16:35:53 +00:00
Gary Williams
ffcdc6d11d More new logging (Behind NEW_LOGGING) 2001-01-15 19:17:29 +00:00
Kurt Zeilenga
5935a11c8e Set UTF8DN by default 2000-10-30 20:05:41 +00:00
Stig Venaas
a8985a440b Use the macro UTF8DN to set whether new UTF8 dn_normalize() code should
be used.
2000-10-30 20:00:56 +00:00
Stig Venaas
fdbd1ded93 Short term dn_normalize() fix. Uppercases all UTF8 characters as long
as the character byte length is preserved. Change #if 1 to use.
2000-10-28 23:38:14 +00:00
Kurt Zeilenga
38cf4a1d82 Add better space compression 2000-10-21 03:27:41 +00:00
Kurt Zeilenga
ce382475f0 misc cleanup 2000-09-29 02:50:34 +00:00
Kurt Zeilenga
b7d1b10bca Minor cleanup 2000-06-14 21:11:56 +00:00
Mark Valence
d91dba4ad0 Bug fix in dn_rdn when dn string begins with whitespace. 2000-06-14 03:59:19 +00:00
Kurt Zeilenga
1aa4b07c98 Remove support for DNS DNs (not to be confused with X.500 DN using
domainComponents (DC)).
2000-06-05 20:07:02 +00:00
Kurt Zeilenga
60802201e3 Const'ification
SASL mech removed from backend bind callback (as SASL is managed by frontend)
Changes to some backends are untested (as I don't have all dependent
  software install)
2000-05-22 03:46:57 +00:00
Kurt Zeilenga
4bc786f34b Y2k copyright update 2000-05-13 02:47:56 +00:00
Kurt Zeilenga
0dbaf87730 Another round of changes behind -DSLAPD_SCHEMA_NOT_COMPAT
plus these changes unhidden changes:
	remove now meaning --enable-discreteaci configure option
	fix ITS#451, slapd filters
	Add ber_bvecadd() to support above
	constify ldap_pvt_find_wildcard() and misc slapd routines
	renamed some slap.h macros
	likely broken something
2000-02-14 20:57:34 +00:00
Kurt Zeilenga
4bdd788c68 Move uppercase comment to be next to uppercasing code. 2000-01-25 00:49:14 +00:00
Kurt Zeilenga
da93ca8c5e Remove DNS_DN experimental code. 1999-12-18 19:54:22 +00:00
Kurt Zeilenga
7a0b0b2bbf In preparation for adding dn_rewrite()...
s/dn_normalize/dn_validate/
s/dn_normalize_case/dn_normalize/
1999-09-24 01:46:37 +00:00
Kurt Zeilenga
403f4479bc Add OpenLDAP RCSid to *.[ch] in clients, libraries, and servers.
Replace old Id as needed (back-tcl).
Leave updating of contribWare to contributors (for now).
1999-09-08 19:06:24 +00:00
Kurt Zeilenga
5c63fd55b5 Implement ldap_dn_normalize and friends. Should be used by clients
to validate input dn's BEFORE sending dn's to server.
Also fixed getfilter to use REG_EXTENDED|REG_NOSUB.  (and fixed one
case where REG_BASIC was still used).
s/strdup/LDAP_STRDUP/
Added ldap_pvt_str2lower/upper
1999-08-25 06:44:08 +00:00
Kurt Zeilenga
2a74677799 const'fication 1999-08-20 19:00:44 +00:00
Kurt Zeilenga
397294fc40 Add dn_subtree() (used for subtree index generation) 1999-08-12 04:20:32 +00:00
Kurt Zeilenga
1ffe5122b7 Implement DN_PARENT_PREFIX and framework for DN_SUBTREE_PREFIX. 1999-08-11 20:59:28 +00:00
Kurt Zeilenga
9c3ed0310b Add copyright notices. 1999-08-06 23:07:46 +00:00