summaryrefslogtreecommitdiffstats
path: root/ldap/servers
Commit message (Collapse)AuthorAgeFilesLines
...
* Resolves: 268101Nathan Kinder2007-10-056-24/+44
| | | | Summary: Added new operation flag to skip writing modifiresname and related attributes. Updated password policy internal operations to use this new flag.
* Resolves: #173873Noriko Hosoi2007-10-052-92/+167
| | | | | | | | | | | | | Summary: Directory Server should shutdown if it fails to write logs (comment #7) Change Description: 1. introduced a new static function log__error_emergency, which is called at emergency to log to the syslog and at least try to log into the errors log one more time. 2. added an error parameter to the macro LOG_WRITE_NOW to return if the writing to the log was successful or not. 3. if opening an errors log or writing to an errors log failed, call g_set_shutdown to shutdown the server gracefully. 4. log__error_emergency calls writing log function (LDAPDebug --> slapd_log_error_proc_internal) with ERROR_LOCK_WRITE unlocked, if locked.
* Resolves: 288321Nathan Kinder2007-10-045-17/+51
| | | | Summary: Handle poorly formatted DN's when normalizing. Also only check modify values against authenticated DN for DN syntax attributes.
* Resolves: bug 249366Rich Megginson2007-10-042-14/+68
| | | | | | | | | | | | | Bug Description: rhds71 - search filters returns too many entries on interger attributes value greater than 2 to the 31 Reviewed by: nkinder, nhosoi (Thanks!) Fix Description: I found a bug in my previous patch. The bt_compare function is used not only for comparing the actual key values but also for comparing raw index keys - that is, keys with the leading '=' or '*'. If comparing two keys, we should only use the syntax specific compare function if we are comparing two valid equality keys. A valid equality key begins with EQ_PREFIX and has at least one character after that. In this case, we strip off the EQ_PREFIX and pass the values to the syntax specific compare function. Otherwise, we just use a simple berval compare function that is based on memcmp. The code in index_range_read needs to use a similar comparison algorithm, so I beefed up DBTcmp. Why is this necessary? When doing a >= search or a <= search, we need to get the upper (for >=) or lower (for <=) bound for the range, which will either be the last (for >=) or first (for <=) equality key in the index. The index code uses a key of '=' to find the lower bound (which is lower than any key "=value") and a key of '>' to find the upper bound. A '=' with no value will collate before any real eq key with a value, and the ascii value of '>' is one greater than the ascii value of '='. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
* Resolves: #304161Noriko Hosoi2007-10-031-22/+37
| | | | | | | | | | | | Summary: logrotation time of -1 causes hang Change description: 1. slapd_log_audit_proc, slapd_log_error_proc_internal, and log_flush_buffer: use absolute value of rotationtime_secs to calculate the rotationsyncclock. 2. when the result of "atoi" for nsslapd-XXX-logrotationtime is 0 due to the invalid setting, logrotation time is reset to -1 (no rotation). 3. if nsslapd-XXX-logrotationtime and nsslapd-XXX-logexpirationtime is large (near MAXINT) and calculated rotationtime_secs and/or exptime_secs is overflown, set MAXINT to the sec value.
* Resolves: #316281Noriko Hosoi2007-10-031-55/+58
| | | | | | | | | | | | | | Summary: db2bak fails if the archive path exists and ends with '/' Fix description: 1. Use path normalize API rel2abspath to remove the trailing '/'s. 2. db2bak renames the archive dir if the directory exists, checks the directory is the db dir or not. If it is, the command line rename back the existing db to the original and exits with the error: db2archive: Cannot archive to the db directory. Then, the original dir is renamed back. If the db2bak runs as a task (db2bak.pl or console), the server is up and running. Although the backend is disabled, we don't want to rename the db path even for a short time. That being said, changed the order to: check if the archive dir is the same as db dir or not. It exits immediately.
* Resolves: bug 282911Rich Megginson2007-10-032-4/+16
| | | | | | | Description: double err=32 result sent when suffix doesn't exist Reviewed by: nkinder (Thanks!) Fix Description: The backend does not send back a result if the op is search and the err is NO_SUCH_OBJECT (32). The frontend should handle this case so that it knows to defer sending the result until all of the backend candidates have been scanned. We also need to change send_nobackend_ldap_result() to use slapi_send_ldap_result instead of send_ldap_result so that it has the same semantics as the regular backend code. Platforms tested: RHEL5 x86_64
* Resolves: #196523Noriko Hosoi2007-10-033-41/+47
| | | | | | Summary: miscellaneous memory leaks Description: 1) fixed memory leaks 2) cleaned up normalize_path code with fixing memory leaks
* Resolves: #314851Noriko Hosoi2007-10-021-0/+6
| | | | | Summary: vlv: crash after repeated backend creation/deletion Description: added a check code for the backend's existing.
* Resolves: 282911Nathan Kinder2007-10-021-2/+8
| | | | Summary: Don't send result twice when searching against a non-existent suffix.
* Resolves: bug 249366Rich Megginson2007-10-0211-37/+180
| | | | | | | | | | | | | 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: 238517Nathan Kinder2007-10-011-7/+10
| | | | Summary: Add entries to entrycache after adding operational attributes.
* Resolves #222918Noriko Hosoi2007-09-282-53/+51
| | | | | | 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: 311851Nathan Kinder2007-09-281-94/+34
| | | | Summary: Remove hard-coded SASL mappings and use config based regex mappings instead.
* Resolves: 219586Nathan Kinder2007-09-281-3/+6
| | | | Summary: Fixed leak of Slapi_Value in index code.
* Resolves: 197997Nathan Kinder2007-09-281-1/+1
| | | | Summary: Fixed PTA config parsing to use a comma delimiter instread of a space.
* Resolves: 158667Nathan Kinder2007-09-281-1/+1
| | | | Summary: Fractional replication log statement needed a newline.
* Resolves: 288521Nathan Kinder2007-09-271-4/+35
| | | | Summary: Presence filter using attribute subtype returns incorrect search results.
* Resolves: 238504Nathan Kinder2007-09-273-42/+101
| | | | Summary: Don't replay AD originated password changes back to AD.
* Fixed a typo I put in in the previous checkin.Noriko Hosoi2007-09-261-1/+1
|
* Resolves: 170560Nathan Kinder2007-09-262-17/+40
| | | | Summary: Make sync total update deal with an empty changelog.
* Resolves: bug 301811Rich Megginson2007-09-251-4/+11
| | | | | | | | | | | Bug Description: reliab15: slapd hangs on goblin5 Reviewed by: nhosoi (Thanks!) Fix Description: We are calling the mtn_lock() twice in the same thread. The proposed fix is to move the mtn_lock() so this doesn't happen. Platforms tested: RHEL5 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
* Resolves: #241089Noriko Hosoi2007-09-253-3/+16
| | | | | Summary: reset db statistics between restarts Description: cleaning up the db stats when the server is shutdown
* Resolves: #287961Noriko Hosoi2007-09-251-0/+4
| | | | | | Summary: server crashes in schema replication Description: resetting the global linked list head when the first objectclass is removed from the list.
* Resolves: 304191Nathan Kinder2007-09-242-2/+37
| | | | Summary: Make dbscan handle special RUV related changelog entries.
* Resolves: bug 262021Rich Megginson2007-09-242-2/+15
| | | | | | | | | | | Bug Description: Migration script does not migrate nsDS5ReplicaCredentials correctly. Reviewed by: nkinder (Thanks!) Fix Description: 7.1 and earlier chaining and replication credentials were stored incorrectly on little endian machines (x86 and itanium). They were "accidentally" stored correctly on big endian machines (sparc, pa-risc) because val == ntohl(val) on those platforms. When migrating from a little endian machine, we need to decode the password using the broken algorithm and re-encode it using the good method. We determine if the password is encode incorrectly by the following method: we use migratecred to decode and encode using the old path. If the values are equal, this means the password was already encoded correctly and we don't need to fix it. Otherwise, we set the flag that tells migratecred to fix it. In order to decode the broken password correctly on big endian machines, we have to swap the byte order to convert the values to little endian. Platforms tested: RHEL5 x86_64, RHEL5 i386, Solaris 9 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
* Resolves: #171081Noriko Hosoi2007-09-242-383/+384
| | | | | | | | | | | | | | | Summary: ldapsearch hung at browsing index creation (comment #4) Fix Description: 1. instead of covering all the reindexing look, set vlv lock just around vlv_update_index, where vlv update is executed. 2. actually, lock is not meant to use for excluding the operation against vlv reconfiguration. This ldbm_back_ldbm2index function first calls instance_set_busy_and_readonly and protects the backend from the operation done by other threads. vlv delete was just ignoring the busy/readonly setting. Thus, changed the vlv code to respect the setting. Found the backend is busy, deleting a vlv index fails and returns. 3. cleaned up the instance_set_busy_and_readonly function not to leak memory. 4. fixed minor memory leak.
* Resolves: 299361Nathan Kinder2007-09-201-6/+117
| | | | Summary: Handle initials and streetAddress attributes when doing a sync total update.
* Resolves: bug 262021Rich Megginson2007-09-202-4/+27
| | | | | | | | | | | Bug Description: Migration script does not migrate nsDS5ReplicaCredentials correctly. Reviewed by: nhosoi (Thanks!) Fix Description: We still need to be able to decrypt passwords using the broken method. I guess it works on Solaris and HP because the values are already in network byte order. But when the values were encrypted on x86, they were encrypted the wrong way. It is safe to use MIGRATE_BROKEN_PWD on Solaris and HP because it is essentially a no-op. But this allows us to decrypt x86 passwords and store them correctly. Platforms tested: RHEL4 i386, RHEL5 x86_64 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
* Resolves: #243820Noriko Hosoi2007-09-202-10/+41
| | | | | | | | | Summary: Online browsing indexing hangs Description: 1. adding more shutdown checks in the indexing code to achieve the swift shutdown even in the long running browsing indexing. 2. in the error case, cleaning up the index file. 3. found minor memory leaks.
* Resolves: #240897Noriko Hosoi2007-09-209-215/+249
| | | | | | | | | | Summary: CRM 1474928 : ds7.1 db index/vlv not handling a stop-slapd, hangs slapd Description: 1. moved active thread count from ns-slapd to libslapd for the task threads to use. 2. provided APIs to increment/decrement/get the active thread count 3. let task threads increment the active thread count when it's spawned and decrement it when it quits.
* Resolves: bug 249366Rich Megginson2007-09-195-124/+92
| | | | | | | | | | | 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: 294301Nathan Kinder2007-09-195-176/+15
| | | | Summary: Don't try to dlopen ldap SSL libs in ldclt.
* Resolves: 293541Nathan Kinder2007-09-172-15/+34
| | | | Summary: Allow server to start if descriptor related attributes are set too high.
* Resolves: 242551Nathan Kinder2007-09-175-120/+110
| | | | Summary: Performance cleanup of sync code. Improve tombstone search performance.
* Resolves: 243227Nathan Kinder2007-09-125-61/+490
| | | | Summary: Handle syncing add opererations that have a ntuniqueid present.
* Resolves: bug 283041Rich Megginson2007-09-121-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug Description: MMR: Directory updates on same object Reviewed by: nhosoi (Thanks!) Fix Description: The problem does appear to be concurrency. I think the original intention of the urp fixup code was that it should only be run inside the database lock, so that the database could be restored to a consistent state before the next operation was processed. However, this requires the database code to know when the database is already locked, so that if e.g. a modrdn operation needs to call an internal delete, the database should not be locked again. The flag OP_FLAG_REPL_FIXUP is used to denote both that the operation is such an internal operation, and that the database should not be locked again. There are a couple of cases where these operations can be called from outside of the database lock: urp_fixup_rename_entry is called from multimaster_postop_modrdn and multimaster_postop_delete, both of which are front end post op plugins, not called from within the database lock. Same with urp_fixup_delete_entry and urp_fixup_modify_entry. In other cases, such as urp_fixup_add_entry, and other places where urp_fixup_rename_entry and urp_fixup_modify_entry are called, they are called from a bepostop plugin function, which is called after the original database operation has been processed, within the database lock. So the solution appears to be to move the urp_* functions to the bepostop plugin functions. One of these functions does an internal search - urp_get_min_naming_conflict_entry - but it does not appear that search locks the database, so there was nothing to be done to make it "reentrant". Without this patch, I can crash the server in a matter of minutes (x86_64 rhel5) using the latest Fedora DS 1.1 code. With the patch, the server runs for several hours (maybe longer, I had to stop the test). Also, to really exercise the urp code, I added a rename operation between the add and delete e.g. add("ou=test"); rename("ou=test", "ou=test2"); delete("ou=test2"); The server still runs for several hours with no problems. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Resolves: bug 244475Rich Megginson2007-09-072-4/+4
| | | | | | | | | Bug Description: crash at startup with new ldap sdk on 64-bit platform Reviewed by: nkinder (Thanks!) Fix Description: Use LBER_SOCKET as the socket type instead of int. There was also a place in ldclt where we were doing the same thing. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Resolves: #236256Noriko Hosoi2007-09-079-26/+358
| | | | | | | | Summary: verify-db.pl (db_verify) does not work on a little endian machine (comment #1-#4) Description: 1) introducing dbverify mode to ns-slapd. 2) providing new script dbverify to call "ns-slapd dbverify" 3) fixing verify-db.pl to call dbverify instead of db_verify from BDB
* Resolves: 207567Nathan Kinder2007-09-042-24/+5
| | | | Summary: Corrected search scope used to find entries to sync in winsync total update protocol.
* Resolves: 212671Nathan Kinder2007-08-303-3/+99
| | | | Summary: Handle syncing multi-valued street attribute to AD.
* Resolves: bug 262021Rich Megginson2007-08-301-3/+3
| | | | | | | | | | | Bug Description: Migration script does not migrate nsDS5ReplicaCredentials correctly. Reviewed by: nhosoi (Thanks!) Fix Description: This was a big endian vs. little endian issue. We only use name based UUID generation with the reversible password code. This code was not doing the ntoh with the numeric values generated. I'm sure there is probably a compiler warning about this on some platform. Platforms tested: RHEL5 x86_64, Solaris 9 64-bit Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
* Resolves: 207893Nathan Kinder2007-08-272-3/+65
| | | | Summary: Check if passwords are already hashed before sync'ing with AD.
* Resolves: bug 252263Rich Megginson2007-08-231-15/+3
| | | | | | | | | Bug Description: enabling chain-on-update causes replica to act as a master Reviewed by: nkinder (Thanks!) Fix Description: This fix is only minor - we must use sym_load() to look up plugins, including the entry distribution plugin we use for chain on update. But I don't believe this was causing the problem. Chain on update does not work if you BIND as directory manager. You must bind as a regular user. It may be difficult to change this. We need to do more testing to see if, in general, proxy BIND and operations work with directory manager. The chaining backend cannot use directory manager as the proxy user. Platforms tested: RHEL5 Flag Day: no Doc impact: Yes, we need to make sure we document exactly how chain on update is to be used.
* Resolves: 243221Nathan Kinder2007-08-232-15/+78
| | | | Summary: Trim initials attribute value when sync'ing to AD.
* Resolves: #253069Noriko Hosoi2007-08-175-24/+45
| | | | | | Summary: cyclic dependency from getpwnam() in log rotation code Description: Moved getpwnam call to the startup time, store the info in slapdFrontendConfig to reuse.
* Resolves: bug 253047FedoraDirSvr110b1_20070816FedoraDirSvr110b1Rich Megginson2007-08-163-11/+11
| | | | | | | | Bug Description: Does not build on Fedora 8 Fix Description: If using the O_CREAT flag with open(), the file mode must also be given. Also, the bdb calls to use ->open() must use parentheses around the function pointer access e.g. (DB->open)(args...) instead of just DB->open(args). Platforms tested: RHEL4, Fedora 8 Flag Day: no Doc impact: no
* Resolves: bug 251549FedoraDirSvr110b1_20070813Rich Megginson2007-08-133-6/+6
| | | | | | | | | | Bug Description: Change filesystem path naming from "fedora-ds" to "dirsrv" Reviewed by: nkinder (Thanks!) Fix Description: Mostly just changing the package name in configure.ac, and making sure we consistently use that in path naming (e.g. /etc/@PACKAGE_NAME@ or /etc/@PACKAGE_NAME_BASE@ for adminserver). Platforms tested: RHEL4, FC6 Flag Day: no Doc impact: Oh yes. QA impact: Any existing tests that depend on /path/brand-ds will need to change to use dirsrv. It is highly encouraged to use a macro or variable for the package name in any scripts to minimize the impact of future package name changes.
* Resolves: 251262Nathan Kinder2007-08-081-28/+108
| | | | Summary: Changed ldap-agent to find location of stats file dynamically.
* The arguments to memset were in the wrong order. This code is only used on ↵Rich Megginson2007-08-081-1/+1
| | | | Windows.