Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Fixed some typos | Tobias Brunner | 2014-02-18 | 1 | -3/+3 | |
| | ||||||
* | printf-hook-glibc: printf.h on FreeBSD 10 does not include stdargs.h | Tobias Brunner | 2014-02-13 | 1 | -1/+1 | |
| | ||||||
* | settings: Add support to enumerate sections and key/value pairs with fallbacks | Tobias Brunner | 2014-02-12 | 2 | -35/+163 | |
| | ||||||
* | settings: Implement subsections and key/value pairs with sorted arrays | Tobias Brunner | 2014-02-12 | 1 | -68/+74 | |
| | | | | | | Is a bit more memory efficient (also due to lazy instantiation) and lookups for sections with lots of subsections/keys (e.g. charon.plugins) are faster. | |||||
* | lib: All settings use configured namespace | Tobias Brunner | 2014-02-12 | 1 | -3/+3 | |
| | ||||||
* | settings: Add method that allows to define fallback sections for other sections | Tobias Brunner | 2014-02-12 | 2 | -13/+167 | |
| | | | | | The fallbacks are currently only used for single value lookups. Enumerators are not affected by them. | |||||
* | settings: Make print_key() not rely on null-terminated beginning of key buffer | Tobias Brunner | 2014-02-12 | 1 | -10/+5 | |
| | | | | | The key to print (e.g. until the next .) still has to be null-terminated. | |||||
* | settings: Allow empty strings in section key | Tobias Brunner | 2014-02-12 | 1 | -23/+31 | |
| | ||||||
* | identification: Fix printing of empty RDNs on FreeBSD | Tobias Brunner | 2014-02-12 | 1 | -1/+6 | |
| | | | | On FreeBSD (null) is printed for NULL even if the precision is 0. | |||||
* | leak_detective: Assign return value of realloc to buf | Thomas Egerer | 2014-02-10 | 1 | -1/+1 | |
| | | | | | | | If realloc return a pointer value different from the value to be reallocated, a double free can occur in this context. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> | |||||
* | integrity-checker: Use chunk_map() instead of non-portable mmap() | Martin Willi | 2014-01-23 | 1 | -31/+6 | |
| | ||||||
* | chunk: Externalize error reporting in chunk_write() | Martin Willi | 2014-01-23 | 2 | -11/+9 | |
| | | | | | This avoids passing that arbitrary label just for error messages, and gives greater flexibility in handling errors. | |||||
* | chunk: Provide a fallback chunk_map() if mmap is not available | Martin Willi | 2014-01-23 | 1 | -1/+46 | |
| | ||||||
* | chunk: Use dynamically allocated buffer in chunk_from_fd() | Martin Willi | 2014-01-23 | 2 | -14/+46 | |
| | | | | | | | | When acting on files, we can use fstat() to estimate the buffer size. On non-file FDs, we dynamically increase an allocated buffer. Additionally we slightly change the function signature to properly handle zero-length files and add appropriate unit tests. | |||||
* | chunk: Add functions to map file contents to a chunk | Martin Willi | 2014-01-23 | 2 | -0/+106 | |
| | ||||||
* | utils: Add strreplace function | Tobias Brunner | 2014-01-23 | 2 | -2/+68 | |
| | ||||||
* | agent: Keep CAP_DAC_OVERRIDE to connect to ssh-agent socket | Tobias Brunner | 2014-01-23 | 1 | -0/+3 | |
| | | | | This is also required if charon-cmd is used with capability dropping. | |||||
* | printf-hook-builtin: Correctly calculate written bytes in print_in_hook() | Martin Willi | 2014-01-15 | 1 | -3/+7 | |
| | | | | | | | | | | The hook data counts remaining buffer bytes, not used ones. Counting them correctly fixes a crash for long hexdumps. Further, print_in_hook() must return the number of bytes that would have been written, not the actually written bytes. This is important, as we allocate a dynamic buffer in bus that relies on the exact byte count. Fixes long hexdumps that got truncated. | |||||
* | utils: Fix %T printf hook on big-endian systems | Tobias Brunner | 2014-01-06 | 1 | -1/+1 | |
| | | | | | | | | The cast to a bool* cut of the actual value on big-endian systems if bool was shorter than int because the bool argument to printf gets promoted to an int. Fixes #479. | |||||
* | unit-tests: Don't use priority for destructor that unregisters testable ↵ | Tobias Brunner | 2013-12-04 | 1 | -1/+6 | |
| | | | | | | | | | functions This fixes coverage reports, at least if leak detective is disabled. If it is enabled the plugins are not unloaded so the destructor is not executed until the process is destroyed, which seems not to be covered by gcov. | |||||
* | unit-tests: Add facility to register testable functions | Tobias Brunner | 2013-12-04 | 2 | -0/+141 | |
| | | | | | These can be defined in plugins, or other parts of the tested libraries. They can even be static. | |||||
* | chunk: Fix signedness warnings caused by chunk_from_* macros | Tobias Brunner | 2013-11-27 | 1 | -3/+3 | |
| | | | | | | There are countless other such warnings because e.g. chunk_create() is called with char*, but at least we prevent users from causing such warnings inadvertently when using these macros. | |||||
* | printf-hook-builtin: Don't use %P to print uppercase hex pointers | Martin Willi | 2013-11-20 | 1 | -6/+0 | |
| | | | | We use %P as custom printf specifier for proposals. | |||||
* | backtrace: Support backtracing even if library is not initialized | Martin Willi | 2013-11-06 | 1 | -2/+2 | |
| | | | | But of course backtracing must be initialized anyway using backtrace_init(). | |||||
* | leak-detective: Call {gm,local}time_r() to allocate static buffer | Martin Willi | 2013-11-06 | 1 | -0/+5 | |
| | | | | | On OS X Mavericks, these functions use a static allocation and are hard to whitelist using other means. | |||||
* | leak-detective: Register OS X specific hooks just once | Martin Willi | 2013-11-06 | 1 | -0/+7 | |
| | | | | | If we initialize libstrongswan more than once in the same process, we may not register the hooks twice. | |||||
* | leak-detective: Reset leak list during cleanup | Martin Willi | 2013-11-06 | 1 | -0/+1 | |
| | | | | This resets leak detective state should it get created/destroyed more than once. | |||||
* | leak-detective: Use callback functions to report leaks and usage information | Martin Willi | 2013-11-06 | 3 | -45/+100 | |
| | | | | This is more flexible than printing reports to a FILE. | |||||
* | identification: Properly check length before comparing for binary DN equality | Martin Willi | 2013-10-31 | 1 | -1/+1 | |
| | | | | Fixes CVE-2013-6075. | |||||
* | utils: Include stdio.h for fmemopen() replacement | Tobias Brunner | 2013-10-29 | 1 | -0/+1 | |
| | | | | | This might now be required because Vstr is not necessarily required anymore, which means stdio.h might not be pulled in by prinf_hook.h. | |||||
* | utils: Fix check for fmemopen() fallback implementation | Martin Willi | 2013-10-24 | 2 | -2/+3 | |
| | ||||||
* | printf-hook-builtin: Don't rely on isinf() return value signedness | Martin Willi | 2013-10-24 | 1 | -8/+9 | |
| | | | | | Many systems don't return a negative value for negative infinities; so do a separate check. | |||||
* | utils: Provide a fmemopen(3) fallback using BSD funopen() | Martin Willi | 2013-10-24 | 2 | -0/+61 | |
| | ||||||
* | chunk: Add helper function to create a chunk from data read from a file ↵ | Tobias Brunner | 2013-10-23 | 2 | -0/+40 | |
| | | | | descriptor | |||||
* | utils: Add utility function to calculate padding length | Tobias Brunner | 2013-10-17 | 1 | -12/+16 | |
| | ||||||
* | vstr: Forward actual field width | Tobias Brunner | 2013-10-11 | 1 | -1/+1 | |
| | | | | | fmt_field_width is a flag that indicates if a field width is defined in obj_field_width. | |||||
* | printf-hook-builtin: Print NaN/Infinity floating point values as such | Martin Willi | 2013-10-11 | 1 | -2/+22 | |
| | ||||||
* | printf-hook-builtin: Correctly round up floating point values | Martin Willi | 2013-10-11 | 1 | -1/+15 | |
| | ||||||
* | printf-hook-builtin: Add some preliminary floating point support | Martin Willi | 2013-10-11 | 1 | -2/+194 | |
| | | | | | This minimalistic implementation has no aspiration for completeness or accuracy, and just provides what we need. | |||||
* | printf-hook-builtin: Support GNU %m specifier | Martin Willi | 2013-10-11 | 1 | -0/+8 | |
| | ||||||
* | printf-hook-builtin: Add a new "builtin" backend using its own printf() routines | Martin Willi | 2013-10-11 | 3 | -0/+1017 | |
| | | | | | | Overloads printf C library functions by a self-contained implementation, based on klibc. Does not yet feature all the required default formatters, including those for floating point values. | |||||
* | printf-hook: Move glibc/vstr printf hook backends to separate files | Martin Willi | 2013-10-11 | 6 | -379/+575 | |
| | ||||||
* | printf-hook: Write to output stream instead of the FD directly when using Vstr | Tobias Brunner | 2013-09-24 | 1 | -12/+12 | |
| | | | | | This avoids problems when other stdio functions are used (fputs, fwrite) as writes via Vstr/FD were always unbuffered. | |||||
* | Added tzset memory leak to whitelist | Andreas Steffen | 2013-08-28 | 1 | -0/+1 | |
| | ||||||
* | chunk: Print chunks without separator if + modifier is used | Tobias Brunner | 2013-08-24 | 2 | -2/+3 | |
| | ||||||
* | utils: Add case-insensitive version of strpfx() | Tobias Brunner | 2013-08-24 | 1 | -0/+8 | |
| | ||||||
* | backtrace: rename clone() method clashing with system call | Martin Willi | 2013-08-09 | 1 | -2/+2 | |
| | | | | Fixes #376. | |||||
* | utils: add round_up/down() helper functions | Martin Willi | 2013-07-29 | 1 | -0/+23 | |
| | ||||||
* | capabilities: Proper error handling when reading groups | Tobias Brunner | 2013-07-24 | 1 | -1/+8 | |
| | ||||||
* | Fix various API doc issues and typos | Tobias Brunner | 2013-07-18 | 1 | -1/+0 | |
| | | | | Partially based on an old patch by Adrian-Ken Rueegsegger. |