[SCM] NSS Wrapper Repository - branch master updated

Andreas Schneider asn at samba.org
Wed Dec 18 01:40:38 MST 2013


The branch, master has been updated
       via  bb76afd nwrap: Fix loading posix functions on Solaris.
       via  2d783c6 nwrap: Remove copy and paste obsolete line.
      from  c7a1361 nwrap: Remove obsolete nwrap_libc_fn().

http://gitweb.samba.org/?p=nss_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit bb76afd6f4a41a8ec9dc95e403d82b77471d09ad
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Dec 18 09:40:14 2013 +0100

    nwrap: Fix loading posix functions on Solaris.

commit 2d783c62cf75777030d90c0e2ef8028c0a8a68c1
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Dec 18 09:36:18 2013 +0100

    nwrap: Remove copy and paste obsolete line.

-----------------------------------------------------------------------

Summary of changes:
 src/nss_wrapper.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index 1f7ae3b..e412299 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -576,7 +576,6 @@ static void *nwrap_load_lib_handle(enum nwrap_lib lib)
 				handle = dlopen(soname, flags);
 			}
 
-			swrap.libsocket_handle = handle;
 			nwrap_main_global->libc->sock_handle = handle;
 		} else {
 			handle = nwrap_main_global->libc->sock_handle;
@@ -662,7 +661,10 @@ static int libc_getpwnam_r(const char *name,
 			   struct passwd **result)
 {
 #ifdef HAVE___POSIX_GETPWNAM_R
-	nwrap_load_lib_function(NWRAP_LIBC, __posix_getpwnam_r);
+	if (nwrap_main_global->libc->fns->_libc_getpwnam_r == NULL) {
+		*(void **) (&nwrap_main_global->libc->fns->_libc_getpwnam_r) =
+			_nwrap_load_lib_function(lib, "__posix_getpwnam_r");
+	}
 #else
 	nwrap_load_lib_function(NWRAP_LIBC, getpwnam_r);
 #endif
@@ -690,9 +692,12 @@ static int libc_getpwuid_r(uid_t uid,
 			   struct passwd **result)
 {
 #ifdef HAVE___POSIX_GETPWUID_R
-	nwrap_load_lib_function(NWRAP_LIBC, __posix_getpwuid_r);
+	if (nwrap_main_global->libc->fns->_libc_getpwuid_r == NULL) {
+		*(void **) (&nwrap_main_global->libc->fns->_libc_getpwuid_r) =
+			_nwrap_load_lib_function(lib, "__posix_getpwuid_r");
+	}
 #else
-	nwrap_load_lib_function(NWRAP_LIBC, getpwuid);
+	nwrap_load_lib_function(NWRAP_LIBC, getpwuid_r);
 #endif
 
 	return nwrap_main_global->libc->fns->_libc_getpwuid_r(uid,


-- 
NSS Wrapper Repository


More information about the samba-cvs mailing list