[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Mon Feb 23 14:32:02 MST 2015


The branch, master has been updated
       via  c0a463d waf: Only build the wrappers if we enable selftest
       via  8e76e26 swrap: Bump version to 1.1.3
       via  6ba81a4 swrap: If we remove the socket_info also unlink the unix socket
       via  ca9c6c8 swrap: Do not leak the socket_info we just removed.
       via  e8f56be src: Add support for running with address sanitizer.
       via  8dcc02f swrap: Fix the loop for older gcc versions.
      from  6e5debf torture: Add netr_setPassword(2) schannel test.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c0a463d94abb5c50eaca7b1d402c979684f96a97
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 23 17:12:46 2015 +0100

    waf: Only build the wrappers if we enable selftest
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Mon Feb 23 22:31:22 CET 2015 on sn-devel-104

commit 8e76e267fe105d77400b7c593499f6d175e3467a
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 23 17:19:04 2015 +0100

    swrap: Bump version to 1.1.3
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 6ba81a483cf6ab739358eac9e107f79697a9202a
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 23 17:18:16 2015 +0100

    swrap: If we remove the socket_info also unlink the unix socket
    
    Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit ca9c6c8a323614de274678b42740b958a09736d1
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 23 17:17:43 2015 +0100

    swrap: Do not leak the socket_info we just removed.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit e8f56be3da4b14df9be830d7b4670dc51516e0b2
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 23 17:16:00 2015 +0100

    src: Add support for running with address sanitizer.
    
    If address sanitzer will complain about our hack with variable function
    attributes. This disables the checking of it.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 8dcc02f89b48ab07a6a6bc8fa53870f352c766e9
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 23 17:15:12 2015 +0100

    swrap: Fix the loop for older gcc versions.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c | 22 ++++++++++++++++++++--
 lib/socket_wrapper/wscript          |  2 +-
 wscript                             |  9 +++++----
 wscript_build                       | 13 +++++++++----
 4 files changed, 35 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c
index d5c343d..1188c4e 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -100,6 +100,12 @@ enum swrap_dbglvl_e {
 #define DESTRUCTOR_ATTRIBUTE
 #endif
 
+#ifdef HAVE_ADDRESS_SANITIZER_ATTRIBUTE
+#define DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE __attribute__((no_sanitize_address))
+#else
+#define DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE
+#endif
+
 #ifdef HAVE_GCC_THREAD_LOCAL_STORAGE
 # define SWRAP_THREAD __thread
 #else
@@ -452,11 +458,14 @@ static void *swrap_load_lib_handle(enum swrap_lib lib)
 #ifdef HAVE_LIBSOCKET
 		handle = swrap.libsocket_handle;
 		if (handle == NULL) {
-			for (handle = NULL, i = 10; handle == NULL && i >= 0; i--) {
+			for (i = 10; i >= 0; i--) {
 				char soname[256] = {0};
 
 				snprintf(soname, sizeof(soname), "libsocket.so.%d", i);
 				handle = dlopen(soname, flags);
+				if (handle != NULL) {
+					break;
+				}
 			}
 
 			swrap.libsocket_handle = handle;
@@ -474,11 +483,14 @@ static void *swrap_load_lib_handle(enum swrap_lib lib)
 		}
 #endif
 		if (handle == NULL) {
-			for (handle = NULL, i = 10; handle == NULL && i >= 0; i--) {
+			for (i = 10; i >= 0; i--) {
 				char soname[256] = {0};
 
 				snprintf(soname, sizeof(soname), "libc.so.%d", i);
 				handle = dlopen(soname, flags);
+				if (handle != NULL) {
+					break;
+				}
 			}
 
 			swrap.libc_handle = handle;
@@ -592,6 +604,7 @@ static int libc_eventfd(int count, int flags)
 }
 #endif
 
+DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE
 static int libc_vfcntl(int fd, int cmd, va_list ap)
 {
 	long int args[4];
@@ -643,6 +656,7 @@ static int libc_getsockopt(int sockfd,
 	return swrap.fns.libc_getsockopt(sockfd, level, optname, optval, optlen);
 }
 
+DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE
 static int libc_vioctl(int d, unsigned long int request, va_list ap)
 {
 	long int args[4];
@@ -1404,6 +1418,10 @@ static void swrap_remove_stale(int fd)
 
 		if (si->fds == NULL) {
 			SWRAP_DLIST_REMOVE(sockets, si);
+			if (si->un_addr.sun_path[0] != '\0') {
+				unlink(si->un_addr.sun_path);
+			}
+			free(si);
 		}
 	}
 }
diff --git a/lib/socket_wrapper/wscript b/lib/socket_wrapper/wscript
index 91d23d1..36c6dbe 100644
--- a/lib/socket_wrapper/wscript
+++ b/lib/socket_wrapper/wscript
@@ -2,7 +2,7 @@
 
 import os
 
-VERSION="1.1.2"
+VERSION="1.1.3"
 
 def configure(conf):
     if conf.CHECK_BUNDLED_SYSTEM('socket_wrapper', minversion=VERSION, set_target=False):
diff --git a/wscript b/wscript
index d5a4ccb..2644cbc 100644
--- a/wscript
+++ b/wscript
@@ -156,16 +156,17 @@ def configure(conf):
     conf.RECURSE('lib/ntdb')
     conf.RECURSE('lib/util/charset')
     conf.RECURSE('source4/auth')
-    conf.RECURSE('lib/nss_wrapper')
     conf.RECURSE('nsswitch')
-    conf.RECURSE('lib/resolv_wrapper')
-    conf.RECURSE('lib/socket_wrapper')
-    conf.RECURSE('lib/uid_wrapper')
     conf.RECURSE('lib/subunit/c')
     conf.RECURSE('libcli/smbreadline')
     conf.RECURSE('lib/crypto')
     conf.RECURSE('pidl')
     conf.RECURSE('selftest')
+    if conf.CONFIG_GET('ENABLE_SELFTEST'):
+        conf.RECURSE('lib/nss_wrapper')
+        conf.RECURSE('lib/resolv_wrapper')
+        conf.RECURSE('lib/socket_wrapper')
+        conf.RECURSE('lib/uid_wrapper')
     conf.RECURSE('source3')
     conf.RECURSE('lib/texpect')
     if conf.env.with_ctdb:
diff --git a/wscript_build b/wscript_build
index fc41974..d0fa87b 100644
--- a/wscript_build
+++ b/wscript_build
@@ -2,6 +2,7 @@
 
 # top level waf build script for samba4
 
+import Options
 import os
 srcdir = "."
 
@@ -70,10 +71,14 @@ bld.RECURSE('source4/lib/messaging')
 bld.RECURSE('source4/lib/events')
 bld.RECURSE('source4/lib/cmdline')
 bld.RECURSE('source4/lib/http')
-bld.RECURSE('lib/socket_wrapper')
-bld.RECURSE('lib/resolv_wrapper')
-bld.RECURSE('lib/nss_wrapper')
-bld.RECURSE('lib/uid_wrapper')
+if bld.CONFIG_GET('NSS_WRAPPER'):
+    bld.RECURSE('lib/nss_wrapper')
+if bld.CONFIG_GET('SOCKET_WRAPPER'):
+    bld.RECURSE('lib/socket_wrapper')
+if bld.CONFIG_GET('RESOLV_WRAPPER'):
+    bld.RECURSE('lib/resolv_wrapper')
+if bld.CONFIG_GET('UID_WRAPPER'):
+    bld.RECURSE('lib/uid_wrapper')
 if bld.CHECK_FOR_THIRD_PARTY():
     bld.RECURSE('third_party')
 bld.RECURSE('source4/lib/stream')


-- 
Samba Shared Repository


More information about the samba-cvs mailing list