aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* leak-detective: Use callback functions to report leaks and usage informationMartin Willi2013-11-063-45/+100
| | | | This is more flexible than printing reports to a FILE.
* identification: Properly check length before comparing for binary DN equalityMartin Willi2013-10-311-1/+1
| | | | Fixes CVE-2013-6075.
* utils: Include stdio.h for fmemopen() replacementTobias Brunner2013-10-291-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 implementationMartin Willi2013-10-242-2/+3
|
* printf-hook-builtin: Don't rely on isinf() return value signednessMartin Willi2013-10-241-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 Willi2013-10-242-0/+61
|
* chunk: Add helper function to create a chunk from data read from a file ↵Tobias Brunner2013-10-232-0/+40
| | | | descriptor
* utils: Add utility function to calculate padding lengthTobias Brunner2013-10-171-12/+16
|
* vstr: Forward actual field widthTobias Brunner2013-10-111-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 suchMartin Willi2013-10-111-2/+22
|
* printf-hook-builtin: Correctly round up floating point valuesMartin Willi2013-10-111-1/+15
|
* printf-hook-builtin: Add some preliminary floating point supportMartin Willi2013-10-111-2/+194
| | | | | This minimalistic implementation has no aspiration for completeness or accuracy, and just provides what we need.
* printf-hook-builtin: Support GNU %m specifierMartin Willi2013-10-111-0/+8
|
* printf-hook-builtin: Add a new "builtin" backend using its own printf() routinesMartin Willi2013-10-113-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 filesMartin Willi2013-10-116-379/+575
|
* printf-hook: Write to output stream instead of the FD directly when using VstrTobias Brunner2013-09-241-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 whitelistAndreas Steffen2013-08-281-0/+1
|
* chunk: Print chunks without separator if + modifier is usedTobias Brunner2013-08-242-2/+3
|
* utils: Add case-insensitive version of strpfx()Tobias Brunner2013-08-241-0/+8
|
* backtrace: rename clone() method clashing with system callMartin Willi2013-08-091-2/+2
| | | | Fixes #376.
* utils: add round_up/down() helper functionsMartin Willi2013-07-291-0/+23
|
* capabilities: Proper error handling when reading groupsTobias Brunner2013-07-241-1/+8
|
* Fix various API doc issues and typosTobias Brunner2013-07-181-1/+0
| | | | Partially based on an old patch by Adrian-Ken Rueegsegger.
* identification: parse identities having a "@@" prefix as ID_RFC822_ADDRMartin Willi2013-07-181-11/+10
| | | | Original patch by Gerald Richter.
* capabilities: Add function to check if a capability is held, without keeping itTobias Brunner2013-07-182-45/+75
| | | | | This can be useful if capabilities are not required anymore after dropping privileges.
* leak-detective: remove hdr entry when reallocating zero bytesMartin Willi2013-07-121-0/+6
|
* leak-detective: print total of allocated/leaked bytes in usage/reportMartin Willi2013-07-121-5/+13
|
* leak-detective: add a usage threshold option based on the number of allocationsMartin Willi2013-07-101-6/+11
|
* leak-detective: set_state() only affects the calling threadMartin Willi2013-07-102-15/+2
| | | | | The only user (bfd backtraces) is fine with that, and we really should not mess the enable flag while doing allocations with other threads.
* leak-detective: take a copy of backtrace while printing tracesMartin Willi2013-07-101-2/+3
| | | | | As we don't want to hold the lock, we must make sure backtraces keep valid while printing them.
* backtrace: add a clone() methodMartin Willi2013-07-102-7/+44
|
* leak-detective: remove hdr from the allocation list during realloc()Martin Willi2013-07-101-39/+60
| | | | | | | If realloc moves an allocation, the original allocation gets freed. We therefore must remove the hdr from the list, as it is invalid. We can add it afterwards once it has been updated, allowing us to unlock the list during reallocation.
* utils: Add helper function to check a string for a given prefixTobias Brunner2013-07-081-0/+8
|
* utils: Convert string helper macros to static inline functionsTobias Brunner2013-07-081-6/+15
|
* integrity-checker: Use chunk_hash_static() to calculate checksumsTobias Brunner2013-06-281-7/+2
|
* chunk: Add predictable hash functionTobias Brunner2013-06-282-1/+53
| | | | | Since chunk_hash() is randomized its output is not predictable, that is, it is only within the same process.
* integrity-checker: Fix checksum calculation after randomizing chunk_hash()Tobias Brunner2013-06-271-2/+7
|
* capabilities: Return effective UID/GID if user did not configure anythingTobias Brunner2013-06-251-2/+2
|
* capabilities: Report effective UID/GID after dropping capabilitiesTobias Brunner2013-06-251-1/+1
|
* capabilities: Handle CAP_CHOWN specially as it might not be requiredTobias Brunner2013-06-252-2/+63
|
* capabilities: Check effective UID as fallback if capabilities are not supportedTobias Brunner2013-06-251-1/+1
|
* dhcp: Require CAP_NET_BIND_SERVICE and CAP_NET_RAW to open/bind socketsTobias Brunner2013-06-251-0/+3
|
* socket-default: Require CAP_NET_BIND_SERVICE for ports < 1024Tobias Brunner2013-06-251-1/+4
| | | | | Since we don't know which ports are used with socket-dynamic we can't demand the capability there, but it might still be required.
* capabilities: Only plugins that require CAP_NET_ADMIN demand itTobias Brunner2013-06-251-0/+4
| | | | The daemon as such does not require this capability.
* capabilities: Move global capabilities_t instance to libstrongswanTobias Brunner2013-06-251-2/+2
|
* capabilities: Ensure required capabilities are actually held by the process/userTobias Brunner2013-06-252-4/+58
|
* printf-hook: Avoid double-free when freeing Vstr configTobias Brunner2013-06-211-1/+0
| | | | | | | Thread-specific objects get freed when the thread value object is destroyed (wasn't the case earlier, i.e. before 2b19dd35), which may cause the second call to vstr_free_conf() to fail in an assert in Vstr (depending on how it was built).
* leak-detective: (re-)whitelist some OpenSSL functionsMartin Willi2013-06-211-0/+5
| | | | | | | Some static allocations in plugins won't get freed, because in the test case process the plugins are not destroyed. If a plugin would clean up allocations done while just using the plugin, these show up as leak in the child process, letting tests fail.
* backtrace: use backtrace_symbols() only if we have backtrace() and dladdr() ↵Martin Willi2013-06-191-5/+16
| | | | fails
* utils: Remove volatile qualifier from refcount_t typedefTobias Brunner2013-06-191-2/+1
| | | | | It's not really required anymore (if it ever was) and may cause compiler warnings when using the non atomic versions of ref_get/ref_put.