summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/tools
Commit message (Collapse)AuthorAgeFilesLines
* OpenLDAP supportcleanupRich Megginson2009-07-079-103/+262
| | | | | | | | | | 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.
* Use thread aware library for complex regex searchesNoriko Hosoi2009-05-281-5/+5
| | | | | | | | 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.
* Fix various compiler warningsRich Megginson2009-05-191-0/+1
| | | | | | | | | | | | | | | | | | 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!)
* 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: 470611Nathan Kinder2009-01-293-15/+53
| | | | Summary: Enhanced rsearch to allow user filter and password to be configurable (contributed by telackey@bozemanpass.com).
* Resolves: #471138Noriko Hosoi2008-11-175-32/+221
| | | | Summary: LDCLT: add abandon to ldclt
* Resolves: #466702Noriko Hosoi2008-10-151-2/+2
| | | | | Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research
* Bug Description: Need to address 64-bit compiler warnings - part 1Rich Megginson2008-10-088-34/+32
| | | | | | | | | | | | | | | | | | | | | 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: bug 416721Rich Megginson2007-12-081-1/+3
| | | | | Descriptionn: fedora-ds-base build problem Fix Description: Correct usage of va_list and vfprintf
* Resolves: #345671Noriko Hosoi2007-11-281-14/+32
| | | | | | Summary: clu test failures (Comment #7) Description: 1) Removing obsolete PATH info from Usage 2) Replacing "idl" with "ID list" following the suggestion from Doc.
* Resolves: bug 367721Rich Megginson2007-11-141-1/+1
| | | | | | | | | | | Bug Description: dbgen.pl uses incorrect perl interpreter on hpux Reviewed by: nhosoi (Thanks!) Fix Description: Set @perlexec@ to the correct platform specific perl location. 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: #336871Noriko Hosoi2007-10-181-1/+1
| | | | | | Summary: infadd tool won't start. Fails to load data file (comment #4) Description: HP compiler does not like to have a function call in a constant expression.
* Resolves: 336871Nathan Kinder2007-10-181-9/+3
| | | | Summary: Look for infadd data files in TEMPLATEDIR.
* Resolves: #188320Noriko Hosoi2007-10-185-11/+11
| | | | Summary: HP-UX: warnings reported by the HP-UX compiler
* Resolves: 304191Nathan Kinder2007-09-241-1/+36
| | | | Summary: Make dbscan handle special RUV related changelog entries.
* 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: bug 251549FedoraDirSvr110b1_20070813Rich Megginson2007-08-131-1/+1
| | | | | | | | | | 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: #250347Noriko Hosoi2007-08-013-5/+18
| | | | | Summary: rsearch - make search timeout a configurable parameter Description: Introduced a new option "-o <search time limit>"
* Resolves: bug 248272Rich Megginson2007-07-161-6/+7
| | | | | | Description: CLU: dbgen.pl fails to load data files Reviewed by: nhosoi (Thanks!) Fix Description: dbgen.pl is hardcoded to look for data files in ../data. Instead, we should allow the user to provide the location to the data files e.g. -l /path/to/data, and we should also use share/brand-ds/data as the default directory.
* 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: bug 237356Rich Megginson2007-06-191-29/+65
| | | | | | | | | | | | | | Description: Move DS Admin Code into Admin Server - ldif templates, pwdhash Reviewed by: nhosoi (Thanks!) Fix Description: These changes are primarily to allow the admin server setup to run completely in perl with no more setuputil code. 1) Added LDIF templates for DS config. template-dse.ldif is the core minimal directory server configuration. Values can be replaced with parameters in the same style as used with register_server.pl - %token%. For the plugin entries, the plugin shared library name is now just a name. There is no more full path. The code in dynalib.c handles this case by using the compiled in PLUGINDIR. The NSPR function PR_GetLibraryName knows the correct shared lib suffix for the platform. All of this allows us to do 2). 2) Added ability to run pwdhash with no server configuration. If no configuration is given, it uses the template-dse.ldif above. And instead of having to worry about where the plugins are installed and the shared lib suffix, it just depends on the above changes. This allows us to generate password hashes during setup before the directory server instance is created, and also to keep clear text password usage to a minimum. 3) Added defaultuser and defaultgroup. 4) Added support for continuation lines in Inf files. 5) All user visible messages during setup should be localizable Platforms tested: RHEL4 Flag Day: Yes, autotool file changes. Doc impact: Yes, along with the previous fixes for this bug.
* Resolves: 240583Nathan Kinder2007-06-089-78/+845
| | | | Summary: Added SASL support to ldclt as well as some thread-safety fixes for ns-slapd when using SASL.
* Resolves: #237040Noriko Hosoi2007-04-193-509/+0
| | | | Summary: Remove obsolete makefiles
* Resolves: bug 231905Rich Megginson2007-03-161-10/+35
| | | | | | | | | | | | | | Bug Description: migration: Migrate from 1.0.x to 1.1 Reviewed by: nhosoi (Thanks!) Fix Description: The basic strategy is 1) shutdown the old servers - databases should be quiescent 2) run the migration script - this will copy all of the files (under /opt/fedora-ds/slapd-* by default) to their new FHS style locations, and fix up any entries and attributes that are obsolete or have changed (e.g. values that refer to paths) 3) service fedora-ds start The migration script does not need to do anything to the database files - the new database code added by Noriko will handle the database upgrade automagically, but I'm leaving the database upgrade code in the script, commented out, in case we need it in the future. This also fixes an annoying problem with automake - it would build ds_newinst.pl from ds_newinst.pl.in in the source ldap/admin/src directory, and use that version. This is really a problem with multi platform builds, where you want to share the ldapserver source code among multiple platforms. With the fix, built/ldap/admin/src/ds_newinst.pl is generated from srcdir/ldap/admin/src/ds_newinst.pl.in, and srcdir/ldap/admin/src/ds_newinst.pl is not written. Platforms tested: FC6 Flag Day: no Doc impact: Yes - we need to document migration
* Resolves: 230458Nathan Kinder2007-02-281-2/+36
| | | | Summary: Corrected out of date licensing/copyright block in a few files.
* Resolves: #214533Noriko Hosoi2006-11-1041-2/+210
| | | | | | | | | | Summary: configure needs to support --with-fhs (Comment #6) Changes: Added the following include next to the end of the copyright block. + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif +
* Resolves: #214728Noriko Hosoi2006-11-102-2/+0
| | | | | Summary: Cleaning up obsolete macros in the build Changes: eliminated macro NSPR20 (Comment #9)
* Resolves: #210947Noriko Hosoi2006-10-253-6/+6
| | | | | Summary: parameterizing the hardcoded paths (phase 3. installed binaries, change log, setup) Comment #23
* [207427] parameterizing the hardcoded paths (Comment #15)Noriko Hosoi2006-09-271-5/+5
| | | | phase 1. parameterizing config, schema and ldif directory
* 204517 - Use new ber types throughout the server code.Nathan Kinder2006-08-311-1/+1
|
* 204410 - Pick up new ldapcsdk, nspr, and sasl componentsNathan Kinder2006-08-283-7/+8
|
* Bug(s) fixed: 186280Rich Megginson2006-04-115-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [170348] RSEARCH needs to be updatedNoriko Hosoi2006-01-281-8/+12
| | | | | Fixed the broken build (64-bit). LDFLAG (set in the tools/Makefile) was not passed to rsearch and ldclt.
* [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
* Added copyrights.Noriko Hosoi2006-01-1114-47/+443
|
* [164596] LDCLT distributed with Directory ServerNoriko Hosoi2006-01-1140-1/+15933
| | | | integrated ldclt from DSRK into the DS source tree.
* [170348] RSEARCH needs to be updatedNoriko Hosoi2006-01-0619-2/+25853
| | | | Integrating rsearch and infadd source codes from DSRK into the Directory Server build tree.
* [Bug 166632] dbscan: not to truncate the entry even if it is larger than BUFSIZNoriko Hosoi2005-08-251-258/+292
| | | | | | By default, it dumps the entire entry. (it used to be truncated at the BUFSIZ size). In case no need to dump the entire entry, introduced the truncate option "-t".
* Fixed licensing typoNathan Kinder2005-04-199-9/+27
|
* HP-UX IPF Porting changesNathan Kinder2005-04-181-0/+4
|
* 155068 - Added license to source filesNathan Kinder2005-04-159-0/+270
|
* [154288] usage cleanupNoriko Hosoi2005-04-091-149/+173
|
* [Bug 153306] dbscan of changelog files core dumps on Solairs 64 bit builds.Noriko Hosoi2005-04-041-6/+13
| | | | The width of time in changelog is always 4 bytes.
* 1) clu dbscan test passes file type option(s) (-e -- entry file, -i -- index ↵Noriko Hosoi2005-04-011-3/+71
| | | | | | file, -c -- changelog file) for any type of files, which could sometimes crashes the command. To prevent it, introduced a simple file type checker and reset the file type if it does not match the real type. 2) key search was not working when the key has multiple values.
* Revised the usage string.Noriko Hosoi2005-04-011-1/+1
|
* fixed a bug on the static variable introduced by the previous commit.Noriko Hosoi2005-04-011-2/+6
|
* [151835] dbscan grows up to 900MB+ and hangs with -i and -l <large value> ↵Noriko Hosoi2005-03-311-12/+44
| | | | | | | | options 1) if "max length of dumpled id list" is larger than 1 MB, it reduces it to 1 MB. 2) if "max length of dumpled id list" is less than 40B, it increases it to 40B. 3) if the idl is not dumpled in the MAX_BUFFER size buffer, it repeats till the dump is done.
* remove ns_usedb.mkRich Megginson2005-03-181-1/+0
|
* This one is mostly strcpy/strcat checking, checking for null strings before ↵Rich Megginson2005-03-111-2/+2
| | | | strlen, removing some dead code, other odds and ends.