summaryrefslogtreecommitdiffstats
path: root/ldap/servers
Commit message (Collapse)AuthorAgeFilesLines
...
* 544089 - Referential Integrity Plugin does not take into account the attributeNoriko Hosoi2010-01-251-68/+84
| | | | | | | | | | | | | | | | | | | | | subtypes Bug Description: Referential Integrity Plugin does not change the references in subtyped attributes like "manager;en" or "ou;19" Fix Description: The problem is in the way the function int update_integrity (char **argv, char *origDN, char *newrDN, int logChanges) in referint.c makes the changes. The initial search with the filter ldap_create_filter( filter, filtlen, "(%a=%e)", NULL, NULL, argv[i], origDN, NULL) finds the entries with attributes and with attribute subtypes. But after that when generating the necessary changes (attribute1.mod_type = argv[i] and attribute2.mod_type = argv[i]) the function takes care only of the "base" attributes listed in the plugin arguments. We should parse each found entry to find all the attribute subtypes with the value concerned and then make changes to them all. Note: This bug was reported by andrey.ivanov@polytechnique.fr, and the bug fix was also provided by him. The patch was reviewed by rmeggins@redhat.com as well as nhosoi@redhat.com.
* several spelling errors389-ds-base-1.2.6.a1Rich Megginson2010-01-257-11/+11
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=558518 Resolves: bug 558518 Bug Description: several spelling errors Reviewed by: ??? Branch: HEAD Fix Description: Fix several spelling errors in error messages and man pages. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Allow modrdn to move subtree and rename non-leaf nodeNoriko Hosoi2010-01-2269-2510/+9832
| | | | | | | | | | | | | | | | | | | | | | | | | This patch includes - replacing the entrydn index with the entryrdn index - replacing a full DN in each entry in the DB with an RDN - extending Slapi_Entry, entry2str, and str2entry to absorb the changes made on the entry - adding DN/RDN helper functions - adding DN cache - adding a utility and a migration script to convert the DN format database to the RDN format - extending a database dump utility dbscan to support the entryrdn - slapi_dn_syntax_check by nkinder@redhat.com is added to check the dn before modify operations - big fix for 171338 - Enhancement: winsync modrdn not synced In addition to the above, compile warnings and memory leaks found in testing the new feature are fixed. For more details, see the feature design document at: http://directory.fedoraproject.org/wiki/Subtree_Rename and bugzilla at: https://bugzilla.redhat.com/show_bug.cgi?id=171338
* Bug 536703 - Don't send empty mod to AD for mapped DN valuesNathan Kinder2010-01-221-1/+5
| | | | | | | | | | | | | | | When using winsync, setting a mapped DN attribute (such as seeAlso) to a DN outside the scope of the sync agreement causes an empty modify operation to be sent to AD. This causes AD to respond with LDAP error 89, which triggers the update to abort. The problem is that windows_update_remote_entry() uses a flag to determine if it has a modify to send to AD. This flag is set by windows_generate_update_mods(), but the mods are empty since it is detecting that the DN used in seeAlso is not in the scope of the sync agreement. The fix is to only set the modify flag if we actually have mods to send.
* Bug 557185 - Unterminated string after strncpy in Retro Changelog PluginEndi S. Dewata2010-01-201-0/+1
| | | | | | | | According to the strncpy() manual, if there is no null byte among the first n bytes of src, the string placed in dest will not be null terminated. To fix the problem the null byte should be added manually. Reviewed by: rmeggins Pushed by: rmeggins
* ldclt: -e randombinddnfromfile fails with LDAP_UNWILLING_TO_PERFORM (53)Noriko Hosoi2010-01-143-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=555189 Resolves: bug 555189 Bug Description: ldclt code is not passing the password correctly to ldap_sasl_bind_s. The server receives NULL credential. Due to the default configuration: nsslapd-allow-unauthenticated-binds: off the unauthenticated bind fails with LDAP_UNWILLING_TO_PERFORM. Reviewed by: rmeggins@redhat.com Files: see diff Branch: HEAD Fix Description: When "-e randombinddnfromfile=file" is given, bind dn and password pair is retrieved from the file and is supposed to pass to ldap_sasl_bind_s. Although the password was read from the file, but it was not set to the berval "cred" which was passed to ldap_sasl_bind_s. Therefore, the bind operation tried to bind with bind dn and NULL password, which now fails since it's considered as an unauthenticated bind. This change fixes the problem. Also, a usage typo is being fixed. Platforms tested: Fedora 11 Flag Day: no Doc impact: no
* Add Doxygen comments for SLAPI attr, value, and valueset functions.Nathan Kinder2010-01-131-4/+1085
| | | | | This adds Doxygen comment blocks to the public header file for the attr, value, and valueset related fucntions and defines.
* Bug 553027 - Support for nsUniqueId and alias in Retro Changelog.bug509201andV3quotesEndi S. Dewata2010-01-133-11/+93
| | | | This patch adds support for storing the target's nsUniqueId in change log record and renaming any additional attribute using an alias.
* Uninitialized mutex in Retro Changelog Plugin. ↵Endi S. Dewata2010-01-132-17/+4
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=554841 Resolves: bug 554841 Bug Description: Enabling Retro Changelog Plugin on a DS instance provisioned by Samba will crash slapd during startup. Branch: HEAD Fix Description: Apparently the retrocl_internal_lock is still NULL when it's used in retrocl_get_first_changenumber(). The solution is to initialize the lock in the retrocl_plugin_init(). Platforms tested: F12 i386
* Workaround bogus base64 encoded passwords that end in newlineRich Megginson2010-01-114-7/+20
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=552421 Resolves: bug 552421 Bug Description: Cannot log into admin server after upgrade (fedora-ds-admin-1.1.6 -> 389-admin-1.1.9 Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: Some older versions of setup encoded the admin password in SHA and added a trailing newline to the userPassword attribute when adding the admin entry. This changes the SHA passsword compare routine to ignore a trailing newline character in the dbpwd. newline is not a valid base64 character. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 553455 - fix segfault when changing a passwordNathan Kinder2010-01-081-2/+6
| | | | | | | | If a local password policy is set that does not have a storage scheme specified, the server can crash since it tries to dereference a NULL pointer to access the hashing function. This fix simply checks if the storage scheme is set before trying to access the hashing function.
* Password replication from 389DS to AD failsRich Megginson2010-01-041-1/+1
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=537956 Resolves: bug 537956 Bug Description: Password replication from 389DS to AD2008(64bit) fails, all other replication continues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: Broken during adding support for openldap API. I added the function slapi_ldap_bind which returns the result code. The old function being used by the winsync code expected the function to return the msgid, which is now returned as one of the function arguments instead. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 548537 - Fix memory leaks in DNA pluginNathan Kinder2009-12-171-0/+4
| | | | | | | This fixes three small memory leaks in the DNA plugin. We were leaking the extended operation request data and response data for range requests as well as an attribute value for ADD operations when checking for the magic value.
* Add missing paran from fix for bug 518084Nathan Kinder2009-12-161-1/+1
| | | | | The fix for bug 518084 was missing a paran on one line of source for the pblock functions. This corrects the syntax error.
* Document SLAPI DN related functions.Nathan Kinder2009-12-151-8/+913
| | | | | This patch adds Doxygen comment blocks for the DN related functions in slapi-plugin.h.
* Bug 518084 - Fix out of order retro changelog entriesNathan Kinder2009-12-154-6/+36
| | | | | | | | | | | | | | | | | When using the retro changelog plugin, post-op plugins that perform internal operations (such as memberOf) can result in the internal operation preceeding the original operation in the changelog. The fix is to give the retro changelog a higher precedence than the other post-op plugins. This required some core server changes to be made around the plugin precedence to allow an object plugin to pass it's precedence into it's calls to slapi_register_plugin() when it registers other plugin types. I added an update LDIF to set the plugin precedence when running "setup-ds.pl -u". I also noticed an AVC when restarting after the update due to the schema.bak directory that is created. I've adjusted the dirsrv SELinux policy to deal with this AVC.
* Set unknown attribute syntax to Octet String.Nathan Kinder2009-12-113-5/+5
| | | | | | | | | | | When an unknown attribute type is used (when adding an entry using the extensibleObject objectclass for example), the syntax of the attribute defaults to "Directory String". This places syntax restrictions on the attribute, limiting the attribtues use to specific types of values. This patch changes the syntax for unknown attribute to "Octet String", which allows 0 or more UTF-8 bytes. This will allow unknown attributes to store binary or empty values.
* Bug 497556 - LDAPI connections cause TCP performance degradationNathan Kinder2009-12-091-0/+1
| | | | | | | | | | If a slot from the connection table had previously been used for an LDAPI connection, it would cause serious performance degradation (20 times worse on my system) to a TCP connection that reused the same slot. The problem was that we were not clearing the flag that indicates that a connection is a UNIX local socket in the connection cleanup function. Clearing this flag makes the reused slots perform as expected.
* Bug 195302 - Fix crash regression from previous fixNathan Kinder2009-12-071-1/+1
| | | | | | The previous fix for bug 195302 caused a crash during import. We need to check if sdn is NULL before trying to get the dn member from it in pw_encodevals_ext().
* Bug 201275 - Make SASL EXTERNAL bind obey account lockNathan Kinder2009-12-021-0/+12
| | | | | | | | This patch makes SASL EXTERNAL binds obey the account lock. The previous code was allowing the bind through even if the account was locked. This patch was contributed by Ulf Weltman of Hewlett Packard.
* Bug 193297 - Call bind pre-op and post-op plug-ins for SASL bindsNathan Kinder2009-12-022-2/+33
| | | | | | | This patch makes SASL binds call the pre-op and post-op plug-ins. The previous code was not calling the plug-ins for SASL binds. This fix was contributed by Ulf Weltman of Hewlett Packard.
* Bug 195302 - Allow fine-grained password storage scheme to be setNathan Kinder2009-12-016-32/+117
| | | | | | | | | This patch makes the server use the password storage scheme set in the appropriate fine-grained password policy (if it is set). The previous code was always using the global storage scheme. This fix was based off of a fix contributed by Ulf Weltman of Hewlett Packard.
* Add bounds checking in DN unescape functionNathan Kinder2009-11-181-2/+4
| | | | | | | My previous patch for bug 504817 could cause us to read past the end of the RDN string if it ended with a single escape character. This fix adds a bounds check to ensure that we don't read past the end of the string.
* Avoid freeing NULL trimmed passwords listNathan Kinder2009-11-161-9/+9
| | | | | | My previous patch for removing the fixed length buffer used in the password history checking code introduced a problem where we could attempt to free a NULL pointer.
* Bug 515329 - Correct attribute value inconsistency on replicaNathan Kinder2009-11-161-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When performing operations with multiple mods to the same multi-valued attribute on a single modify operation, a replica was not resolving the attribute values correctly. This would lead to an inconsistency between the master the change was initially performed against and the replicas. The problem would occur with a modify operation such as this: dn: uid=testuser,dc=example,dc=com changetype: modify add: cn cn: 2 - replace: cn cn: 3 The problem is that we use the CSNs from the attribute state data to determine which values should remain after the operation (this is done to merge with later occuring changes from other masters). The CSN for all mods within the same modify operation is exactly the same. The old code was looking for attributes older than the deletion that occurs as a part of the replace, then deleting those values. This would cause the value of "2" in the above example to remain. Simply changing this comparision to look for values with the same or older CSN to delete would cause the new value of "3" to be removed as well when we get around to resolving the attribute after the second half of the replace operation. The fix is to use a different CSN comparison when we are removing all values of an attribute during attribute resolution (remove values with the same or older CSN). This is safe becuse the only present values at this time are older values or values added in a previous mod in the same modify operation. When processing other mods that are not removing all values of an attribute, we only want to remove values with a CSN older that that of the current modify operation. This prevents us from removing a newly added value, such as "3" in the example above. This is safe since we resolve the attribute after each mod in the modify operation.
* Implement support for versioning and release engineering procedures - ↵389-ds-base-1.2.5.a1Rich Megginson2009-11-1657-96/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | version 1.2.5.a1 Instead of changing configure.ac AC_INIT for each version change, there is a new file - VERSION.sh. This file also contains support for creating version numbers for pre-releases, and pre-release strings containing git commit hashes. One of the complications is that AC_INIT does not allow you to override the version and package tarname fields. We can override them after the fact everywhere except in config.h. AC_INIT defines the following which we would like to override but cannot: PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_STRING PACKAGE_BUGREPORT Instead, we define DS_ versions of these e.g. DS_PACKAGE_VERSION etc. and make these available with AC_DEFINE(DS_PACKAGE_VERSION,...) etc. As an extra added precaution, we undefine these in Makefile.am like this: DS_DEFINES = ... \ -UPACKAGE_VERSION -UPACKAGE_TARNAME -UPACKAGE_STRING -UPACKAGE_BUGREPORT If someone tries to use PACKAGE_VERSION in C code, they will not be able to, and will have to use DS_PACKAGE_VERSION instead. All of the DS code that used PACKAGE_VERSION has been changed to use DS_PACKAGE_VERSION instead. There is a new make target - git-archive - as a convenience for creating source tarballs from git. By default, the source archive will be placed in the build directory - you can specify SRCDISTDIR=/path/to/SOURCES to use an alternate dir (e.g. make SRCDISTDIR=/path/to/rpmbuild/SOURCES git-archive to make a source tarball for rpmbuild) configure will print the branded package name and version Reviewed by: nkinder (Thanks!)
* Bug 504817 - Handle LDAPv2 quoted RDN values correctlyNathan Kinder2009-11-111-28/+26
| | | | | | | | | | | | The bug fix for bug 438139 introduced a regression that causes the server to not handle LDAPv2 quoted RDN values correctly. We were including the '"' characters used to contain an unescaped value in the actual value itself. The proper thing to do is to eliminate any '"' characters that are not escaped when we unescape the value. I have tested this new fix with the oringinal issue from bug 438139 to ensure that it does not introduce a regression for that bug.
* Bug 497199 - Skip dirsync if disconnected during incremental updateNathan Kinder2009-11-101-2/+6
| | | | | | | | | | | If some sort of error occurs during the sending updates to AD phase of an incremental winsync update, we still attempt to send the dirsync control to AD. This can cause spurious error messages to be logged to the errors log stating that we can't send the control since we are not connected to AD anymore. This patch simply skips sending the dirsync control if we encountered an error sending updates to AD.
* 516089 - add dereference search option into ldcltYi Zhang2009-11-104-11/+136
| | | | | | | This option will accept format like "-e deref=derefAttr:attr" to ldclt when "-e esearch" is requested. example: -e esearch -e deref=secretary:mail search will dereference the "secretary" attribute and then return the "mail" attribute value
* Bug 511112 - Eliminate fixed length array in password history code.Nathan Kinder2009-11-091-12/+34
| | | | | | | | | | | | | | | The password history code was using a fixed length array to store the historical password values that are used to compare to the new password. The array was hardcoded to 25 values. The server will allow a maximum 24 password history values to be kept by limiting the passwordInHistory configuration value, though it would be possible to do something such as import an LDIF with more than 24 historical password values in an entry, causing the server to crash when the next password change occurs. This patch eliminates the fixed length array and dynamically allocates the array based off of the number of values that exist in the entry whose password is being modified.
* 387681 - Fix errors in mapping AD tombstonesNathan Kinder2009-11-061-4/+7
| | | | | | | | | | | | | | | The AD tombstone mapping code is not behaving correctly if a cn contains a comma (such as a "last, first" type value). The code is supposed to locate the first ":" in the tombstone DN, then scan for the first "," after that. Everything between is the GUID. The problem is that the code is starting at the beginning of the string when searching for the "," instead of starting at the ":" that was previously found. This causes the "," in the cn to be found instead, which makes us fail to find the GUID. The fix is to simply start searching for the "," from the ":" in the tombstone DN.
* Allow plugin execution order to be definedNathan Kinder2009-11-045-10/+103
| | | | | | | | | | | | | | | | | | This patch adds support for assigning a precedence to each plugin. This precedence value is used to determine what order the plugins should be called in within a given plugin type. The precedence value is an integer between 1 and 99. The value is set in the nsslapd-pluginPrecedence attribute in a plugin config entry in "cn=config". If a plugin does not have a precedence value set, the plugin is treated as if it has a precedence of 50. For more details, see the feature design document at: http://directory.fedoraproject.org/wiki/Plugin_Ordering I also removed an incorrect log message in the linked attrs plugin that I noticed while debugging this patch.
* 459181 - Add attreplacefile option to ldcltYi Zhang2009-11-025-12/+362
| | | | | | This option will accept format like "-e attreplacefile=jpegPhoto:/some/binary.file" to ldclt. The content of the given file will be used to replace the attribute "jpegPhoto" (in this case). The given file could be plain text or binary file.
* BZ 221905 - Add SMD5 password storage support.Nathan Kinder2009-10-266-39/+272
| | | | | | | This adds SMD5 password storage support to the existing password storage plug-in. Add upgrade LDIF has been added to ensure that this new functionality will be available to servers that are upgraded from previous versions.
* more updates - add missing rundir - remove ldapiautodnsuffix389-ds-base-1.2.3Rich Megginson2009-10-071-1/+1
| | | | | | | | | | | | | | Some older releases did not have nsslapd-rundir - upgrading from those releases will cause the server not to start - we must add nsslapd-rundir if it is missing We also got rid of nsslapd-ldapiautodnsuffix, so remove that from the config - it doesn't hurt anything to leave it, but the error message is annoying I also added back a mostly truncated version of 28pilot.ldif because some apps still use pilotObject - those apps should change to use a different objectclass ASAP. Tested on Fedora 11 i386 and x86_64 Reviewed by: nkinder (Thanks!)
* Allow anonymous bind resource limits to be set.Nathan Kinder2009-10-054-3/+53
| | | | | | | | | | | | | This patch adds a new config setting named nsslapd-anonlimitsdn that one can set to the DN of an entry containing the bind-based resource limit attributes to use for operations performed by an anonymous user. This allows the defaults to still be used for all other actual bound users who do not have any user specific resource settings. This implementation approach allows any resource limits that are registered via the reslimit API to work with this anonymous limits template entry.
* Add ssf bind rule to access control plug-in.Nathan Kinder2009-10-0210-19/+225
| | | | | | | | | | | This patch adds a new ssf bind rule keyword to the access control plug-in. This allows you to write ACIs that require a specific level of encryption for the rule to apply. The new keyword can be used with '=', '!=', '<', '>', '<=' and '>=' comparators. I added code that stores the SSF in effect for an operation into the operation struct. The value that we store is the higher of the two between the SASL SSF and the SSL/TLS SSF.
* Add minimum SSF settingNathan Kinder2009-09-3010-4/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new configuration setting to the cn=config entry named nsslapd-minssf. This can be set to a non-negative integer representing the minimum key strength required to process operations. The default setting will be 0. The SSF for a particular connection will be determined by the key strength cipher used to protect the connection. If the SSF used for a connection does not meet the minimum requirement, the operation will be rejected with an error code of LDAP_UNWILLING_TO_PERFORM (53) along with a message stating that the minimum SSF was not met. Notable exceptions to this are operations that attempt to protect a connection. These operations are: * SASL BIND * startTLS These operations will be allowed to occur on a connection with a SSF less than the minimum. If the results of these operations end up with a SSF smaller than the minimum, they will be rejected. Additionally, we allow UNBIND and ABANDON operations to go through. I also corrected a few issues with the anonymous access switch code that I noticed while testing. We need to allow the startTLS extended operation to go through when sent by an anonymous user since it is common to send startTLS prior to a BIND to protect the credentials. I also noticed that we were using the authtype from the operation struct to determine is a user was anonymous when we really should have been using the DN. This was causing anonymous operations to get through on SSL/TLS connections.
* SASL IO sometimes loops with "error: would block"Rich Megginson2009-09-292-15/+31
| | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=526319 Resolves: bug 526319 Bug Description: SASL IO sometimes loops with "error: would block" Reviewed by: nkinder (Thanks!) Fix Description: The semantics for recv() are that it returns -1 for errors, 0 for connection closed, and non-zero for some bytes received. The sasl code was not using those semantics - it was returning 0 for successful read and -1 for error. Although I have not been able to reproduce the exact failure, what I believe is happening is that the initial read of the packet length in sasl_io_start_packet() works, and the sasl IO is received. At some point, the connection is closed by the client, and the PR_Recv return of 0 is not handled correctly, and somehow the errno gets set to EWOULDBLOCK. From this point on, PR_Recv() will return -1 (since the socket has been closed) and errno is not reset from EWOULDBLOCK. The fix is to make sure the sasl IO code handles the PR_Recv() return value correctly. Note that with CONNS (8) error log level, you may still occasionally see "would block" errors, but as long as they are not endlessly repeating, this should be ok. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* 525007 ldif2db replaces existing modify/create name and timestampsNoriko Hosoi2009-09-251-7/+12
| | | | | | | | | | | | | | | | | | | | | Fix contributed by Ulf Weltman (ulf.weltman@hp.com) Description From Ulf Weltman (ulf.weltman@hp.com) In previous releases, if LDIF being imported contained createTimestamp, creatorsName, modifyTimestamp, or modifiersName, those values would be kept in the imported entries. BZ# 462922 added code to insert those attributes during import but it clobbers any values existing in the LDIF being imported. I think the imported values should take precedence, this would be useful during migration for example. If anyone wants to take advantage of the new behavior where the server provisions new values, they can strip out the values from the LDIF before importing or they can set nsslapd-exclude-from-export to not export those attributes before importing. See also https://bugzilla.redhat.com/show_bug.cgi?id=525007 Reviewed by richm, nkinder, and nhosoi
* Bitwise Plugin: Bitwise filter doesn't return except the first entry if its ↵Rich Megginson2009-09-251-5/+9
| | | | | | | | | | | | | | multi-valued http://bugzilla.redhat.com/show_bug.cgi?id=518514 Resolves: bug 518514 Bug Description: Bitwise Plugin: Bitwise filter doesn't return except the first entry if its multi-valued Reviewed by: nhosoi (Thanks!) Fix Description: Get the values as a char ** - look through each one until we find one that matches. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Allow anonymous access to be disabled.Nathan Kinder2009-09-245-4/+72
| | | | | | | | | | | This adds a new config switch (nsslapd-allow-anonymous-access) that allows one to restrict all anonymous access. When this is enabled, the connection displatch code will only allow BIND operations through for an unauthenticated user. The BIND code will only allow the operation through if it's not an anonymous or unauthenticated BIND. I also fixed a missing capability in the SELinux policy that I ran into while testing this patch.
* MODIFY/replace with empty values does not ignore missing or unknown attributesRich Megginson2009-09-241-2/+5
| | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=516305 Resolves: bug 516305 Bug Description: MODIFY/replace with empty values does not ignore missing or unknown attributes Reviewed by: nhosoi (Thanks!) Fix Description: The function mods_have_effect() did not work correctly. It would set the flag have_effect = 0 the first time a type was not found. Then if a subsequent mod would apply, it would still return have_effect = 0. What it should do is keep looking for all mod types in the list of mods to see if any of them would apply, and return have_effect = 1 if at least one of them would apply. This corresponds to RFC 4511 section 4.6: replace: replace all existing values of the modification attribute with the new values listed, creating the attribute if it did not already exist. A replace with no value will delete the entire attribute if it exists, and it is ignored if the attribute does not exist. So the proper behavior is to ignore attributes that do not exist, and to apply the rest. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* empty principal name used when using server to server sasl for db chainingRich Megginson2009-09-231-3/+6
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=513308 Resolves: bug 513308 Bug Description: empty principal name used when using server to server sasl for db chaining Reviewed by: nhosoi (Thanks!) Fix Description: Change the logic to check if the username is a valid principal name. A valid principal name in this context will be a non-empty string that does not contain the '=' character (which will be a bind DN in this context). Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Should not attempt to pop SASL IO layer if not using SASL IORich Megginson2009-09-232-2/+13
| | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=519455 Resolves: bug 519455 Bug Description: Should not attempt to pop SASL IO layer if not using SASL IO Reviewed by: nkinder (Thanks!) Fix Description: Before attempting to pop the SASL IO layer from the prfd, first make sure we are using sasl IO, the prfd is not NULL, and the prfd has a SASL IO layer on it. This also fixes a bug with setting nsslapd-localhost in the bootstrap code - if you are using a system that does not have DNS configured correctly, you may want to force the SASL code to use the nsslapd-localhost for the FQDN. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* logs created at startup can get wrong file modeRich Megginson2009-09-231-10/+38
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=518279 Resolves: bug 518279 Bug Description: logs created at startup can get wrong file mode Reviewed by: nkinder (Thanks!) Fix Description: Try to apply the mode using chmod() if a log file has been specified. If and only if the log file has not been set, or if the chmod() succeeds, apply the changes to the internal config. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Add SELinux policy for ldap-agent.Nathan Kinder2009-09-173-20/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds SELinux policy to confine the SNMP subagent (ldap-agent). There were some changes required around the aubagent to make it work in a more standard fashion. I moved the ldap-agent binary and wrapper to sbindir. It was previously in bindir, yet it is not a user command. The location really should be sbindir per FHS. I added init scripts for the subagent, so it can now be managed using "service dirsrv-snmp [start|stop|restart|condrestart|status]". While doing this, I found that the parent process was exiting with 1 on success instead of 0, so I fixed that. I added a default config file for the subagent as well. When using the init script, the config file is hardcoded into this standard location. Having this config template should also hopefully cut down on configuration errors since it's self documenting. The pid file location was also changed to go into /var/run per FHS. Previously, it was written to the same directory as the log file. There are a few notes in the policy .te file about some bugs that we are working around for now. These bugs are mainly minor issues in the snmp policy that is a part of the selinux-policy pacakge. Once those bugs are fixed, we can clean our policy .te file up.
* Add EntryUSN to the nsslapd-exclude-from-export listNoriko Hosoi2009-09-031-1/+1
| | | | See also http://directory.fedoraproject.org/wiki/Entry_USN#Standalone.
* 516089 RFE: ldclt utility should support new dereferencing control searchesNoriko Hosoi2009-09-014-46/+158
| | | | | | | | | | | | | | Adding "-e deref" option to ldclt. Add mode (-e add): "-e deref" adds "secretary: <DN>" to the entry. This is true when the entry's objectclass is inetOrgPerson (-e inetOrgPerson"). Search mode (-e esearch): "-e deref" sets dereference control to the search, where the dereference attribute and dereferenced attribute are hardcoded to "secretary" and "cn", respectively. Usage: ldclt [...] -e add -e random -e inetOrgPerson -e deref -f test_XX ldclt [...] -e esearch -e random -e inetOrgPerson -e deref -f test_XX
* Clean up build warningsRich Megginson2009-08-316-7/+7
| | | | | | | | | | | | | | | This cleans up the following warnings: ds.git/ldap/servers/slapd/back-ldbm/ldbm_usn.c:102: warning: unused variable 'li' ds.git/ldap/servers/plugins/replication/repl5_agmt.c:1184: warning: too many arguments for format ds.git/ldap/servers/plugins/syntaxes/dn.c:143: warning: unused variable 'val_copy' ds.git/ldap/servers/plugins/syntaxes/deliverymethod.c:264: warning: unused variable 'p' ds.git/ldap/servers/plugins/syntaxes/facsimile.c:269: warning: unused variable 'p' ds.git/ldap/servers/plugins/usn/usn.c:107: warning: value computed is not used ds.git/ldap/servers/plugins/usn/usn.c:263: warning: control reaches end of non-void function ds.git/ldap/servers/plugins/usn/usn.c:525: warning: control reaches end of non-void function The only one I'm not sure about is changing usn_get_attr to always return a 0 - please review that usage. With these fixes, I only see the llu and lld format warnings on RHEL5 with the default rpmbuild compiler flags. Reviewed by: nhosoi (Thanks!)