The branch, master has been updated via dbb889b Bump version to 1.1.1. via a0839bd rwrap: Fix a possible NULL dereference. via 2f37b07 rwrap: If we do not have ns_name_compress() use dn_comp(). from 66910e1 Bump version to 1.1.0.
https://git.samba.org/?p=resolv_wrapper.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit dbb889b839419cc672c7ca65674e24482a896a5b Author: Andreas Schneider <a...@samba.org> Date: Mon Jan 12 12:48:38 2015 +0100 Bump version to 1.1.1. Reviewed-by: Guenther Deschner <g...@samba.org> commit a0839bd4f3e503f4d34c6a29145d005a65eb5538 Author: Andreas Schneider <a...@samba.org> Date: Mon Jan 12 12:45:38 2015 +0100 rwrap: Fix a possible NULL dereference. CID: #84271 Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Jakub Hrozek <jakub.hro...@gmail.com> Reviewed-by: Guenther Deschner <g...@samba.org> commit 2f37b07dec61f4e4aa92799c4b0857379619f266 Author: Andreas Schneider <a...@samba.org> Date: Thu Jan 8 16:32:19 2015 +0100 rwrap: If we do not have ns_name_compress() use dn_comp(). This should fix older Linux versions which do not export ns_name_compress(). In newer glibc versions dn_comp() calls ns_name_compress(). Reviewed-by: Jakub Hrozek <jakub.hro...@gmail.com> Reviewed-by: Michael Adam <ob...@samba.org> ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 4 ++-- ChangeLog | 4 ++++ ConfigureChecks.cmake | 2 ++ config.h.cmake | 2 ++ src/resolv_wrapper.c | 6 +++++- 5 files changed, 15 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/CMakeLists.txt b/CMakeLists.txt index ac11338..3e7ae6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) set(APPLICATION_VERSION_MAJOR "1") set(APPLICATION_VERSION_MINOR "1") -set(APPLICATION_VERSION_PATCH "0") +set(APPLICATION_VERSION_PATCH "1") set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") @@ -19,7 +19,7 @@ set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINO # Increment AGE. Set REVISION to 0 # If the source code was changed, but there were no interface changes: # Increment REVISION. -set(LIBRARY_VERSION "0.0.1") +set(LIBRARY_VERSION "0.0.2") set(LIBRARY_SOVERSION "0") # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked diff --git a/ChangeLog b/ChangeLog index 37a4f7c..55a9d9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ ChangeLog ========== +version 1.1.1 (released 2015-01-12) + * Fixed building on older Linux distributions. + * Fix a possible segfault. + version 1.1.0 (released 2014-12-02) * Added case insensitive comparsion of dns names (dns faking). * Added support complete dns names (trailing dot) (dns faking). diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 41bed3a..a68959f 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -94,6 +94,8 @@ check_function_exists(__res_search HAVE___RES_SEARCH) check_function_exists(res_nsearch HAVE_RES_NSEARCH) check_function_exists(__res_nsearch HAVE___RES_NSEARCH) +check_function_exists(ns_name_compress HAVE_NS_NAME_COMPRESS) + if (UNIX) if (NOT LINUX) # libsocket (Solaris) diff --git a/config.h.cmake b/config.h.cmake index aad83e3..31e2855 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -44,6 +44,8 @@ #cmakedefine HAVE_RES_NSEARCH 1 #cmakedefine HAVE___RES_NSEARCH 1 +#cmakedefine HAVE_NS_NAME_COMPRESS 1 + /*************************** LIBRARIES ***************************/ #cmakedefine HAVE_LIBRESOLV 1 diff --git a/src/resolv_wrapper.c b/src/resolv_wrapper.c index 7211ad0..10af360 100644 --- a/src/resolv_wrapper.c +++ b/src/resolv_wrapper.c @@ -65,6 +65,10 @@ #define RWRAP_DEFAULT_FAKE_TTL 600 #endif /* RWRAP_DEFAULT_FAKE_TTL */ +#ifndef HAVE_NS_NAME_COMPRESS +#define ns_name_compress dn_comp +#endif + enum rwrap_dbglvl_e { RWRAP_LOG_ERROR = 0, RWRAP_LOG_WARN, @@ -729,7 +733,7 @@ static int rwrap_get_record(const char *hostfile, unsigned recursion, } } - if (rc == ENOENT && recursion == 0) { + if (rc == ENOENT && recursion == 0 && key != NULL) { RWRAP_LOG(RWRAP_LOG_TRACE, "Record for [%s] not found\n", query); memcpy(rr->key, key, strlen(key) + 1); } -- Resolv Wrapper Repository