summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* path_utils: path_concat should return empty string on ENOBUFSding_libs-0-1Stephen Gallagher2012-03-083-15/+55
| | | | Also clean up the code a bit and add more comments
* path_utils: Handle "/" in path_concatStephen Gallagher2012-03-062-2/+19
|
* path_utils: handle off-by-one error in path_concat()Stephen Gallagher2012-03-062-5/+15
| | | | https://fedorahosted.org/sssd/ticket/1230
* Fixing dereferencing NULLDmitri Pal2011-11-172-2/+71
| | | | | | This is the issue found by Coverity. If the proprty is NULL but type is not there is dereferencing of the NULL veriable in the check.
* Update version numbers for ding-libs 0.1.3 releaseStephen Gallagher2011-09-151-3/+3
|
* Update spec file for newer library versionsStephen Gallagher2011-09-061-10/+5
|
* Bump version for 0.1.3 releaseStephen Gallagher2011-09-062-3/+3
|
* * Resolves: bug #735464 Fix the loop limit used to initialize the table ↵John Dennis2011-09-063-77/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directory, was based on count, now limited to segment_count. * Do not pre-allocate all buckets based on requested table size. This defeats the point of a dynamic hash table which adjusts it's memory usage depending upon the number of items it holds. Pre-allocation also runs afoul of the table contraction logic, if the table is pre-allocated to a large size it will subsequently try to compact it negating the pre-allocation. Now the initial allocation is restricted to one directory segment (i.e. table->segment_count == 1) * If the caller did not specify the directory_bits and segment_bits then compute them from the requested table size. The directory_size and segment_size must be powers of 2 to accmodate fast arithmetic. An optimal maximum number of buckets would be equal to the anticipated table size. If there were no collisions that would mean each item would be located in it's own bucket whose chain length is 1, the item would be immediatly found upon indexing into the bucket table. * There is a requirment there be at least one directory segment, however contract_table() failed to enforce this requirement. Add a check to enforce the requirement. * If hash_create() or hash_create_ex() failed it left the tbl parameter uninitialized but returned an error code. Now upon failure tbl is initialized to NULL as well as returning an error code. * Clean up how the directory and segment sizes were computed. It had been using a loop and shifting 1 bit at a time, now it shifts all the bits in one operation and assures at least one directory and segment are allocated. * In the event of an early exit from hash_create_ex() due to an error make sure all previously allocated resources are cleaned up by calling hash_destroy(). There was only one place this was missing. hash_destroy() blindly assumed the table had a directory, normally it would unless hash_destroy was called due to an early exit in hash_create_ex(). Modify hash_destroy() to check for the existence of the directory before cleaning up the directory contents. * Update the function documentation in dhash.h to explain each parameter of hash_create() and hash_create_ex(). * Enhance dhash_test.c - To output the random seed used to intialize the random number generator and add command line option to set the random seed. This permits recreating a failed test run. - Add command line parameter to set the initial table size. - Use proper string to long conversion routines when reading command line parameters (e.g. strtoul() instead of atoi()) - Add logic to make sure each test value is unique. * Add additional information to the debug output to show the computed directory_bits, segment_bits, sizes, etc. * Adjust the debug_level conditionals to be less verbose.
* Ensure error_string() never returns NULLSumit Bose2011-03-231-1/+12
| | | | | | A Coverity check indicated that ther are platforms where strerror() will return NULL for unknown, e.g. negative error numbers. Chances are that these platforms will have problems with NULL arguments to printf() too.
* Eliminate memory leak on errorStephen Gallagher2011-03-231-0/+2
| | | | Coverity bug 10009
* Fix incorrect allocation checkStephen Gallagher2011-03-231-1/+1
|
* Freeing memory used for source dirDmitri Pal2011-01-031-2/+5
| | | | | | | | I decided not to redo the whole test. It would have been too much work. Just cleaned the code a bit and freed allocated memory. It is Coverity issue 10075.
* Initializing variables in testDmitri Pal2011-01-031-5/+5
| | | | | Addresses coverity issue 10048. Patch should apply to master and 0.1.x.
* Fix typo which makes make prerelease-srpm failSumit Bose2010-12-081-1/+1
|
* Fix license text for several files that should be LGPLv3+Stephen Gallagher2010-11-193-6/+6
| | | | | This is NOT a relicensing. These files were mislabeled. They were always LGPLv3+.
* Update ding-libs version to 0.1.2ding-libs-0.1.2Stephen Gallagher2010-10-121-2/+2
| | | | Increasing dhash version to 0.4.2
* dhash: Allow hash_enter() to update entriesSumit Bose2010-10-122-27/+99
|
* dhash: Fix memory leak in exampleSumit Bose2010-10-121-0/+3
|
* dhash: add stddef.h to dhash.hSumit Bose2010-10-121-0/+1
| | | | | size_t is used in dhash.h and was currently not defined by any included header file.
* Bump version to 0.1.1ding-libs-0.1.1Stephen Gallagher2010-09-231-1/+1
|
* Fix version handling of the librariesSumit Bose2010-09-238-15/+28
|
* Remove unneeded --disable-rpath configure optionSumit Bose2010-09-231-2/+1
|
* Build all of the ding-libs from the rootding_libs-0_1_0Stephen Gallagher2010-09-2241-4359/+650
| | | | | This changes our approach from having independent tarballs to having a single, monolithic tarball for all of the libraries
* ini_config: Adding RPM build targetsref_array-0_1_1path_utils-0_2_1ini_config-0_6_1dhash-0_4_1collection-0_5_1Stephen Gallagher2010-08-183-2/+114
|
* collection: add RPM build targetsStephen Gallagher2010-08-183-2/+115
|
* ref_array: add RPM build targetsStephen Gallagher2010-08-183-2/+111
|
* path_utils: Add targets for RPM buildStephen Gallagher2010-08-183-2/+107
|
* dhash: Add targets for RPM buildStephen Gallagher2010-08-183-2/+116
|
* Update ini for new buildsystemStephen Gallagher2010-08-187-11/+48
|
* Update libcollection with new make environmentStephen Gallagher2010-08-134-7/+4
|
* Update refarray for new build systemStephen Gallagher2010-08-133-4/+6
|
* Update path_utils versionStephen Gallagher2010-08-131-1/+1
|
* Update dhash versionStephen Gallagher2010-08-131-1/+1
|
* Remove toplevel MakefileStephen Gallagher2010-08-107-922/+50
| | | | All libraries should be built individually now.
* Memory leak in case of empty valuesplitDmitri Pal2010-06-282-0/+44
| | | | | | | | Addressing coverity issue. Ticket #513. The memory was really leaked when the configuration value was empty. Added unit test that confirmed the bug. MANUAL MERGE.
* Fixing NULL dereferencing in ini_configDmitri Pal2010-06-281-22/+32
| | | | | | | | Addressing ticket #504 Conflicts: common/ini/ini_config.c
* Fixing memory leaks in the unit test.Dmitri Pal2010-06-281-3/+9
|
* Fixing types in queue and stack interfacesDmitri Pal2010-06-286-18/+18
|
* Bump libini_config version to 0.6.0Stephen Gallagher2010-06-281-1/+1
|
* Addressing initialization issues.Dmitri Pal2010-06-101-6/+6
| | | | | Fixing bug found by coverity. Tciket #519
* Don't leak directory access resources on errors in directory_list()Stephen Gallagher2010-06-101-0/+8
| | | | https://fedorahosted.org/sssd/ticket/514
* Adding support for explicit 32/64 types (attempt 2).Dmitri Pal2010-05-175-5/+400
| | | | | This is a reworked patch to add support for explicit 32 and 64 bit values in the config files.
* Introducing a comment objectDmitri Pal2010-04-305-6/+804
| | | | | | | | | Comment object will store the comments found in the INI file. It is based on the ref_array interface. Fixing review comments for comment obj.
* Extending refarray interfaceDmitri Pal2010-04-303-1/+563
| | | | | | | | Added functions to inert, delete, replace swap the array elements. Unit test and docs have been updated accordingly. Fixing review comments for refarray.
* Code restructuringDmitri Pal2010-04-2610-1472/+1705
| | | | | | | | | | | | | | | Time came to split ini_config.c into many much smaller pieces. 1) ini_parse.c - will have parsing functions 2) ini_get_value.c - will have single value interpretation functions 3) ini_get_array.c - will have array interpretation functions. 4) ini_print.c - error printing 5) ini_defines.h - common constants 6) ini_parse.h header for parsing functions 7) ini_list.c - will have list processing functions
* Fixing buildDmitri Pal2010-04-143-5/+6
|
* Fix ini_config unit testStephen Gallagher2010-04-141-1/+4
| | | | | | | | | | | When running 'make distcheck', the entire source directory is set to read-only, to ensure that the build process only has write access to $builddir. As a result, this was causing the unit test for file mode to fail, since the file it was testing resides in the $srcdir. This patch guarantees that the test file has the correct permissions prior to running the access test.
* Add ability to trace 64bit numbersDmitri Pal2010-04-142-2/+58
| | | | [TRACE] Adding macros for signed numbers
* Acess control and config change checksDmitri Pal2010-04-144-38/+684
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Fixed the issue that metadata was saved as numbers. Was supposed to be saved as strings. 2) Added two functions. One is to check permissions on the config file. Another to check if the file has changed and thus the cinfiguration needs to be reread. 3) Added unit test will sample code and comments how to use the functions. 4) Added doxygen description in the comments. 5) Fixed couple typos and ommisions here and there. [INI] Fixing crash detected on 64-bit system This patch corrects original code to be more on the safe side and check parameters before using. Instead of dereferencing metadata it is now passed as reference to the next level. It is not used there yet so no other new changes needed so far. [INI] Addressing review comments [INI] Addressing comments.
* Resolve paths for reporting purposesDmitri Pal2010-04-142-4/+21
|