[SCM] NSS Wrapper Repository - branch master updated
Andreas Schneider
asn at samba.org
Thu Mar 5 15:10:06 UTC 2020
The branch, master has been updated
via 812a5b0 nwrap: Only warn if we can't find a symbol in an nss module
via 589f8aa nwrap: Some code cleanup for nwrap_load_module_fn()
from e2d59b1 Bump version to 1.1.8
https://git.samba.org/?p=nss_wrapper.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 812a5b023478ecb021d6bd9ec322637b67f0effc
Author: Andreas Schneider <asn at samba.org>
Date: Mon Feb 17 12:44:26 2020 +0100
nwrap: Only warn if we can't find a symbol in an nss module
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
commit 589f8aacf11fbf1615da8d87200afb95ebb03802
Author: Andreas Schneider <asn at samba.org>
Date: Mon Feb 17 11:56:38 2020 +0100
nwrap: Some code cleanup for nwrap_load_module_fn()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
-----------------------------------------------------------------------
Summary of changes:
src/nss_wrapper.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index 5c4c972..d6639eb 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -1471,22 +1471,24 @@ static int libc_getnameinfo(const struct sockaddr *sa,
static void *nwrap_load_module_fn(struct nwrap_backend *b,
const char *fn_name)
{
- void *res;
- char *s;
+ void *res = NULL;
+ char *s = NULL;
+ int rc;
- if (!b->so_handle) {
+ if (b->so_handle == NULL) {
NWRAP_LOG(NWRAP_LOG_ERROR, "No handle");
return NULL;
}
- if (asprintf(&s, "_nss_%s_%s", b->name, fn_name) == -1) {
+ rc = asprintf(&s, "_nss_%s_%s", b->name, fn_name);
+ if (rc == -1) {
NWRAP_LOG(NWRAP_LOG_ERROR, "Out of memory");
return NULL;
}
res = dlsym(b->so_handle, s);
- if (!res) {
- NWRAP_LOG(NWRAP_LOG_ERROR,
+ if (res == NULL) {
+ NWRAP_LOG(NWRAP_LOG_WARN,
"Cannot find function %s in %s",
s, b->so_path);
}
--
NSS Wrapper Repository
More information about the samba-cvs
mailing list