The branch, master has been updated via f4df629 uwrap: Add mutex in uwrap_destructor(). via 96ba355 cmake: Fix a typo in uid_wrapper-config.cmake.in. via 2030b01 Add README.install - instructions for building and installing. from 15d3bb8 cmake: Fix policy check.
http://gitweb.samba.org/?p=uid_wrapper.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit f4df62958749097fd56063af0640465d944546dc Author: Andreas Schneider <a...@samba.org> Date: Fri May 9 17:10:57 2014 +0200 uwrap: Add mutex in uwrap_destructor(). Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 96ba355e433f874f312cfc9db41c6bd9176f12e2 Author: Andreas Schneider <a...@samba.org> Date: Wed May 28 16:13:22 2014 +0200 cmake: Fix a typo in uid_wrapper-config.cmake.in. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 2030b0149119fecbb05e0b28604a46240c3dda73 Author: Michael Adam <ob...@samba.org> Date: Tue May 27 23:23:58 2014 +0200 Add README.install - instructions for building and installing. Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> ----------------------------------------------------------------------- Summary of changes: README.install | 78 +++++++++++++++++++++++++++++++++++++++++++ src/uid_wrapper.c | 2 + uid_wrapper-config.cmake.in | 2 +- 3 files changed, 81 insertions(+), 1 deletions(-) create mode 100644 README.install Changeset truncated at 500 lines: diff --git a/README.install b/README.install new file mode 100644 index 0000000..c677381 --- /dev/null +++ b/README.install @@ -0,0 +1,78 @@ +Obtaining the sources +===================== + +Source tarballs for uid_wrapper can be downloaded from + + https://ftp.samba.org/pub/cwrap/ + +The source code repository for socket wrapper is located under + + git://git.samba.org/uid_wrapper.git + +To create a local copy, run + + $ git clone git://git.samba.org/uid_wrapper.git + $ cd uid_wrapper + +Building from sources +===================== + +uid_wrapper uses cmake (www.cmake.org) as its build system. + +In an unpacked sources base directory, create a directory to +contain the build results, e.g. + + $ mkdir obj + $ cd obj + +Note that "obj" is just an example. The directory can +be named arbitrarily. + +Next, run cmake to configure the build, e.g. + + $ cmake -DCMAKE_INSTALL_PREFIX=<prefix> .. + +or on a 64 bit red hat system: + + $ cmake -DCMAKE_INSTALL_PREFIX=<prefix> -DLIB_SUFFIX=64 .. + +The "<prefix>" should be replaced by the intended installation +target prefix directory, typically /usr or /usr/local. + +Note that the target directory does not have to be a direct +or indirect subdirectory of the source base directory: It can +be an arbitrary directory in the system. In the general case, +".." has to be replaced by a relative or absolute path of the +source base directory in the "cmake" command line. + +One can control the build type with "-DCMAKE_BUILD_TYPE=<mode>" +where <mode> can be one of Debug, Release, RelWithDebInfo, and +some more (see cmake.org). The default is "RelWithDebInfo". + +After configuring with cmake, run the build with + + $ make + +Unit testing +============ + +In order to support running the test suite after building, +the cmocka unit test framework needs to be installed (cmocka.org), +and you need to specify + + -DUNIT_TESTING=ON + +in the cmake run. After running "make", + + $ make test + +runs the test suite. + +Installing +========== + +uid_wrapper is installed into the prefix directory +after running "cmake" and "make" with + + $ make install + diff --git a/src/uid_wrapper.c b/src/uid_wrapper.c index 742903a..b77aa02 100644 --- a/src/uid_wrapper.c +++ b/src/uid_wrapper.c @@ -1162,6 +1162,7 @@ void uwrap_destructor(void) { struct uwrap_thread *u = uwrap.ids; + pthread_mutex_lock(&uwrap_id_mutex); while (u != NULL) { UWRAP_DLIST_REMOVE(uwrap.ids, u); @@ -1170,6 +1171,7 @@ void uwrap_destructor(void) u = uwrap.ids; } + pthread_mutex_unlock(&uwrap_id_mutex); if (uwrap.libc.handle != NULL) { dlclose(uwrap.libc.handle); diff --git a/uid_wrapper-config.cmake.in b/uid_wrapper-config.cmake.in index 4649901..2431867 100644 --- a/uid_wrapper-config.cmake.in +++ b/uid_wrapper-config.cmake.in @@ -1 +1 @@ -set(UID_WRAPPER_LIRBARY @LIB_INSTALL_DIR@/@UID_WRAPPER_LIB@) +set(UID_WRAPPER_LIBRARY @LIB_INSTALL_DIR@/@UID_WRAPPER_LIB@) -- UID Wrapper Repository