| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
While glob should return a NULL terminated gl_pathv when having no matches,
at least on OS X this is not true when using GLOB_DOOFFS. Rely on the
number of matches returned in gl_pathc, which seems to be more reliable in
error cases.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The Name member is an array whose address is always defined.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with libgcrypt 1.6, it seems that custom locking functions are not
supported anymore. Instead, the user has to select from one of the pre-defined
set of locking functions.
Given that we have a proper threading abstraction API with optional profiling
on all platforms, this is somewhat annoying. However, there does not seem to be
a way to use custom functions, and we have no other choice than using the
provided macro magic to support all libgcrypt versions.
Fixes #630.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
fstat() in newer MinGWs is defined as non-static inline. With our new static
inline memset()/memcpy() overloads, this raises a warning. To avoid it,
explicitly include <sys/stat.h> once before defining these overloads.
|
| |
|
|
|
|
| |
Makes them easier to compare to the original Makefile.am.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Fedora, SELinux complains about these open file descriptors when the
updown script invokes iptables. While it seems difficult to set the flag
on all file descriptors, this at least fixes those covered by the SELinux
policy.
As these two cases are in code executed while the daemon is still single
threaded, we avoid the use of atomic but not fully portable fdopen("e") or
open(O_CLOEXEC) calls.
Fixes #519.
|
|
|
|
|
|
|
|
| |
These wrappers guarantee that calls to these functions are noops if the
number of bytes is 0, as calling them with NULL pointers is undefined
according to the C standard, even if the number of bytes is 0 (most
implementations probably ignore the pointers anyway in this case, but
lets make sure).
|
| |
|
|
|
|
|
| |
Others remain in the order in which they were added, grouped by
algorithm identifier and sorted by benchmarking speed, if provided.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes a rather large memory leak in HTTP fetches.
|
|
|
|
|
| |
If a DN starts with a slash (or whitespace and a slash) slashes will
be used, otherwise commas.
|
| |
|
| |
|
|
|
|
|
| |
Older MinGW versions seem to miss this function declaration. Fixes build on
Travis using Ubuntu 12.04.
|
| |
|
| |
|
|
|
|
|
|
| |
While Winsock provides many Posix compatibility functions, they do not set
errno, but use WSAGetLastError() for error reporting. The wrapped functions
derive an errno from WSAGetLastError() on failure.
|
|
|
|
|
|
|
|
| |
If file descriptors get added and removed in rapid succession, the active
watcher thread might not take notice of it and continues running. However, add()
spawns a watcher thread whenever a file descriptor is added to an empty set.
This could result in multiple watcher threads, which is fixed by a proper
check for running watchers.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of cleaning up all thread-values during destruction, cleanup handler
is invoked when a thread detaches. Thread detaching is cough using the Windows
DllMain() entry point, and allows us to basically revert 204098a7.
Using this mechanism, we make sure that the cleanup handler is invoked by the
the correct thread. Further, this mechanism works for externally-spawned
threads which run outside of our thread_cb() routine, and works more efficiently
with short-running threads.
|
|
|
|
|
| |
On some version GetModuleFileNameEx/GetModuleInformation is in psapi32 instead
of kernel32. We link to both libraries to make sure we have it.
|
|
|
|
| |
The K32 variants are actually needed on 64-bit only.
|
|
|
|
|
| |
For x86_64 it does not actually matter, but for i686 builds the call convention
is different with WINAPI.
|
|
|
|
|
| |
If the fetch fails, the fetcher is not required to return an empty chunk. Avoid
the resulting invalid free() by initializing data.ptr to NULL.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This will be useful if the kernel backend has to know how many policies
follow an SA install, for example if it must install all policies concurrently.
|
|
|
|
|
| |
MinGW headers do not define these values, but Windows system headers do.
Windows defines them for POSIX compatibility, we do the same locally.
|
| |
|
|
|
|
|
|
| |
In addition that this lets AC generation fail properly if private key signing
fails, it also fixes an issue when compiling on Windows with MinGW 4.8.1, where
for some reason the attributeCertificateInfo got encoded incorrectly.
|
|
|
|
|
|
|
| |
Instead of using weak symbols, we use dlsym() on Windows to find an arbitrary
symbol in libtest to detect its linkage. Instead of creating the associated
hashtable in the test runner, we maintain it in libstrongswan, making it
significantly simpler.
|
|
|
|
|
|
|
| |
Due to the removal of pthread_once, we manually create the seed for
chunk_hash(). With the new testable functions interface, this won't work for
the hashtable initiated using __attribute__((constructor)). Enforce seeding
before creating that hashtable.
|