summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add require secure binds switch.Nathan Kinder2009-05-295-1/+64
| | | | | | | | | | | | This adds a new configuration attribute named nsslapd-require-secure-binds. When enabled, a simple bind will only be allowed over a secure transport (SSL/TLS or a SASL privacy layer). An attempt to do a simple bind over an insecure transport will return a LDAP result of LDAP_CONFIDENTIALITY_REQUIRED. This new setting will not affect anonymous or unauthenticated binds. The default setting is to have this option disabled.
* Use thread aware library for complex regex searchesNoriko Hosoi2009-05-2819-5729/+4173
| | | | | | | | For more details, see the design doc at http://directory.fedoraproject.org/wiki/Thread_Aware_Regex Additional 2 unrelated changes are being made: 1) dbgen.pl.in: secretary and manager are having a dn format value "cn=...". 2) slapi_counter_sunos_sparcv9.S: adding "#define _ASM 1" to force to set an assembler code macro _ASM.
* Added full text of GPLv2 licenseRich Megginson2009-05-262-0/+343
| | | | | | Added the file LICENSE.GPLv2 which contains the full text of the GPLv2 license - the file LICENSE refers to this file.
* Resolves: bug 501490 - Error creating view on FDS 1.2Rich Megginson2009-05-191-7/+10
| | | | | | | | | Reviewed by: nhosoi (Thanks!) The problem is when the views code calls views_cache_discover_children() and there are no children. The code should check to see if the child_count is 0, and only attempt to alloc space for the pChildren array if the child_count is greater than 0. Platforms tested: RHEL5 x86_64
* Fix various compiler warningsRich Megginson2009-05-1917-94/+54
| | | | | | | | | | | | | | | | | | 1) Make sure we use "const" consistently 2) Make sure we use "unsigned char" consistently for some reason (unsigned char)*p did not compare to '\xHH' literals unless the literal was also cast to (unsigned char) 3) added some missing function prototypes 4) removed some unused variables/functions, or commented out for use when debugging 5) various other compiler warnings With all of these, the code compiles cleanly on RHEL5 x86_64 using gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) and CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic" The only warning now is the spurious message about %llu or %lld having the wrong format argument. Reviewed by: nhosoi (Thanks!)
* fix rpmlint issues - config files and perl modules should not be executableRich Megginson2009-05-172-64/+65
|
* bump version to 1.2.1 - added .gitignoreRich Megginson2009-05-173-11/+13
|
* Merge branch 'pagedresults'Noriko Hosoi2009-05-1519-720/+1454
|\
| * Add Simple Paged ResultsNoriko Hosoi2009-05-1521-726/+1460
| | | | | | | | For more details, see the design doc at http://directory.fedoraproject.org/wiki/Simple_Paged_Results_Design
* | Merge branch 'dnsyntax'Nathan Kinder2009-05-136-1/+68
|\|
| * Add strict DN syntax enforcement option.Nathan Kinder2009-05-136-1/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DN syntax has become more restrictive over time, and the current rules are quite strict. Strict adherence to the rules defined in RFC 4514, section 3, would likely cause some pain to client applications. Things such as spaces between the RDN components are not allowed, yet many people use them still since they were allowed in the previous specification outlined in RFC 1779. To deal with the special circumstances around validation of the DN syntax, a configuration attribute is provided named nsslapd-dn-validate-strict. This configuration attribute will ensure that the value strictly adheres to the rules defined in RFC 4514, section 3 if it is set to on. If it is set to off, the server will normalize the value before checking it for syntax violations. Our current normalization function was designed to handle DN values adhering to RFC 1779 or RFC 2253
* | Rename to 389Rich Megginson2009-05-135-3615/+4555
|/ | | | | | | | | changed brand and capbrand to 389 changed vendor to "389 Project" I had to redo my earlier patch - I should have used the newer automake and autoconf to reduce the size of the patch This commit uses automake 1.10.1 and autoconf 2.63 from F10 Reviewed by nkinder (Thanks!)
* Auto-generate SLAPI docs - first pass.Nathan Kinder2009-05-112-26/+2851
| | | | | | | | | | | | | | | | This starts the effort to be able to use Doxygen to auto-generate the SLAPI documentation. I started documenting everything in slapi-plugin.h from the top down. There is a TODO comment indicating where the effort needs to be picked up from in the header file. To build the SLAPI docs, run "doxygen slapi.doxy" in the top of the source tree. The resulting doc files will be in a subdirectory named "docs". The build of the docs still needs to be integrated with the rest of the build.
* Generated autotools files for syntax validation feature.Nathan Kinder2009-05-1111-8181/+9823
| | | | | | | A change was also made to Makefile.am to avoid library versioning for our C++ plug-in libraries. This change should allow us to use autogen.sh on recent platforms without running into issues during build-time.
* Added capability to validate syntax of values being added to the database. ↵Nathan Kinder2009-05-0835-62/+2352
| | | | | | Also added numericstring syntax support. For more details, see the design doc at http://directory.fedoraproject.org/wiki/Syntax_Validation_Design
* Resolves: 496836Nathan Kinder2009-04-211-3/+3
| | | | Summary: Corrected semaphore name used in SNMP subagent.
* Resolves: #475338Noriko Hosoi2009-04-161-9/+5
| | | | | | | | | | | | | | Summary: LOG: the intenal type of maxlogsize, maxdiskspace and minfreespace should be 64-bit integer (comment #20) Description: In log_reverse_convert_time, by initializing "struct tm" with NULLs: struct tm tm = {0}; tm_isdst is also set to 0, which means no daylight saving. mktime thinks when converting struct tm to time_t, use the knowledge "the time that the time_t represents is not in the daylight saving period". Instead, we should have set "tm.tm_isdst = -1;". That means, we don't have the knowledge, calculate it in mktime. I also fixed a silly bug in generating a rotated log file name which I introduced in my previous checkin.
* Resolves: #475338Noriko Hosoi2009-04-161-9/+35
| | | | | | | | | | | | | Summary: LOG: the intenal type of maxlogsize, maxdiskspace and minfreespace should be 64-bit integer (comment #20) Description: 1) replaced PR_GetOpenFileInfo with PR_GetOpenFileInfo64 in log_getfilesize. PR_GetOpenFileInfo does not return the correct file size if the size is larger than 2GB. 2) when a rotation info file is missing and recreated, the file size stored in the file was not correct. 3) rotated file name is created with the time stamp when rotated. The reverse conversion function had a problem and the file name in the rotation info and the real one could mismatch.
* re-enable ppc supportRich Megginson2009-04-061-0/+5
| | | | NOTE: We do not have support for atomic 64-bit counters on ppc - ppc platorms use the mutex approach instead
* add back support for linux ppcRich Megginson2009-04-062-67/+29
|
* Resolves: 442474Nathan Kinder2009-04-021-0/+1
| | | | Summary: Ensure we exit with the return code for the status command in the init script.
* bump version to 1.2.0Rich Megginson2009-03-302-11/+11
|
* Resolves: #492562Noriko Hosoi2009-03-271-1/+1
| | | | | Summary: homePhone is not RFC 1274 compliant Description: added "homeTelephoneNumber" to the NAME list of "homePhone".
* Resolves: #489360Noriko Hosoi2009-03-241-0/+2
| | | | | Summary: Replication Bind Failure After Migration from DS 7.1 (comment #10) Description: changed to trim trailing slashes of oldsroot and actualsroot at the beginning.
* Resolves: 445602Directory_Server_8_1_Candidate_20090324Nathan Kinder2009-03-232-0/+148
| | | | Summary: Fixup replicated schema during migration.
* Resolves: #491215Noriko Hosoi2009-03-231-0/+2
| | | | | | Summary: mmldif crashes in PK11_CreateDigestContext Description: NSS was not initialized. Since cert db, key db, or secmod db are not needed, changed to call NSS_NoDB_Init to initialize NSS.
* Resolves: #476096Noriko Hosoi2009-03-172-2/+2
| | | | | Summary: move perl on solaris to a <TBD> path Description: Changing Solaris perl path (perlexec) to /usr/lib/sparcv9/dirsec/perl5x/bin/perl.
* Resolves: bug 479254Rich Megginson2009-03-161-0/+14
| | | | | | | | | Bug Description: Configuring Replication Server to Server GSSAPI over TLS - attempts replication and can't stop servers Reviewed by: nhosoi (Thanks!) Fix Description: The agreement add code did not check the transport and bind method for compatability. Platforms tested: RHEL5 Flag Day: no Doc impact: no
* Resolves: #490027Noriko Hosoi2009-03-131-4/+6
| | | | | | | | | Summary: log module issues unnecessary/inaccurate syslog errors Description: 1) don't log "Exceeded max number of logs allowed" in syslog messages. It's an info level log, which is not appropriate to log in syslog messages. 2) when deleting an error log file failed, a wrong file name (audit log) was printed. I also added the error code and the message why the deletion failed.
* Resolves: #489625Noriko Hosoi2009-03-131-14/+31
| | | | | | | Summary: If an independent process db2ldif rotates the error log, it crashes the server. Description: PR_Rename failure due to the FILE_EXIST is benign. Ignore the error and goes forward. The procedure is extended to all the log type: error, access, and audit.
* Resolves: bug 489360Rich Megginson2009-03-132-6/+23
| | | | | | | | | Bug Description: Replication Bind Failure After Migration from DS 7.1 Reviewed by: nkinder (Thanks!) Fix Description: We have to quote shell metacharacters before passing them to the shell. I added a new function shellEscape to use for this purpose. We really should shell escape anything passed to system() or back ticks ``. Certainly passwords should contain shell meta characters so I changed places where we use passwords to use shellEscape to pass them to pwdhash or migratecred. I also chomp() the output of migratecred to remove the trailing newline. With the fix, I was able to run setup with a root password of `~!@#$%^&*()\\|[]{}:;<>?/"\ and successfully authenticate. Platforms tested: RHEL5 Flag Day: no Doc impact: no
* Resolves: bug 480869Rich Megginson2009-03-121-1/+1
| | | | | | | | | Description: Bug 480869 - DS console: Can not delete DS instance Fix Description: Create instance was broken, so no instances could be created for purposes of deletion. Create instance was printing the following error: Unable to find Pass Through Authentication Plug-In config entry. This is because the search for this entry in AdminUtil.pm was getting an incorrect error message - something other than "Success" This is because the FileConn->getErrorString() method was returning "0" instead of "Success". Platforms tested: RHEL4
* Resolves: #489763Noriko Hosoi2009-03-121-3/+0
| | | | | Summary: rhds80 64b el5.3 - db2ldif lock case Description: Fixed double free, which confused the server operation and eventually crashed the server.
* Resolves: bug 488866Rich Megginson2009-03-123-20/+73
| | | | | | | | | | Bug Description: crash in reliab15 test Reviewed by: nkinder (Thanks!) Fix Description: There was still a small window of time during which the connection could be closed out from under the other thread which was sending/reading result. The solution is to use explicit locking using the conn->lock to protect access to the conn->ld. Since this also affected the total update code, I tested it under similar conditions, and found that it exhibited the same behavior. I added checking to the total update code to check for disconnection and coordinate access in the entry sending/result reading threads. I also fixed a spurious error message about the sasl path. Platforms tested: RHEL5 Flag Day: no Doc impact: no
* Resolves: bug 488866Rich Megginson2009-03-112-5/+19
| | | | | | | | | Bug Description: crash in reliab15 test Reviewed by: nkinder (Thanks!) Fix Description: My earlier fix was for the case where the result reader thread disconnects. But it looks like there is still a problem if the update sender thread disconnects out from under the reader thread. We need to use conn_connected() to test to see if the connection is connected before we attempt to access conn->ld in the result reader thread. I also improved the error messages so that I could tell if the errors were coming from the update sender thread or the result reader thread. Platforms tested: RHEL5 Flag Day: no Doc impact: no
* Resolves: #476096Noriko Hosoi2009-03-105-118/+291
| | | | | Summary: move perl on solaris to a <TBD> path Description: Changing Solaris perl path (perlexec) from /opt/perl5x/bin/perl to /usr/lib/sparcv9/dirsrv/perl5x/bin/perl.
* Resolves: #488856Noriko Hosoi2009-03-091-23/+30
| | | | | | Summary: slapi_ldap_init_ext needs to be modified due to the build failure on Solaris Description: instead of replacing client_callbacks, set sasl path to SASL_PATH using putenv.
* Resolves: bug 488814Rich Megginson2009-03-071-1/+3
| | | | | | Description: mapping tree code inconsistent about treatment of quoted node names Reviewed by: nhosoi (Thanks!) Fix Description: Look for (|(%s=\"%s\")(%s=%s))) when looking for mapping tree suffixes - there may be a quoted suffix, or one without quotes, so look for either
* Resolves: bug 488866Rich Megginson2009-03-061-7/+26
| | | | | | | | | | Bug Description: crash in reliab15 test Reviewed by: nhosoi (Thanks!) Fix Description: I could not reproduce the crash, but I think the problem is that the server is not handling the disconnection case correctly. It seems that in the event of disconnection (LDAP_SERVER_DOWN 81 - Can't contact server) the code would continue to read results. repl5_inc_result_threadmain() will call conn_read_result_ex() in a loop. If conn_read_result_ex() detects a disconnection or an unrecoverable error, it will call conn_disconnect to close the connection, and return CONN_NOT_CONNECTED. Once this happens, the code must not use conn->ld any more. However, the code did not differentiate between the not connected case and other errors, so it would keep trying to read results (in case some errors are recoverable, the thread still has to read all of the pending results). The code has been fixed to handle disconnect cases specially. I also added some additional locking to make sure the result and the abort flags were set/read correctly. Finally, I changed the code that waits for results to come in, so that if the connection has been closed, it will just return immediately. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Resolves: bug 487425Rich Megginson2009-03-044-40/+217
| | | | | | | | | | | | | | | | | | Bug Description: slapd crashes after changelog is moved Reviewed by: nkinder, nhosoi (Thanks!) Fix Description: There are a number of real fixes, mixed in with many changes for debugging and instrumentation. 1) When the update thread gets the changelog iterator, it will use _cl5AddThread to increment the count of threads holding an open handle to the changelog. When it releases the iterator, or if there were some error acquiring the database handle, it will decrement the thread count. The way it used to work was that it would increment the thread count when retrieving the DB object, but then would immediately decrement it, meaning it had an open handle to the database, but there was no way for the changelog code to know that (except via the reference count on the DB object itself). 2) Changed the AddThread code to increment the thread count outside of the state lock - this better fits the semantics of the other uses of threadcount which are outside of the lock. 3) The changelog code that closes the databases was not closing things down in the correct order. The first thing it must do is wait for all threads with open database handles or otherwise accessing the database to terminate. Once that is done, it can call _cl5DBClose() to actually close all of the databases. Otherwise, a race condition could cause a database to be accessed after it has been closed. 4) Added clcache cleanup code, and made it possible to re-init the clcache. The clcache was not designed to be dynamically closed and opened. clcache is init-ed in _cl5Open clcache_init is re-entrant Added more code to clean up the clcache Delete the clcache in _cl5Delete 5) The clcache stores the current buffer in a thread private storage area. If the clcache has been re-initialized, this buffer is also invalid and the clcache code must get a new buffer. Platforms tested: RHEL5 Flag Day: no Doc impact: no
* Resolves: bug 486400Nathan Kinder2009-03-031-2/+2
| | | | | | | | | | | | | | | Bug Description: During migration, if import fails for some reason, the exact cause of why it was unable to open the LDIF is not logged. Reviewed by: nhosoi (thanks!) Files: see diff Branch: HEAD Fix Description: As discussed in the bug council, the fix is to just report the actual error returned when the open() of the LDIF fails. This reports the errno and a string description of the error in the errors log (which is also output to stderr when running ldif2db). Platforms tested: F9 Flag Day: no Doc impact: no
* Resolves: 487765Nathan Kinder2009-02-271-1/+1
| | | | Summary: Use backend name from inf when importing during setup.
* Resolves: bug 487725Nathan Kinder2009-02-271-8/+48
| | | | | | | | | | | | | | | | | | Bug Description: Performing a MOD operation to bring an entry into the scope of a DNA managed range doesn't trigger DNA to generate a new value. This happens since we check the DNA filter against the existing entry instead of the resulting entry after the mods are applied. Reviewed by: rmeggins (thanks!) Files: see diff Branch: HEAD Fix Description: This patch handles modify operations that bring entries into or out of scope of a managed range. If you bring an entry into scope (say by adding the appropriate objectclass), this will assign a value from the range if the magic value or no value is supplied for the managed type. Platforms tested: F9 Flag Day: no Doc impact: no
* Resolves: bug 450575Rich Megginson2009-02-273-4/+26
| | | | | | | | | Bug Description: unbind or abandon with unsupported critical controls does not close connection Reviewed by: nkinder (Thanks!) Fix Description: When an unbind request is received that has controls marked as critical, and we do not support those controls, we must treat them as non-critical controls and continue processing. Platforms tested: RHEL4, RHEL5 Flag Day: no Doc impact: no
* Resolves: bug 480869Rich Megginson2009-02-2710-197/+321
| | | | | | | | | | | | Bug Description: DS console: Can not delete DS instance Reviewed by: nkinder (Thanks!) Fix Description: As it turns out, my assumption that ds_remove in CGI mode also did the unregistration was false. It is the console that does the unregistration, only after the ds_remove CGI returns success. So, ds_remove needs to run with AdminSDK off, just like the other "special" CGI programs. In addition, ds_remove needs to be more robust - if there is an error during ds_remove, you should be allowed to try again after fixing something. However, the way the error handling worked did not differentiate between fatal errors and errors that could be ignored. In order to do this properly, we need to propagate the errors back up to the top level (oh how I wish perl had real exception handling . . .). The main type of error we need to ignore is file not found or process not found. If we attempted to remove before and that attempt failed for some reason, and left a partial instance, we need to be able to run the remove command again, skipping over the things we shutdown or removed already, and clean up the stuff we need to remove. This can also happen if you use the console to create a ds instance, and remove-ds.pl to remove the instance. The instance will still show up in the console. We need to be able to use the Remove Server in the console to remove the instance from the console, even through there is no physical instance on disk any more. Since the console will only do the unregistration if the CGI returns success, we need to make sure the CGI returns success even though there is no instance on disk. When ds_remove is run via ds_removal, it will do the unregistration. I also took this opportunity to refactor the remove code, creating a removeDSInstance method in DSCreate.pm, and moving some of the other removal helper functions to Util.pm. That simplified the code in both ds_remove and remove-ds.pl. I added a remove-ds-admin.pl script - one of the problems that users have is that they run setup-ds-admin.pl, then hit some error (e.g. bad DNS setup), then find that they cannot restore the system to the state before they ran setup-ds-admin.pl. remove-ds-admin.pl does this. Finally, I added some man pages to the admin package for those commonly used commands. Platforms tested: RHEL4 Flag Day: no Doc impact: no
* Resolves: bug 486495Rich Megginson2009-02-261-5/+6
| | | | | | Description: CoS operational qualifier doesn't work Reviewed by: rmeggins Fix Description: If not using the default, the processing for that case was skipped due to the incorrect if test for pDefAttr. The fix is to move the test for pDefAttr into the lower condition, to make sure it is value before dereferencing it to check for attr_operational or attr_operational_default. The attr_operational || attr_operational_default test has been moved into the using_default && pDefAttr condition, and into the !using_default && pCache condition for the non default case. Parentheses have been added for readability.
* Resolves: bug 487574Nathan Kinder2009-02-261-10/+36
| | | | | | | | | | | | | | | | | | | | | Bug Description: A crash occurs in the DNA plug-in when you delete an existing value of a managed attribute. Reviewed by: rmeggins (thanks!) Files: see diff Branch: HEAD Fix Description: The DNA code was always expecting a value to be present when processing a modify operation. The delete and replace modify operations can be issues with no values. These operations were an oversight in the DNA code. The fix adds cases to handle delete and replace modify operations. For a replace, we check if we are replacing all values with nothing, and generate a new value from the range. If we're processing a delete with no values specified, we also generate a new value. If the delete has values specified, we check to see if the operation leaves any values in the existing entry. If no existing values would remain after the operation, we generate a new value. Platforms tested: F9 Flag Day: no Doc impact: no
* Resolves: bug 486474Rich Megginson2009-02-243-32/+60
| | | | | | | | | Bug Description: overriding arguments to setup causes setup to fail Reviewed by: ulf.weltman, nkinder (Thanks!) Fix Description: Parameters specified on the command line should override and replace (not add to) any parameters specified in a given .inf file. I refactored the code a little too - I moved the argv processing into the Inf module out of the Setup and Migration modules. The code will first process the args and store the values in a temporary hash ref. Then it will process the temp hash ref, replacing the values in the main inf with the values from the hash. Platforms tested: RHEL4 Flag Day: no Doc impact: no
* Resolves: bug 468474Rich Megginson2009-02-246-134/+122
| | | | | | | | | | | | Bug Description: migration results in incomplete admin server sie Reviewed by: nkinder (Thanks!) Fix Description: This is a redesign of one of the core pieces of the setup/migration code - the code that adds the LDAP entries in various places. For starters, I removed the code that would implicitly delete existing trees. This is the root cause of this bug, and other similar problems with setup/instance creation that have been reported. We should never implicitly delete entries. Instead, we should explicitly delete entries by using the changetype: delete in an LDIF template file. Another source of problems was that to update an entry, we would delete it and add it back. This caused some configuration settings to be wiped out (e.g. encryption settings). We cannot do this any more. The LDIF template entries have been modified to have two sets of information for each entry that requires update - the entry to add if no entry exists (the full entry) or the changes to make to the entry if it does exist. The code in Util.pm has been changed to ignore duplicate entries and to ignore changes made to entries that do not exist. Another source of problems with migration is that the error checking was not adequate, especially with FileConn and dse.ldif reading. The fix is to add better error checking and reporting in these areas of code, including error messages. Yet another problem is the run_dir handling. On many platforms the run_dir is shared among all DS instances and the admin server. Older versions of the software allowed you to run the servers as root. We have to make sure run_dir is usable by the least privileged user of all of the servers. Platforms tested: RHEL4 Flag Day: no Doc impact: no
* Resolves: 245894Nathan Kinder2009-02-201-3/+2
| | | | Summary: Check process name in initscript in a more cross-platform manner.