summaryrefslogtreecommitdiffstats
path: root/src/plugins/kdb/db2/libdb2/btree
Commit message (Collapse)AuthorAgeFilesLines
* make dependGreg Hudson2013-01-101-1/+1
| | | | | Mostly this gets rid of the trailing space on line 2 after bb76891f5386526bdf91bc790c614fc9296cb5fa.
* Avoid null dereference in BDB dbtree error caseGreg Hudson2012-12-201-3/+3
| | | | | | | | | An error case in __bt_first would deference a null pointer. This is an old upstream BDB bug. Use a separate variable to hold the result of mpool_get() until it has been checked. Reported by Nickolai Zeldovich <nickolai@csail.mit.edu>. ticket: 7511
* Fix "may be used uninitialized" warnings in db2 code, even though allKen Raeburn2011-09-054-8/+9
| | | | | | | such cases appear to be safe. This will permit making uninitialized-variable messages fatal. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25147 dc483132-0cff-0310-8789-dd5450dbe970
* Use for loops for recursion in the Windows build, cutting down on theGreg Hudson2010-11-281-1/+1
| | | | | | | | | verbiage in Makefile.in files. For correctness of output, every Makefile.in mydir= definition is changed to use $(S) instead of /. ticket: 6826 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24536 dc483132-0cff-0310-8789-dd5450dbe970
* Consolidate Makefile variables now that we have only a single globalGreg Hudson2009-11-222-4/+2
| | | | | | | | | | | | | configure script: $(SRCTOP) --> $(top_srcdir) $(srcdir)/$(thisconfigdir) --> $(top_srcdir) $(thisconfigdir) --> $(BUILDTOP) $(myfulldir) --> $(mydir) ticket: 6583 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23308 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-313-7/+7
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* Rename db2 header files db.h and db-config.h in the source tree, soKen Raeburn2009-08-211-53/+33
| | | | | | | | | | | | | | | | | that there will always be only one version of each name in the include path (namely, the copy made in the build tree, or the generated db.h if not using the in-tree one). This should fix some minor problems with different dependency lists generated on different systems. Sort and uniquify dependency header names before doing substitutions, as well as after. Look for the db2 headers listed in sorted order. Don't copy db-ndbm.h into the build tree; let libdb2 find it from the source tree only. Update dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22572 dc483132-0cff-0310-8789-dd5450dbe970
* make dependSam Hartman2009-03-161-39/+46
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22098 dc483132-0cff-0310-8789-dd5450dbe970
* move generated dependencies out of Makefile.inKen Raeburn2009-01-052-78/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move automatically-generated dependencies into separate files in the source tree, and take the data out of Makefile.in. Keep the "make depend" rules for stripping out the dependencies from Makefile.in, in case some optional directories were missed, but everything that builds on my UNIX build has been converted. (Converting a directory just requires creating an empty "deps" file so that config.status can build the makefile, and then later running "make depend" in that directory to get the correct content for it.) Change configure scripts to incorporate the "deps" file when building each Makefile. This change requires the existence of a file "deps" in each source directory where we build a makefile, even if there are no sources for which to compute dependencies; a switch to GNU make would let us conditionalize that, but we can assess that later. Update dependencies for the generate Makefile itself to list the deps file. This will also require some minor tweaking of the Windows build, to make it incorporate the new deps file. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21701 dc483132-0cff-0310-8789-dd5450dbe970
* make dependSam Hartman2008-12-021-39/+46
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21266 dc483132-0cff-0310-8789-dd5450dbe970
* more tests for libdb btree page split on zero indexTom Yu2008-02-071-1/+2
| | | | | | | | | | | | | | | | | | | | Enhance btree debugging output somewhat to limit key printout to the key length if the key is not null-terminated. Add additional test case for the zero-index page split bug; test case can create a corrupted btree database with records unreachable by random access but reachable by sequential access. Requires recompiling with CPPFLAGS='-DDEBUG -DDEBUG_IDX0SPLIT' to correctly model mpool page reuse that would be present in production conditions. (CPPFLAGS=-DDEBUG would otherwise explicitly overwrite the contents of reused pages.) ticket: new target_version: 1.6.4 tags: pullup component: krb5-kdc git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20222 dc483132-0cff-0310-8789-dd5450dbe970
* libdb btree page split on zero index corrupts dbTom Yu2008-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | Splitting a btree page on index 0 can corrupt the database if the key length plus data length is exactly a certain value. This certain size causes the item to get the left page to itself, and causes the right page to contain an erroneous additional index "hole" having an uninitialized value. This bug may be one of the remaining causes of unexplained database corruption reported over the years. Shawn Emery provided useful data from actual instances of this corruption. Add a test case for this bug. (Raw libdb test rather than kdb; the latter would be much harder.) ticket: new target_version: 1.6.4 tags: pullup component: krb5-kdc git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20214 dc483132-0cff-0310-8789-dd5450dbe970
* Set close-on-exec flag in most places where file descriptors areKen Raeburn2007-10-222-46/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | opened in our libraries (in case another application thread spawns a new process) and in the KDC programs (in case a plugin library spawns a new process). Checked calls to: open fopen THREEPARAMOPEN mkstemp socket accept dup dup2 pipe. In: util lib plugins kdc kadmin/server krb524. The various programs are less critical than the libraries, as any well-written plugin that spawns a new process should close all file descriptors it doesn't need to communicate with the new process. This approach also isn't bulletproof, as the call to set the close-on-exec flag is necessarily a separate call from creating the file descriptor, and the fork call could happen in between them. So plugins should be careful regardless of this patch; it will only reduce the window of potential lossage should a plugin be poorly written. (AFAIK there are currently no plugins that spawn processes where this would be a problem.) Update dependencies. ticket: 5561 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20143 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2007-07-271-39/+46
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19737 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid unchecked sprintf in some KDC-side programsKen Raeburn2007-07-121-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19705 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2007-07-101-46/+39
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19688 dc483132-0cff-0310-8789-dd5450dbe970
* Configure libdb2 in top-level configure scriptKen Raeburn2007-06-201-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19606 dc483132-0cff-0310-8789-dd5450dbe970
* Add the libdb2 type-existence tests to the top-level configure script.Ken Raeburn2007-06-201-44/+54
| | | | | | | | | | | Replace the generated header files in db2 with static ones that include autoconf.h and make decisions based on the macros defined there. Omit some tests that test for things we assume now, like "const" working and "size_t" being defined. Update dependencies. The libdb2 configure script now generates no header files. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19605 dc483132-0cff-0310-8789-dd5450dbe970
* Use k5-platform.h instead of local configure to find mkstempKen Raeburn2007-06-202-4/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19604 dc483132-0cff-0310-8789-dd5450dbe970
* Add 'make depend' capability, and dependenciesKen Raeburn2007-06-201-0/+67
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19603 dc483132-0cff-0310-8789-dd5450dbe970
* set AUTOCONF_HEADERKen Raeburn2006-12-131-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18947 dc483132-0cff-0310-8789-dd5450dbe970
* Always zap newly allocated pages, intead of conditional on PURIFY.Ken Raeburn2006-10-131-1/+1
| | | | | | | Minor performance penalty; c'est la vie. Better to be able to run purify or valgrind or whatever on the binaries we actually use. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18698 dc483132-0cff-0310-8789-dd5450dbe970
* autoconf 2.60 compatibilityKen Raeburn2006-06-281-1/+1
| | | | | | | | | | | Change all file substitutions so that @-patterns start at the beginning of their lines, as now required by autoconf 2.60 (released Monday). ticket: new target_version: 1.5 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18249 dc483132-0cff-0310-8789-dd5450dbe970
* Rename "modules" to "plugins", and fix up makefile variables etcKen Raeburn2005-12-1717-0/+5475
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17565 dc483132-0cff-0310-8789-dd5450dbe970