[SCM] NSS Wrapper Repository - branch master updated
Andreas Schneider
asn at samba.org
Mon Feb 17 10:09:25 UTC 2020
The branch, master has been updated
via e2d59b1 Bump version to 1.1.8
via 50bd3a0 Rename to CHANGELOG
via b8b734e nwrap: Fix memory leak on error in nwrap_module_gethostbyname2()
via 4d7f54d nwrap: Fix memory leak on error in nwrap_module_gethostbyname()
via a47d0a1 nwrap: Fix memory leak on error in nwrap_module_gethostbyaddr()
via 3f40372 tests: Make sure that current_grp is initialized
from 79b4874 nwrap: Use size_t for iterations, can't be negative
https://git.samba.org/?p=nss_wrapper.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e2d59b13cbaf6d22dba15ecd9844ff79f2b2f74d
Author: Andreas Schneider <asn at samba.org>
Date: Mon Feb 17 09:37:17 2020 +0100
Bump version to 1.1.8
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Isaac Boukris <iboukris at samba.org>
commit 50bd3a0b68be13c0612e2e2b391f1ac38f85047d
Author: Andreas Schneider <asn at samba.org>
Date: Mon Feb 17 09:38:04 2020 +0100
Rename to CHANGELOG
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Isaac Boukris <iboukris at samba.org>
commit b8b734e8708072b1e4ce6064dd2d5f8e2e29b4bb
Author: Andreas Schneider <asn at samba.org>
Date: Mon Feb 17 09:49:54 2020 +0100
nwrap: Fix memory leak on error in nwrap_module_gethostbyname2()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Isaac Boukris <iboukris at samba.org>
commit 4d7f54d21c8f35d9d370fafad30ada61a9cd83ff
Author: Andreas Schneider <asn at samba.org>
Date: Mon Feb 17 09:48:44 2020 +0100
nwrap: Fix memory leak on error in nwrap_module_gethostbyname()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Isaac Boukris <iboukris at samba.org>
commit a47d0a1bda0d9e1b5be974f036278d919c568267
Author: Andreas Schneider <asn at samba.org>
Date: Mon Feb 17 09:46:56 2020 +0100
nwrap: Fix memory leak on error in nwrap_module_gethostbyaddr()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Isaac Boukris <iboukris at samba.org>
commit 3f40372e98ea954dbf72ac4c217eedd838901d9e
Author: Andreas Schneider <asn at samba.org>
Date: Mon Feb 17 09:34:31 2020 +0100
tests: Make sure that current_grp is initialized
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Isaac Boukris <iboukris at samba.org>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog => CHANGELOG | 4 ++++
CMakeLists.txt | 4 ++--
src/nss_wrapper.c | 24 ++++++++++++++++++------
tests/testsuite.c | 4 +++-
4 files changed, 27 insertions(+), 9 deletions(-)
rename ChangeLog => CHANGELOG (93%)
Changeset truncated at 500 lines:
diff --git a/ChangeLog b/CHANGELOG
similarity index 93%
rename from ChangeLog
rename to CHANGELOG
index 3645f4a..f15355d 100644
--- a/ChangeLog
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
ChangeLog
==========
+version 1.1.8 (released 2020-02-17)
+ * Fixed path to library in nss_wrapper.pc
+ * Try different backends for gethostbyaddr nd gethostbyname
+
version 1.1.7 (released 2019-11-11)
* Added NSS_WRAPPER_DISABLE_DEEPBIND env variable
* Improvded logging
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0939416..fa75ef8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
include(DefineCMakeDefaults)
include(DefineCompilerFlags)
-project(nss_wrapper VERSION 1.1.7 LANGUAGES C)
+project(nss_wrapper VERSION 1.1.8 LANGUAGES C)
# global needed variables
set(APPLICATION_NAME ${PROJECT_NAME})
@@ -23,7 +23,7 @@ set(APPLICATION_NAME ${PROJECT_NAME})
# Increment AGE. Set REVISION to 0
# If the source code was changed, but there were no interface changes:
# Increment REVISION.
-set(LIBRARY_VERSION "0.2.6")
+set(LIBRARY_VERSION "0.2.7")
set(LIBRARY_SOVERSION "0")
# add definitions
diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index ff41eeb..5c4c972 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -4487,11 +4487,15 @@ again:
status = b->fns->_nss_gethostbyaddr_r(addr, len, type, &he,
buf, buflen, &errno, &h_errno);
if (status == NSS_STATUS_TRYAGAIN) {
+ char *p = NULL;
+
buflen *= 2;
- buf = (char *)realloc(buf, buflen);
- if (buf == NULL) {
+ p = (char *)realloc(buf, buflen);
+ if (p == NULL) {
+ SAFE_FREE(buf);
return NULL;
}
+ buf = p;
goto again;
}
if (status == NSS_STATUS_NOTFOUND) {
@@ -4567,11 +4571,15 @@ again:
status = b->fns->_nss_gethostbyname2_r(name, AF_UNSPEC, &he,
buf, buflen, &errno, &h_errno);
if (status == NSS_STATUS_TRYAGAIN) {
+ char *p = NULL;
+
buflen *= 2;
- buf = (char *)realloc(buf, buflen);
- if (buf == NULL) {
+ p = (char *)realloc(buf, buflen);
+ if (p == NULL) {
+ SAFE_FREE(buf);
return NULL;
}
+ buf = p;
goto again;
}
if (status == NSS_STATUS_NOTFOUND) {
@@ -4609,11 +4617,15 @@ again:
status = b->fns->_nss_gethostbyname2_r(name, af, &he,
buf, buflen, &errno, &h_errno);
if (status == NSS_STATUS_TRYAGAIN) {
+ char *p = NULL;
+
buflen *= 2;
- buf = (char *)realloc(buf, buflen);
- if (buf == NULL) {
+ p = (char *)realloc(buf, buflen);
+ if (p == NULL) {
+ SAFE_FREE(buf);
return NULL;
}
+ buf = p;
goto again;
}
if (status == NSS_STATUS_NOTFOUND) {
diff --git a/tests/testsuite.c b/tests/testsuite.c
index a423c55..bf678fd 100644
--- a/tests/testsuite.c
+++ b/tests/testsuite.c
@@ -812,8 +812,10 @@ static bool test_nwrap_membership_user(const struct passwd *pwd,
struct group grp = grp_array[i];
if (test_nwrap_user_in_group(pwd, &grp)) {
+ struct group current_grp = {
+ .gr_name = NULL,
+ };
- struct group current_grp;
num_user_groups_from_enum++;
test_nwrap_getgrnam(grp.gr_name, ¤t_grp);
--
NSS Wrapper Repository
More information about the samba-cvs
mailing list