[SCM] NSS Wrapper Repository - branch master updated

Andreas Schneider asn at samba.org
Thu Dec 19 02:16:29 MST 2013


The branch, master has been updated
       via  6d9789c nwrap: Fix function loading on Solaris.
      from  a5bea85 tests: Load nss_wrapper for test_nwrap_disabled().

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


- Log -----------------------------------------------------------------
commit 6d9789c9357e971a0ae2820563637e22df02cb83
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Dec 19 10:16:06 2013 +0100

    nwrap: Fix function loading on Solaris.

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

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


Changeset truncated at 500 lines:

diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index 7083dcd..cd04a79 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -663,7 +663,7 @@ static int libc_getpwnam_r(const char *name,
 #ifdef HAVE___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");
+			_nwrap_load_lib_function(NWRAP_LIBC, "__posix_getpwnam_r");
 	}
 #else
 	nwrap_load_lib_function(NWRAP_LIBC, getpwnam_r);
@@ -694,7 +694,7 @@ static int libc_getpwuid_r(uid_t uid,
 #ifdef HAVE___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");
+			_nwrap_load_lib_function(NWRAP_LIBC, "__posix_getpwuid_r");
 	}
 #else
 	nwrap_load_lib_function(NWRAP_LIBC, getpwuid_r);
@@ -777,7 +777,10 @@ static int libc_getgrnam_r(const char *name,
 			   struct group **result)
 {
 #ifdef HAVE___POSIX_GETGRNAM_R
-	nwrap_load_lib_function(NWRAP_LIBC, __posix_getgrnam_r);
+	if (nwrap_main_global->libc->fns->_libc_getgrnam_r == NULL) {
+		*(void **) (&nwrap_main_global->libc->fns->_libc_getgrnam_r) =
+			_nwrap_load_lib_function(NWRAP_LIBC, "__posix_getgrnam_r");
+	}
 #else
 	nwrap_load_lib_function(NWRAP_LIBC, getgrnam_r);
 #endif
@@ -805,7 +808,10 @@ static int libc_getgrgid_r(gid_t gid,
 			   struct group **result)
 {
 #ifdef HAVE___POSIX_GETGRGID_R
-	nwrap_load_lib_function(NWRAP_LIBC, __posix_getgrgid_r);
+	if (nwrap_main_global->libc->fns->_libc_getgrgid_r == NULL) {
+		*(void **) (&nwrap_main_global->libc->fns->_libc_getgrgid_r) =
+			_nwrap_load_lib_function(NWRAP_LIBC, "__posix_getgrgid_r");
+	}
 #else
 	nwrap_load_lib_function(NWRAP_LIBC, getgrgid_r);
 #endif


-- 
NSS Wrapper Repository


More information about the samba-cvs mailing list