summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/tools/ldclt
Commit message (Collapse)AuthorAgeFilesLines
* Bug 630092 - (cov#12116) Resource leak in ldclt codeNathan Kinder2010-09-171-5/+13
| | | | | | There is a chance that we leak the memory pointed to by the new variable if we never have one of the ldclt contexts point to it. We need to jump to the error label in this case to free the memory.
* openldap - add support for missing controls, add ldif api, fix NSS usageRich Megginson2010-08-311-10/+26
| | | | | | | | | | | Added proxy auth control creation - mozldap has a function to do that but not openldap Do not use mozldap filter create function - just create one using slapi_smprintf Fix usage of TLS/SSL with new NSS functionality Created ldif parse wrapper - changed code to use it Reviewed by: nkinder (Thanks!) Platforms tested: Fedora 14 (rawhide)
* Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-1/+9
| | | | | | | | | 12167 - 12199 https://bugzilla.redhat.com/show_bug.cgi?id=610119 Resolves: bug 610119 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199 Fix description: Catch possible NULL pointer in readAttrValue().
* Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136Endi S. Dewata2010-08-201-3/+18
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=616500 Resolves: bug 616500 Bug description: fix coverify Defect Type: Resource leaks issues CID 12116 description: Fixed resource leaks in scalab01_addLogin().
* Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136Endi S. Dewata2010-08-201-7/+12
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=616500 Resolves: bug 616500 Bug description: fix coverify Defect Type: Resource leaks issues CID 12115 description: Fixed resource leaks in readObject().
* Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136Endi S. Dewata2010-08-201-5/+23
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=616500 Resolves: bug 616500 Bug description: fix coverify Defect Type: Resource leaks issues CID 12114 description: Fixed resource leaks in buildNewModAttribFile().
* Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136Endi S. Dewata2010-08-201-19/+31
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=616500 Resolves: bug 616500 Bug description: fix coverify Defect Type: Resource leaks issues CID 12112, 12113 description: Fixed resource leaks in loadImages() and loadDataListFile().
* Bug 622628 - fix coverity Defect Type: Integer handling issuesNoriko Hosoi2010-08-101-1/+3
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622628 Comment: This is a typo where a bitwise AND was used instead of a logical AND on line 2185. The issue is not serious, as it only affect the "number of operations" counter for ldclt. The second half of the condition is not even needed in fact, since we are guaranteed that "(ret == LDAP_ALREADY_EXISTS)" is true at line 2185. Fix Description: Based upon the comment, removing the unnecessary second half of the condition.
* Bug 614242 - C99/ANSI C++ related compile errors on HP-UXRich Megginson2010-07-141-7/+7
| | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=614242 Resolves: bug 614242 Bug Description: C99/ANSI C++ related compile errors on HP-UX Reviewed by: rmeggins Branch: HEAD Fix Description: In lib/ldaputil/vtable.c, a global static struct is declared and initialized to {}. I see gcc allows this, and aCC does also but only with -AA ("newly supported ANSI C++ Standard features"). In ldap/servers/slapd/tools/ldclt/ldclt.c, an array size is set using a variable, which I think is legal in C99. Since the size is not computed, and this is the only place C99 is taken advantage of, this can be changed to a then I would instead add the -AC99 compiler flag for HP-UX. Platforms tested: HP-UX Flag Day: no Doc impact: no Patch submitted by: Ulf Weltman <ulf.weltman@hp.com>
* Bug 610177 - fix coverity Defect Type: Uninitialized variables issuesRich Megginson2010-07-061-1/+1
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610177 Resolves: bug 610177 Bug Description: fix coverity Defect Type: Uninitialized variables issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: Initialize variables to 0, NULL, or an appropriate error code. Got rid of the unused lexer code. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 609590 - fix coverity Defect Type: Memory - corruptions issuesRich Megginson2010-07-011-1/+1
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609590 Resolves: bug 609590 Bug Description: fix coverity Defect Type: Memory - corruptions issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: The code wants to allocate space for a struct berval, not struct berval *. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Update to New DN FormatNoriko Hosoi2010-04-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Description: . adding slapi_dn_normalize_ext and its siblings to normalize/validate invalid DNs; deprecating slapi_dn_normalize and its siblings. (dn.c) . replacing slapi_dn_normalize with new corresponding functions. . normalizing hardcoded DNs (e.g., removing spaces around ',') . setting correct DN syntax to nsslapd-suffix, nsslapd-ldapiautodnsuffix, costemplatedn, nsslapd-changelogsuffix, nsBaseDN, nsBindDN . if nsslapd-dn-validate-strict is enabled, incoming DN is examined and rejected if it is invalid. Once approved, the DN is normalized. . fixing compiler warnings and typos. See also: http://directory.fedoraproject.org/wiki/Upgrade_to_New_DN_Format Related bugs: Bug 199923 - subtree search fails to find items under a db containing special characters Bug 567968 - subtree/user level password policy created using 389-ds-console doesn't work. Bug 570107 - The import of LDIFs with base-64 encoded DNs fails, modrdn with non-ASCII new rdn incorrect Bug 570962 - ns-inactivate.pl does not work Bug 572785 - DN syntax: old style of DN <type>="<DN>",<the_rest> is not correctly normalized Bug 573060 - DN normalizer: ESC HEX HEX is not normalized Bug 574167 - An escaped space at the end of the RDN value is not handled correctly
* cleanup build warningsRich Megginson2010-03-081-0/+1
| | | | | | This patch cleans up various build warnings found by compiling the code with -Wall on RHEL5. Reviewed by: nhosoi (Thanks!)
* 565987 - redhat-ds-base fails to build due to undefined structNoriko Hosoi2010-02-173-16/+123
| | | | | | | | | | | | | | st_size and nsldapi_build_control et al. in ldclt.c https://bugzilla.redhat.com/show_bug.cgi?id=565987 Fix Description: 1. stat: sys/types.h and sys/stat.h need to be included. 2. nsldapi_build_control: duplicated nsldapi_build_control from the mozldap c library. 3. added the sub value [=deref:attr] of deref to the usage. 4. allow -e deref without the sub value. It used to be allowed, but it was forbidden by the previous change.
* 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
* 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
* 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.
* 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
* OpenLDAP supportcleanupRich Megginson2009-07-074-95/+228
| | | | | | | | | | These changes allow the server to be built with OpenLDAP (2.4.17+). A brief summary of the changes: * #defines not provided by OpenLDAP were copied into slapi-plugin.h and protected with #ifndef blocks * where it made sense, I created slapi wrapper functions for things like URL and LDIF processing to abstract way the differences in the APIs * I created a new file utf8.c which contains the UTF8 functions from MozLDAP - this is only compiled when using OpenLDAP * I tried to clean up the code - use the _ext versions of LDAP functions everywhere since the older versions should be considered deprecated * I removed some unused code NOTE that this should still be considered a work in progress since it depends on functionality not yet present in a released version of OpenLDAP, for NSS crypto and for the LDIF public API.
* Resolves: #471138Noriko Hosoi2008-11-175-32/+221
| | | | Summary: LDCLT: add abandon to ldclt
* Bug Description: Need to address 64-bit compiler warnings - part 1Rich Megginson2008-10-082-23/+22
| | | | | | | | | | | | | | | | | | | | | Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no
* Resolves: #188320Noriko Hosoi2007-10-182-2/+1
| | | | Summary: HP-UX: warnings reported by the HP-UX compiler
* Resolves: 294301Nathan Kinder2007-09-195-176/+15
| | | | Summary: Don't try to dlopen ldap SSL libs in ldclt.
* Resolves: bug 244475Rich Megginson2007-09-071-3/+3
| | | | | | | | | 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: #246690Noriko Hosoi2007-07-055-6/+117
| | | | | Summary: feature request for ldclt: add randomauthid for testing Description: Adding randomauthid options: -e "randomauthid" -e "randomauthidlow=<low>" -e "randomauthidhigh=<high>"
* Resolves: 240583Nathan Kinder2007-06-086-78/+221
| | | | Summary: Added SASL support to ldclt as well as some thread-safety fixes for ns-slapd when using SASL.
* Resolves: #237040Noriko Hosoi2007-04-191-138/+0
| | | | Summary: Remove obsolete makefiles
* Resolves: #214533Noriko Hosoi2006-11-1020-0/+100
| | | | | | | | | | 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: #210947Noriko Hosoi2006-10-251-3/+3
| | | | | Summary: parameterizing the hardcoded paths (phase 3. installed binaries, change log, setup) Comment #23
* 204410 - Pick up new ldapcsdk, nspr, and sasl componentsNathan Kinder2006-08-281-2/+2
|
* Bug(s) fixed: 186280Rich Megginson2006-04-113-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [164596] LDCLT distributed with Directory ServerNoriko Hosoi2006-01-272-3/+5
| | | | | | Fixed broken build on Solaris. 1) removed redeclared getsubopt in port.h 2) defined _XOPEN_SOURCE 500 for Linux
* [164596] LDCLT distributed with Directory ServerNoriko Hosoi2006-01-1139-0/+15929
integrated ldclt from DSRK into the DS source tree.