summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/syntaxes
Commit message (Collapse)AuthorAgeFilesLines
* Resolves: bug 249366Rich Megginson2007-10-023-6/+44
| | | | | | | | | | | | | Bug Description: rhds71 - search filters returns too many entries on integer attributes value greater than 2 to the power of 31 Reviewed by: nkinder, nhosoi (Thanks!) Fix Description: The way >= and <= searches are supposed to work in LDAP is that you are supposed to define an ORDERING matching rule for the attribute you want to use in the search filter. The way our code is written, most strings "just work" as a side effect of the way bdb sorts the keys by default - so you can do (uid>=jvedder) and get what you would expect, even though LDAP says this is illegal because the schema definition of the uid attribute does not have an ORDERING matching rule. And INTEGER worked with the old binary format for the same reason. The only attribute definitions we use with ORDERING are attributes that use Generalized Time syntax (e.g. createTimestamp, et. al.) and numSubordinates (which uses INTEGER, but this is a special case handled internally by the db code). The way it works now is that the indexing code will honor the ORDERING matching rule specified in the schema definition. Or, if ORDERING is not specified, the user can use the nsMatchingRule index configuration. This will allow an existing customer that depends all integer syntax attributes (e.g. uidNumber) to allow range searches by default to enable range searches without editing the schema. The syntax definition for the attribute must also specify a compare function. This compare function will be used by the bdb bt_compare() function. I also fixed a bug in the integer normalize code - a string of all zeros should normalize to a single "0". In all other cases, the leading zeros should be removed. Platforms tested: RHEL5 x86_64 Flag Day: Yes. Integer indexes will need to be rebuilt (except for numsubordinates). Doc impact: Yes - document slapi API additions QA impact: Pay close attention to tests that use >= or <= search filters, both with and without index attributes. Also, pay close attention to greater/less than searches using i18n collations. New Tests integrated into TET: Forthcoming
* Resolves #222918Noriko Hosoi2007-09-281-42/+37
| | | | | | Summary: server crash after deleting supposedly deleted attribute Description: index.c: if there is no attribute to delete, don't call index_addordel_values_svstring.c: changed string_values2keys to handle NULL bvals
* Resolves: bug 249366Rich Megginson2007-09-194-124/+78
| | | | | | | | | | | Bug Description: rhds71 - search filters returns too many entries on interger attributes value greater than 231 Reviewed by: nhosoi (Thanks!) Fix Description: The problem is that the current code uses atol() to convert the string value to an integer. long is 4 bytes or 8 bytes depending on the underlying platform. These binary values are stored in the index as 4 or 8 byte values. Finally, the behavior of atol() is different on the platform in overflow cases. Instead of dealing with binary values, we must store the values in string format, and perform string comparison, string normalization, and string key generation on INTEGER syntax values. I added another syntax type to the list in syntax.h. The code in string.c and value.c was mostly usable. I had to add some code in value_normalize to handle cases like " -00000001" -> "-1" to make it work like atol(), and I had to add some code to value_cmp to handle the sign (e.g. positive is always greater than negative, no other comparison is necessary) and magnitude (longer number is larger/smaller than shorter number, depending on sign). Otherwise, strcmp() does the right thing (e.g. "50" > "49", the same as int(50) > int(49)). One problem I ran into was that the value_normalize code takes just a char *, rather than a berval* or a char * + size_t length. To be efficient, this function should return the new length of the normalized string. Fortunately, none of the existing code cares about the length, but I needed the length for magnitude comparison, so I just used strlen for those cases. Which should be fine. value_normalize always produces a correctly null terminated string. I rewrote the value_cmp code to use a simple if rather than the switch statement. This makes it much clearer - if syntax is case insensitive, use slapi_utf8casecmp - if case sensitive, use strcmp - otherwise, error. I also found a problem with the ldif2db code, which I uncovered because I added my integer indexes online and did an online import. The db2index code will correctly clear the INDEX_OFFLINE bit after the index is completed, but the ldif2db code will not. Platforms tested: RHEL5 x86_64 Flag Day: Yes, if you are upgrading and you have integer valued indexes, you will have to remove them and recreate them. Doc impact: We will have to document this in the release notes.
* Resolves: #237040Noriko Hosoi2007-04-191-118/+0
| | | | Summary: Remove obsolete makefiles
* Resolves: #214533Noriko Hosoi2006-11-1013-0/+65
| | | | | | | | | | Summary: configure needs to support --with-fhs (Comment #6) Changes: Added the following include next to the end of the copyright block. + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif +
* Resolves: #214728Noriko Hosoi2006-11-101-1/+0
| | | | | Summary: Cleaning up obsolete macros in the build Changes: eliminated macro NSPR20 (Comment #9)
* Resolves: #199923Noriko Hosoi2006-11-061-2/+4
| | | | | Summary: subtree search fails to find items under a db containing special characters (Comment#16) Description: When dn contains rdn which includes '\\', it was escaped twice to generate a key for entrydn and caused mismatch in forming ancestorid index. It ends up the subtree search fail.
* Resolves: #210947Noriko Hosoi2006-10-251-1/+1
| | | | | Summary: parameterizing the hardcoded paths (phase 3. installed binaries, change log, setup) Comment #23
* Bug: 205456Rich Megginson2006-09-061-1/+1
| | | | | | Description: Enable DS Core build/install on HP-UX Fix Description: remove some bogus adminutil and nsdshttpd stuff from the plugin makefiles Reviewed by: nhosoi (Thanks!)
* Bug(s) fixed: 186280Rich Megginson2006-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Bug Description: ldapserver: Close potential security vulnerabilities in CGI code Reviewed by: Nathan, Noriko, and Pete (Thanks!) Fix Description: Clean up usage of sprintf, strcpy, fgets instead of gets, fixed buffer usage, etc., mostly in the CGI code and other user facing code (i.e. setup). Also, Steve Grubb told me about a GCC trick to force it to check printf style varargs functions, to check the format string against the argument string, for type mismatches, missing arguments, and too many arguments. In the CGI form argument parsing code, we needed to be more careful about checking for bad input - good input is supposed to look like this: name=value&name=value&..... &name=value. I don't think the original code was checking properly for something like name&name=value. There was another place where we were not checking to see if a buffer had enough room before appending a string to it. I had to change a couple of functions to allow passing in the size of the buffer. Fixed some issues raised by Noriko and Nathan. Platforms tested: RHEL4 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
* Bug(s) fixed: 172005Rich Megginson2005-10-291-1/+1
| | | | | | | | | | | | | Bug Description: Change ldapserver version to 1.0 Reviewed by: Noriko (Thanks!) Fix Description: This also fixes some lingering build issues involving perldap, which is no longer a separate setup package, but just gets included into DS in a similar manner to nspr, nss, etc. Platforms tested: RHEL4 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
* Fixed licensing typoNathan Kinder2005-04-1915-15/+45
|
* 155068 - Added license to source filesNathan Kinder2005-04-1515-0/+450
|
* [Bug 146919] Directory Server rebrandingNoriko Hosoi2005-03-251-1/+1
| | | | | | | | | | 1) Brandx -> Fedora 2) Pick up new internal component set (Admin SDK, Setup SDK, Admin Server) 3) Use JRE from the Admin Server package 4) Docs a) Componentize Docs b) Rebrand Docs c) Drop packaging Administration Guide in the external version
* Bug(s) fixed: 152030Rich Megginson2005-03-241-1/+1
| | | | | | | | | | | Bug Description: Various valgrind reported problems. Mostly not serious, but a few which could cause bad leaks in certain situations. Reviewed by: Rob and David (Thanks!) Fix Description: Mostly added frees where needed, or moved things around to make sure the proper free was called. I also fixed the formatting/spacing. Platforms tested: RHEL3 Flag Day: no Doc impact: No. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
* 149951 - Updated source code copyrightsNathan Kinder2005-02-2815-29/+29
|
* [146919] De-brand the Directory Server as "brandx"Noriko Hosoi2005-02-021-1/+1
|
* remove references to ldapserver from makefiles; use BUILD_ROOT instead of ↵Rich Megginson2005-01-281-2/+2
| | | | MCOM_ROOT and NSROOT; BUILD_ROOT is now the ldapserver directory rather than its parent
* Always use the internal regex functions : checkin lost in the AOL/RH move.David Boreham2005-01-281-3/+0
|
* Moving NSCP Directory Server from DirectoryBranch to TRUNK, initial drop. ↵ldapserver7xcvsadm2005-01-2115-0/+2815
(foxworth)