Hello community,

here is the log from the commit of package socket_wrapper for openSUSE:Factory 
checked in at 2019-03-26 15:35:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/socket_wrapper (Old)
 and      /work/SRC/openSUSE:Factory/.socket_wrapper.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "socket_wrapper"

Tue Mar 26 15:35:42 2019 rev:11 rq:687377 version:1.2.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/socket_wrapper/socket_wrapper.changes    
2018-11-14 14:44:38.202594488 +0100
+++ /work/SRC/openSUSE:Factory/.socket_wrapper.new.25356/socket_wrapper.changes 
2019-03-26 15:35:43.536414784 +0100
@@ -1,0 +2,15 @@
+Thu Mar 21 14:02:58 UTC 2019 - Andreas Schneider <[email protected]>
+
+- Update to version 1.2.3
+  * Fixed missing NULL check for socket_wrapper_dir()
+  * Fixes building in Samba source tree
+
+-------------------------------------------------------------------
+Thu Mar 21 09:00:55 UTC 2019 - Andreas Schneider <[email protected]>
+
+- Update to version 1.2.2
+  * Added environment variable to disable deep binding
+  * Fixed installation of socket_wrapper
+  * Fixed several small bugs
+
+-------------------------------------------------------------------

Old:
----
  socket_wrapper-1.2.1.tar.gz
  socket_wrapper-1.2.1.tar.gz.asc

New:
----
  socket_wrapper-1.2.3.tar.gz
  socket_wrapper-1.2.3.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ socket_wrapper.spec ++++++
--- /var/tmp/diff_new_pack.mdldXi/_old  2019-03-26 15:35:44.096414549 +0100
+++ /var/tmp/diff_new_pack.mdldXi/_new  2019-03-26 15:35:44.096414549 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package socket_wrapper
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 ############################# NOTE ##################################
 
 Name:           socket_wrapper
-Version:        1.2.1
+Version:        1.2.3
 Release:        0
 Summary:        A library passing all socket communications trough Unix sockets
 License:        BSD-3-Clause
@@ -76,7 +76,7 @@
 
 %files
 %defattr(-,root,root)
-%doc AUTHORS README ChangeLog
+%doc AUTHORS README.md ChangeLog
 %license LICENSE
 %{_libdir}/libsocket_wrapper.so.*
 %{_mandir}/man1/socket_wrapper.1*

++++++ socket_wrapper-1.2.1.tar.gz -> socket_wrapper-1.2.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/.gitlab-ci.yml 
new/socket_wrapper-1.2.3/.gitlab-ci.yml
--- old/socket_wrapper-1.2.1/.gitlab-ci.yml     2018-11-13 17:47:01.000000000 
+0100
+++ new/socket_wrapper-1.2.3/.gitlab-ci.yml     2019-02-20 17:24:34.000000000 
+0100
@@ -82,12 +82,12 @@
   script:
   - |
     if [[ -z "$CI_COMMIT_BEFORE_SHA" ]]; then
-        export CI_COMMIT_BEFORE_SHA=$(git rev-parse HEAD^)
+        export CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20")
     fi
 
     # Check if the commit exists in this branch
     # This is not the case for a force push
-    git branch --contains $CI_COMMIT_BEFORE_SHA 2>/dev/null || export 
CI_COMMIT_BEFORE_SHA=$(git rev-parse HEAD^)
+    git branch --contains $CI_COMMIT_BEFORE_SHA 2>/dev/null || export 
CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20")
 
     export CI_COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/CMakeLists.txt 
new/socket_wrapper-1.2.3/CMakeLists.txt
--- old/socket_wrapper-1.2.1/CMakeLists.txt     2018-11-14 09:17:20.000000000 
+0100
+++ new/socket_wrapper-1.2.3/CMakeLists.txt     2019-03-21 14:41:58.000000000 
+0100
@@ -11,7 +11,7 @@
 include(DefineCMakeDefaults)
 include(DefineCompilerFlags)
 
-project(socket_wrapper VERSION 1.2.1 LANGUAGES C)
+project(socket_wrapper VERSION 1.2.3 LANGUAGES C)
 
 # global needed variables
 set(APPLICATION_NAME ${PROJECT_NAME})
@@ -23,15 +23,15 @@
 #     Increment AGE. Set REVISION to 0
 #   If the source code was changed, but there were no interface changes:
 #     Increment REVISION.
-set(LIBRARY_VERSION "0.1.11")
+set(LIBRARY_VERSION "0.1.13")
 set(LIBRARY_SOVERSION "0")
 
 # add definitions
 include(DefinePlatformDefaults)
-include(DefineInstallationPaths)
 include(DefineOptions.cmake)
 include(CPackConfig.cmake)
 include(CompilerChecks.cmake)
+include(GNUInstallDirs)
 
 # disallow in-source build
 include(MacroEnsureOutOfSourceBuild)
@@ -63,7 +63,7 @@
   FILES
     ${CMAKE_CURRENT_BINARY_DIR}/socket_wrapper.pc
   DESTINATION
-    ${LIB_INSTALL_DIR}/pkgconfig
+      ${CMAKE_INSTALL_LIBDIR}/pkgconfig
   COMPONENT
     pkgconfig
 )
@@ -76,7 +76,7 @@
         ${CMAKE_CURRENT_BINARY_DIR}/socket_wrapper-config-version.cmake
         ${CMAKE_CURRENT_BINARY_DIR}/socket_wrapper-config.cmake
     DESTINATION
-        ${CMAKE_INSTALL_DIR}/socket_wrapper
+        ${CMAKE_INSTALL_LIBDIR}/cmake/socket_wrapper
     COMPONENT
         devel
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/CPackConfig.cmake 
new/socket_wrapper-1.2.3/CPackConfig.cmake
--- old/socket_wrapper-1.2.1/CPackConfig.cmake  2018-11-13 17:47:01.000000000 
+0100
+++ new/socket_wrapper-1.2.3/CPackConfig.cmake  2019-02-20 17:24:34.000000000 
+0100
@@ -4,7 +4,7 @@
 ### general settings
 set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The SSH library")
-set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README")
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
 set(CPACK_PACKAGE_VENDOR "The SSH Library Development Team")
 set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/ChangeLog 
new/socket_wrapper-1.2.3/ChangeLog
--- old/socket_wrapper-1.2.1/ChangeLog  2018-11-14 09:17:20.000000000 +0100
+++ new/socket_wrapper-1.2.3/ChangeLog  2019-03-21 14:41:58.000000000 +0100
@@ -1,6 +1,15 @@
 ChangeLog
 ==========
 
+version 1.2.3 (released 2019-03-21)
+  * Fixed missing NULL check for socket_wrapper_dir()
+  * Fixes building in Samba source tree
+
+version 1.2.2 (released 2019-03-21)
+  * Added environment variable to disable deep binding
+  * Fixed installation of socket_wrapper
+  * Fixed several small bugs
+
 version 1.2.1 (released 2018-11-14)
   * Removed error message to fix applications doing stupid things
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/ConfigureChecks.cmake 
new/socket_wrapper-1.2.3/ConfigureChecks.cmake
--- old/socket_wrapper-1.2.1/ConfigureChecks.cmake      2018-11-13 
17:47:01.000000000 +0100
+++ new/socket_wrapper-1.2.3/ConfigureChecks.cmake      2019-02-20 
17:24:34.000000000 +0100
@@ -9,10 +9,6 @@
 
 set(PACKAGE ${PROJECT_NAME})
 set(VERSION ${PROJECT_VERSION})
-set(DATADIR ${DATA_INSTALL_DIR})
-set(LIBDIR ${LIB_INSTALL_DIR})
-set(PLUGINDIR "${PLUGIN_INSTALL_DIR}-${LIBRARY_SOVERSION}")
-set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
 
 set(BINARYDIR ${CMAKE_BINARY_DIR})
 set(SOURCEDIR ${CMAKE_SOURCE_DIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/README 
new/socket_wrapper-1.2.3/README
--- old/socket_wrapper-1.2.1/README     2018-05-02 15:57:12.000000000 +0200
+++ new/socket_wrapper-1.2.3/README     1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-SOCKET_WRAPPER
-==============
-
-This is a library passing all socket communications through unix sockets.
-
-DESCRIPTION
------------
-
-More details can be found in the manpage:
-
-  man -l ./doc/socket_wrapper.1
-
-or the raw text version:
-
-  less ./doc/socket_wrapper.1.txt
-
-For installation instructions please take a look at the README.install file.
-
-MAILINGLIST
------------
-
-As the mailing list samba-technical is used and can be found here:
-
-https://lists.samba.org/mailman/listinfo/samba-technical
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/README.md 
new/socket_wrapper-1.2.3/README.md
--- old/socket_wrapper-1.2.1/README.md  1970-01-01 01:00:00.000000000 +0100
+++ new/socket_wrapper-1.2.3/README.md  2019-02-20 17:24:34.000000000 +0100
@@ -0,0 +1,24 @@
+SOCKET_WRAPPER
+==============
+
+This is a library passing all socket communications through unix sockets.
+
+DESCRIPTION
+-----------
+
+More details can be found in the manpage:
+
+    man -l ./doc/socket_wrapper.1
+
+or the raw text version:
+
+    less ./doc/socket_wrapper.1.txt
+
+For installation instructions please take a look at the README.install file.
+
+MAILINGLIST
+-----------
+
+As the mailing list samba-technical is used and can be found here:
+
+* https://lists.samba.org/mailman/listinfo/samba-technical
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/TODO 
new/socket_wrapper-1.2.3/TODO
--- old/socket_wrapper-1.2.1/TODO       2018-11-13 17:47:01.000000000 +0100
+++ new/socket_wrapper-1.2.3/TODO       2019-02-12 16:54:51.000000000 +0100
@@ -10,7 +10,6 @@
 ---------
 
 Goals:
-* Thread safety
 * The proposed way ==> - fd-passing for tcp sockets (for free)
   Approach:
   - tdb "in small". So a "db file".
@@ -30,4 +29,3 @@
 * Add a test for sento() to broadcast 255.255.255.255.
 * Add a test to check that read/readv/send/ only work on connected sockets.
 * Add unit tests for conversion functions like convert_in_un_remote().
-* Add threaded tests.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/socket_wrapper-1.2.1/cmake/Modules/DefineInstallationPaths.cmake 
new/socket_wrapper-1.2.3/cmake/Modules/DefineInstallationPaths.cmake
--- old/socket_wrapper-1.2.1/cmake/Modules/DefineInstallationPaths.cmake        
2014-05-08 14:06:05.000000000 +0200
+++ new/socket_wrapper-1.2.3/cmake/Modules/DefineInstallationPaths.cmake        
1970-01-01 01:00:00.000000000 +0100
@@ -1,109 +0,0 @@
-if (UNIX OR OS2)
-  IF (NOT APPLICATION_NAME)
-    MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME")
-    SET(APPLICATION_NAME ${PROJECT_NAME})
-  ENDIF (NOT APPLICATION_NAME)
-
-  # Suffix for Linux
-  SET(LIB_SUFFIX
-    CACHE STRING "Define suffix of directory name (32/64)"
-  )
-
-  SET(EXEC_INSTALL_PREFIX
-    "${CMAKE_INSTALL_PREFIX}"
-    CACHE PATH  "Base directory for executables and libraries"
-  )
-  SET(SHARE_INSTALL_PREFIX
-    "${CMAKE_INSTALL_PREFIX}/share"
-    CACHE PATH "Base directory for files which go to share/"
-  )
-  SET(DATA_INSTALL_PREFIX
-    "${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}"
-    CACHE PATH "The parent directory where applications can install their 
data")
-
-  # The following are directories where stuff will be installed to
-  SET(BIN_INSTALL_DIR
-    "${EXEC_INSTALL_PREFIX}/bin"
-    CACHE PATH "The ${APPLICATION_NAME} binary install dir (default 
prefix/bin)"
-  )
-  SET(SBIN_INSTALL_DIR
-    "${EXEC_INSTALL_PREFIX}/sbin"
-    CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
-  )
-  SET(LIB_INSTALL_DIR
-    "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
-    CACHE PATH "The subdirectory relative to the install prefix where 
libraries will be installed (default is prefix/lib)"
-  )
-  SET(LIBEXEC_INSTALL_DIR
-    "${EXEC_INSTALL_PREFIX}/libexec"
-    CACHE PATH "The subdirectory relative to the install prefix where 
libraries will be installed (default is prefix/libexec)"
-  )
-  SET(PLUGIN_INSTALL_DIR
-    "${LIB_INSTALL_DIR}/${APPLICATION_NAME}"
-    CACHE PATH "The subdirectory relative to the install prefix where plugins 
will be installed (default is prefix/lib/${APPLICATION_NAME})"
-  )
-  SET(INCLUDE_INSTALL_DIR
-    "${CMAKE_INSTALL_PREFIX}/include"
-    CACHE PATH "The subdirectory to the header prefix (default prefix/include)"
-  )
-
-  set(CMAKE_INSTALL_DIR
-    "${LIB_INSTALL_DIR}/cmake"
-    CACHE PATH "The subdirectory to install cmake config files")
-
-  SET(DATA_INSTALL_DIR
-    "${DATA_INSTALL_PREFIX}"
-    CACHE PATH "The parent directory where applications can install their data 
(default prefix/share/${APPLICATION_NAME})"
-  )
-  SET(HTML_INSTALL_DIR
-    "${DATA_INSTALL_PREFIX}/doc/HTML"
-    CACHE PATH "The HTML install dir for documentation (default data/doc/html)"
-  )
-  SET(ICON_INSTALL_DIR
-    "${DATA_INSTALL_PREFIX}/icons"
-    CACHE PATH "The icon install dir (default data/icons/)"
-  )
-  SET(SOUND_INSTALL_DIR
-    "${DATA_INSTALL_PREFIX}/sounds"
-    CACHE PATH "The install dir for sound files (default data/sounds)"
-  )
-
-  SET(LOCALE_INSTALL_DIR
-    "${SHARE_INSTALL_PREFIX}/locale"
-    CACHE PATH "The install dir for translations (default prefix/share/locale)"
-  )
-
-  SET(XDG_APPS_DIR
-    "${SHARE_INSTALL_PREFIX}/applications/"
-    CACHE PATH "The XDG apps dir"
-  )
-  SET(XDG_DIRECTORY_DIR
-    "${SHARE_INSTALL_PREFIX}/desktop-directories"
-    CACHE PATH "The XDG directory"
-  )
-
-  SET(SYSCONF_INSTALL_DIR
-    "${EXEC_INSTALL_PREFIX}/etc"
-    CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default 
prefix/etc)"
-  )
-  SET(MAN_INSTALL_DIR
-    "${SHARE_INSTALL_PREFIX}/man"
-    CACHE PATH "The ${APPLICATION_NAME} man install dir (default prefix/man)"
-  )
-  SET(INFO_INSTALL_DIR
-    "${SHARE_INSTALL_PREFIX}/info"
-    CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)"
-  )
-else()
-  # Same same
-  set(BIN_INSTALL_DIR "bin" CACHE PATH "-")
-  set(SBIN_INSTALL_DIR "sbin" CACHE PATH "-")
-  set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "-")
-  set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
-  set(CMAKE_INSTALL_DIR "CMake" CACHE PATH "-")
-  set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-")
-  set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
-  set(ICON_INSTALL_DIR "icons" CACHE PATH "-")
-  set(SOUND_INSTALL_DIR "sounds" CACHE PATH "-")
-  set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
-endif ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/config.h.cmake 
new/socket_wrapper-1.2.3/config.h.cmake
--- old/socket_wrapper-1.2.1/config.h.cmake     2018-11-13 17:47:01.000000000 
+0100
+++ new/socket_wrapper-1.2.3/config.h.cmake     2019-02-20 17:24:34.000000000 
+0100
@@ -4,11 +4,6 @@
 /* Version number of package */
 #cmakedefine VERSION "${PROJECT_VERSION}"
 
-#cmakedefine LOCALEDIR "${LOCALE_INSTALL_DIR}"
-#cmakedefine DATADIR "${DATADIR}"
-#cmakedefine LIBDIR "${LIBDIR}"
-#cmakedefine PLUGINDIR "${PLUGINDIR}"
-#cmakedefine SYSCONFDIR "${SYSCONFDIR}"
 #cmakedefine BINARYDIR "${BINARYDIR}"
 #cmakedefine SOURCEDIR "${SOURCEDIR}"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/doc/CMakeLists.txt 
new/socket_wrapper-1.2.3/doc/CMakeLists.txt
--- old/socket_wrapper-1.2.1/doc/CMakeLists.txt 2018-05-02 15:57:12.000000000 
+0200
+++ new/socket_wrapper-1.2.3/doc/CMakeLists.txt 2019-02-20 17:24:34.000000000 
+0100
@@ -1,4 +1,4 @@
 install(FILES
             socket_wrapper.1
         DESTINATION
-            ${MAN_INSTALL_DIR}/man1)
+            ${CMAKE_INSTALL_MANDIR}/man1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/doc/socket_wrapper.1 
new/socket_wrapper-1.2.3/doc/socket_wrapper.1
--- old/socket_wrapper-1.2.1/doc/socket_wrapper.1       2018-11-13 
17:47:01.000000000 +0100
+++ new/socket_wrapper-1.2.3/doc/socket_wrapper.1       2019-03-21 
08:43:11.000000000 +0100
@@ -2,12 +2,12 @@
 .\"     Title: socket_wrapper
 .\"    Author: Samba Team
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 2018-06-26
+.\"      Date: 2018-11-28
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "SOCKET_WRAPPER" "1" "2018\-06\-26" "\ \&" "\ \&"
+.TH "SOCKET_WRAPPER" "1" "2018\-11\-28" "\ \&" "\ \&"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -44,7 +44,7 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-Redirects all network communication to happen over unix sockets\&.
+Redirects all network communication to happen over Unix sockets\&.
 .RE
 .sp
 .RS 4
@@ -66,13 +66,13 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-Ablility to capture network traffic in pcap format\&.
+Ability to capture network traffic in pcap format\&.
 .RE
 .SH "ENVIRONMENT VARIABLES"
 .PP
 \fBSOCKET_WRAPPER_DIR\fR
 .RS 4
-The user defines a directory where to put all the unix sockets using the 
envionment variable "SOCKET_WRAPPER_DIR=/path/to/socket_dir"\&. When a server 
opens a port or a client wants to connect, socket_wrapper will translate IP 
addresses to a special socket_wrapper name and look for the relevant unix 
socket in the SOCKET_WRAPPER_DIR\&.
+The user defines a directory where to put all the unix sockets using the 
environment variable "SOCKET_WRAPPER_DIR=/path/to/socket_dir"\&. When a server 
opens a port or a client wants to connect, socket_wrapper will translate IP 
addresses to a special socket_wrapper name and look for the relevant Unix 
socket in the SOCKET_WRAPPER_DIR\&.
 .RE
 .PP
 \fBSOCKET_WRAPPER_DEFAULT_IFACE\fR
@@ -147,6 +147,11 @@
 3 = TRACE
 .RE
 .RE
+.PP
+\fBSOCKET_WRAPPER_DISABLE_DEEPBIND\fR
+.RS 4
+This allows you to disable deep binding in socket_wrapper\&. This is useful 
for running valgrind tools or sanitizers like (address, undefined, thread)\&.
+.RE
 .SH "EXAMPLE"
 .sp
 .if n \{\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/doc/socket_wrapper.1.txt 
new/socket_wrapper-1.2.3/doc/socket_wrapper.1.txt
--- old/socket_wrapper-1.2.1/doc/socket_wrapper.1.txt   2018-11-13 
17:47:01.000000000 +0100
+++ new/socket_wrapper-1.2.3/doc/socket_wrapper.1.txt   2019-03-21 
08:43:11.000000000 +0100
@@ -1,6 +1,6 @@
 socket_wrapper(1)
 =================
-:revdate: 2018-06-26
+:revdate: 2018-11-28
 :author: Samba Team
 
 NAME
@@ -21,9 +21,9 @@
 of the full software stack on the same machine and perform locally functional
 testing of complex network configurations.
 
-- Redirects all network communication to happen over unix sockets.
+- Redirects all network communication to happen over Unix sockets.
 - Support for IPv4 and IPv6 socket and addressing emulation.
-- Ablility to capture network traffic in pcap format.
+- Ability to capture network traffic in pcap format.
 
 ENVIRONMENT VARIABLES
 ---------------------
@@ -31,9 +31,9 @@
 *SOCKET_WRAPPER_DIR*::
 
 The user defines a directory where to put all the unix sockets using the
-envionment variable "SOCKET_WRAPPER_DIR=/path/to/socket_dir". When a server
+environment variable "SOCKET_WRAPPER_DIR=/path/to/socket_dir". When a server
 opens a port or a client wants to connect, socket_wrapper will translate IP
-addresses to a special socket_wrapper name and look for the relevant unix
+addresses to a special socket_wrapper name and look for the relevant Unix
 socket in the SOCKET_WRAPPER_DIR.
 
 *SOCKET_WRAPPER_DEFAULT_IFACE*::
@@ -78,6 +78,11 @@
 - 2 = DEBUG
 - 3 = TRACE
 
+*SOCKET_WRAPPER_DISABLE_DEEPBIND*::
+
+This allows you to disable deep binding in socket_wrapper. This is useful for
+running valgrind tools or sanitizers like (address, undefined, thread).
+
 EXAMPLE
 -------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/socket_wrapper-config.cmake.in 
new/socket_wrapper-1.2.3/socket_wrapper-config.cmake.in
--- old/socket_wrapper-1.2.1/socket_wrapper-config.cmake.in     2018-05-02 
15:57:12.000000000 +0200
+++ new/socket_wrapper-1.2.3/socket_wrapper-config.cmake.in     2019-02-20 
17:24:34.000000000 +0100
@@ -1 +1 @@
-set(SOCKET_WRAPPER_LIBRARY @LIB_INSTALL_DIR@/@SOCKET_WRAPPER_LIB@)
+set(SOCKET_WRAPPER_LIBRARY @CMAKE_INSTALL_FULL_LIBDIR@/@SOCKET_WRAPPER_LIB@)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/socket_wrapper.pc.cmake 
new/socket_wrapper-1.2.3/socket_wrapper.pc.cmake
--- old/socket_wrapper-1.2.1/socket_wrapper.pc.cmake    2018-11-13 
17:47:01.000000000 +0100
+++ new/socket_wrapper-1.2.3/socket_wrapper.pc.cmake    2019-02-20 
17:24:34.000000000 +0100
@@ -1,4 +1,4 @@
 Name: @PROJECT_NAME@
 Description: The socket_wrapper library
 Version: @PROJECT_VERSION@
-Libs: @LIB_INSTALL_DIR@/@SOCKET_WRAPPER_LIB@
+Libs: @CMAKE_INSTALL_LIBDIR@/@SOCKET_WRAPPER_LIB@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/src/CMakeLists.txt 
new/socket_wrapper-1.2.3/src/CMakeLists.txt
--- old/socket_wrapper-1.2.1/src/CMakeLists.txt 2018-11-13 17:47:01.000000000 
+0100
+++ new/socket_wrapper-1.2.3/src/CMakeLists.txt 2019-02-20 17:24:34.000000000 
+0100
@@ -20,12 +20,10 @@
                               LINK_FLAGS ${DEFAULT_LINK_FLAGS})
 endif()
 
-install(
-  TARGETS
-    socket_wrapper
-  RUNTIME DESTINATION ${BIN_INSTALL_DIR}
-  LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-  ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+install(TARGETS socket_wrapper
+        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
 )
 
 set(SOCKET_WRAPPER_LOCATION 
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}socket_wrapper${CMAKE_SHARED_LIBRARY_SUFFIX}"
 PARENT_SCOPE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/src/socket_wrapper.c 
new/socket_wrapper-1.2.3/src/socket_wrapper.c
--- old/socket_wrapper-1.2.1/src/socket_wrapper.c       2018-11-13 
19:22:01.000000000 +0100
+++ new/socket_wrapper-1.2.3/src/socket_wrapper.c       2019-03-21 
14:59:22.000000000 +0100
@@ -555,7 +555,7 @@
 static struct swrap swrap;
 
 /* prototypes */
-static const char *socket_wrapper_dir(void);
+static char *socket_wrapper_dir(void);
 
 #define LIBC_NAME "libc.so"
 
@@ -587,20 +587,29 @@
        int i;
 
 #ifdef RTLD_DEEPBIND
-       const char *env = getenv("LD_PRELOAD");
+       const char *env_preload = getenv("LD_PRELOAD");
+       const char *env_deepbind = getenv("SOCKET_WRAPPER_DISABLE_DEEPBIND");
+       bool enable_deepbind = true;
 
        /* Don't do a deepbind if we run with libasan */
-       if (env != NULL && strlen(env) < 1024) {
-               const char *p = strstr(env, "libasan.so");
-               if (p == NULL) {
-                       flags |= RTLD_DEEPBIND;
+       if (env_preload != NULL && strlen(env_preload) < 1024) {
+               const char *p = strstr(env_preload, "libasan.so");
+               if (p != NULL) {
+                       enable_deepbind = false;
                }
        }
+
+       if (env_deepbind != NULL && strlen(env_deepbind) >= 1) {
+               enable_deepbind = false;
+       }
+
+       if (enable_deepbind) {
+               flags |= RTLD_DEEPBIND;
+       }
 #endif
 
        switch (lib) {
        case SWRAP_LIBNSL:
-               FALL_THROUGH;
        case SWRAP_LIBSOCKET:
 #ifdef HAVE_LIBSOCKET
                handle = swrap.libc.socket_handle;
@@ -619,7 +628,6 @@
                }
                break;
 #endif
-               FALL_THROUGH;
        case SWRAP_LIBC:
                handle = swrap.libc.handle;
 #ifdef LIBC_SO
@@ -1274,19 +1282,26 @@
        sic->meta.next_free = next_free;
 }
 
-static const char *socket_wrapper_dir(void)
+static char *socket_wrapper_dir(void)
 {
-       const char *s = getenv("SOCKET_WRAPPER_DIR");
+       char *swrap_dir = NULL;
+       char *s = getenv("SOCKET_WRAPPER_DIR");
+
        if (s == NULL) {
+               SWRAP_LOG(SWRAP_LOG_WARN, "SOCKET_WRAPPER_DIR not set\n");
                return NULL;
        }
-       /* TODO use realpath(3) here, when we add support for threads */
-       if (strncmp(s, "./", 2) == 0) {
-               s += 2;
+
+       swrap_dir = realpath(s, NULL);
+       if (swrap_dir == NULL) {
+               SWRAP_LOG(SWRAP_LOG_ERROR,
+                         "Unable to resolve socket_wrapper dir path: %s",
+                         strerror(errno));
+               return NULL;
        }
 
-       SWRAP_LOG(SWRAP_LOG_TRACE, "socket_wrapper_dir: %s", s);
-       return s;
+       SWRAP_LOG(SWRAP_LOG_TRACE, "socket_wrapper_dir: %s", swrap_dir);
+       return swrap_dir;
 }
 
 static unsigned int socket_wrapper_mtu(void)
@@ -1491,12 +1506,14 @@
 
 bool socket_wrapper_enabled(void)
 {
-       const char *s = socket_wrapper_dir();
+       char *s = socket_wrapper_dir();
 
        if (s == NULL) {
                return false;
        }
 
+       SAFE_FREE(s);
+
        socket_wrapper_init_sockets();
 
        return true;
@@ -1702,6 +1719,7 @@
        unsigned int prt;
        unsigned int iface;
        int is_bcast = 0;
+       char *swrap_dir = NULL;
 
        if (bcast) *bcast = 0;
 
@@ -1800,18 +1818,27 @@
                return -1;
        }
 
+       swrap_dir = socket_wrapper_dir();
+       if (swrap_dir == NULL) {
+               errno = EINVAL;
+               return -1;
+       }
+
        if (is_bcast) {
-               snprintf(un->sun_path, sizeof(un->sun_path), "%s/EINVAL",
-                        socket_wrapper_dir());
+               snprintf(un->sun_path, sizeof(un->sun_path),
+                        "%s/EINVAL", swrap_dir);
                SWRAP_LOG(SWRAP_LOG_DEBUG, "un path [%s]", un->sun_path);
+               SAFE_FREE(swrap_dir);
                /* the caller need to do more processing */
                return 0;
        }
 
        snprintf(un->sun_path, sizeof(un->sun_path), "%s/"SOCKET_FORMAT,
-                socket_wrapper_dir(), type, iface, prt);
+                swrap_dir, type, iface, prt);
        SWRAP_LOG(SWRAP_LOG_DEBUG, "un path [%s]", un->sun_path);
 
+       SAFE_FREE(swrap_dir);
+
        return 0;
 }
 
@@ -1823,6 +1850,7 @@
        unsigned int iface;
        struct stat st;
        int is_bcast = 0;
+       char *swrap_dir = NULL;
 
        if (bcast) *bcast = 0;
 
@@ -1964,11 +1992,17 @@
                return -1;
        }
 
+       swrap_dir = socket_wrapper_dir();
+       if (swrap_dir == NULL) {
+               errno = EINVAL;
+               return -1;
+       }
+
        if (prt == 0) {
                /* handle auto-allocation of ephemeral ports */
                for (prt = 5001; prt < 10000; prt++) {
                        snprintf(un->sun_path, sizeof(un->sun_path), 
"%s/"SOCKET_FORMAT,
-                                socket_wrapper_dir(), type, iface, prt);
+                                swrap_dir, type, iface, prt);
                        if (stat(un->sun_path, &st) == 0) continue;
 
                        set_port(si->family, prt, &si->myname);
@@ -1976,15 +2010,20 @@
 
                        break;
                }
+
                if (prt == 10000) {
                        errno = ENFILE;
+                       SAFE_FREE(swrap_dir);
                        return -1;
                }
        }
 
        snprintf(un->sun_path, sizeof(un->sun_path), "%s/"SOCKET_FORMAT,
-                socket_wrapper_dir(), type, iface, prt);
+                swrap_dir, type, iface, prt);
        SWRAP_LOG(SWRAP_LOG_DEBUG, "un path [%s]", un->sun_path);
+
+       SAFE_FREE(swrap_dir);
+
        return 0;
 }
 
@@ -2012,7 +2051,7 @@
                        return false;
                }
                break;
-#if HAVE_IPV6
+#ifdef HAVE_IPV6
        case AF_INET6:
                if (len < sizeof(struct sockaddr_in6)) {
                        return false;
@@ -2059,7 +2098,7 @@
                        return true;
                        break;
                }
-#if HAVE_IPV6
+#ifdef HAVE_IPV6
                case AF_INET6: {
                        struct sockaddr_in6 *sin1, *sin2;
 
@@ -2431,14 +2470,20 @@
                                       int unreachable,
                                       size_t *_packet_len)
 {
-       uint8_t *base;
-       uint8_t *buf;
-       struct swrap_packet_frame *frame;
-       union swrap_packet_ip *ip;
+       uint8_t *base = NULL;
+       uint8_t *buf = NULL;
+       union {
+               uint8_t *ptr;
+               struct swrap_packet_frame *frame;
+       } f;
+       union {
+               uint8_t *ptr;
+               union swrap_packet_ip *ip;
+       } i;
        union swrap_packet_payload *pay;
        size_t packet_len;
        size_t alloc_len;
-       size_t nonwire_len = sizeof(*frame);
+       size_t nonwire_len = sizeof(struct swrap_packet_frame);
        size_t wire_hdr_len = 0;
        size_t wire_len = 0;
        size_t ip_hdr_len = 0;
@@ -2460,7 +2505,7 @@
                dest_in = (const struct sockaddr_in *)(const void *)dest;
                src_port = src_in->sin_port;
                dest_port = dest_in->sin_port;
-               ip_hdr_len = sizeof(ip->v4);
+               ip_hdr_len = sizeof(i.ip->v4);
                break;
 #ifdef HAVE_IPV6
        case AF_INET6:
@@ -2468,7 +2513,7 @@
                dest_in6 = (const struct sockaddr_in6 *)(const void *)dest;
                src_port = src_in6->sin6_port;
                dest_port = dest_in6->sin6_port;
-               ip_hdr_len = sizeof(ip->v6);
+               ip_hdr_len = sizeof(i.ip->v6);
                break;
 #endif
        default:
@@ -2509,7 +2554,6 @@
                if (wire_len > 64 ) {
                        icmp_truncate_len = wire_len - 64;
                }
-               wire_hdr_len += icmp_hdr_len;
                wire_len += icmp_hdr_len;
        }
 
@@ -2525,39 +2569,50 @@
        }
 
        buf = base;
+       f.ptr = buf;
+
+       f.frame->seconds                = tval->tv_sec;
+       f.frame->micro_seconds  = tval->tv_usec;
+       f.frame->recorded_length        = wire_len - icmp_truncate_len;
+       f.frame->full_length    = wire_len - icmp_truncate_len;
 
-       frame = (struct swrap_packet_frame *)(void *)buf;
-       frame->seconds          = tval->tv_sec;
-       frame->micro_seconds    = tval->tv_usec;
-       frame->recorded_length  = wire_len - icmp_truncate_len;
-       frame->full_length      = wire_len - icmp_truncate_len;
        buf += SWRAP_PACKET_FRAME_SIZE;
 
-       ip = (union swrap_packet_ip *)(void *)buf;
+       i.ptr = buf;
        switch (src->sa_family) {
        case AF_INET:
-               ip->v4.ver_hdrlen       = 0x45; /* version 4 and 5 * 32 bit 
words */
-               ip->v4.tos              = 0x00;
-               ip->v4.packet_length    = htons(wire_len - icmp_truncate_len);
-               ip->v4.identification   = htons(0xFFFF);
-               ip->v4.flags            = 0x40; /* BIT 1 set - means don't 
fragment */
-               ip->v4.fragment         = htons(0x0000);
-               ip->v4.ttl              = 0xFF;
-               ip->v4.protocol         = protocol;
-               ip->v4.hdr_checksum     = htons(0x0000);
-               ip->v4.src_addr         = src_in->sin_addr.s_addr;
-               ip->v4.dest_addr        = dest_in->sin_addr.s_addr;
+               if (src_in == NULL || dest_in == NULL) {
+                       SAFE_FREE(base);
+                       return NULL;
+               }
+
+               i.ip->v4.ver_hdrlen     = 0x45; /* version 4 and 5 * 32 bit 
words */
+               i.ip->v4.tos            = 0x00;
+               i.ip->v4.packet_length  = htons(wire_len - icmp_truncate_len);
+               i.ip->v4.identification = htons(0xFFFF);
+               i.ip->v4.flags          = 0x40; /* BIT 1 set - means don't 
fragment */
+               i.ip->v4.fragment       = htons(0x0000);
+               i.ip->v4.ttl            = 0xFF;
+               i.ip->v4.protocol       = protocol;
+               i.ip->v4.hdr_checksum   = htons(0x0000);
+               i.ip->v4.src_addr       = src_in->sin_addr.s_addr;
+               i.ip->v4.dest_addr      = dest_in->sin_addr.s_addr;
                buf += SWRAP_PACKET_IP_V4_SIZE;
                break;
 #ifdef HAVE_IPV6
        case AF_INET6:
-               ip->v6.ver_prio         = 0x60; /* version 4 and 5 * 32 bit 
words */
-               ip->v6.flow_label_high  = 0x00;
-               ip->v6.flow_label_low   = 0x0000;
-               ip->v6.payload_length   = htons(wire_len - icmp_truncate_len); 
/* TODO */
-               ip->v6.next_header      = protocol;
-               memcpy(ip->v6.src_addr, src_in6->sin6_addr.s6_addr, 16);
-               memcpy(ip->v6.dest_addr, dest_in6->sin6_addr.s6_addr, 16);
+               if (src_in6 == NULL || dest_in6 == NULL) {
+                       SAFE_FREE(base);
+                       return NULL;
+               }
+
+               i.ip->v6.ver_prio               = 0x60; /* version 4 and 5 * 32 
bit words */
+               i.ip->v6.flow_label_high        = 0x00;
+               i.ip->v6.flow_label_low = 0x0000;
+               i.ip->v6.payload_length = htons(wire_len - icmp_truncate_len); 
/* TODO */
+               i.ip->v6.next_header    = protocol;
+               memcpy(i.ip->v6.src_addr, src_in6->sin6_addr.s6_addr, 16);
+               memcpy(i.ip->v6.dest_addr, dest_in6->sin6_addr.s6_addr, 16);
                buf += SWRAP_PACKET_IP_V6_SIZE;
                break;
 #endif
@@ -2571,21 +2626,23 @@
                        pay->icmp4.code         = 0x01; /* host unreachable */
                        pay->icmp4.checksum     = htons(0x0000);
                        pay->icmp4.unused       = htonl(0x00000000);
+
                        buf += SWRAP_PACKET_PAYLOAD_ICMP4_SIZE;
 
                        /* set the ip header in the ICMP payload */
-                       ip = (union swrap_packet_ip *)(void *)buf;
-                       ip->v4.ver_hdrlen       = 0x45; /* version 4 and 5 * 32 
bit words */
-                       ip->v4.tos              = 0x00;
-                       ip->v4.packet_length    = htons(wire_len - 
icmp_hdr_len);
-                       ip->v4.identification   = htons(0xFFFF);
-                       ip->v4.flags            = 0x40; /* BIT 1 set - means 
don't fragment */
-                       ip->v4.fragment         = htons(0x0000);
-                       ip->v4.ttl              = 0xFF;
-                       ip->v4.protocol         = icmp_protocol;
-                       ip->v4.hdr_checksum     = htons(0x0000);
-                       ip->v4.src_addr         = dest_in->sin_addr.s_addr;
-                       ip->v4.dest_addr        = src_in->sin_addr.s_addr;
+                       i.ptr = buf;
+                       i.ip->v4.ver_hdrlen     = 0x45; /* version 4 and 5 * 32 
bit words */
+                       i.ip->v4.tos            = 0x00;
+                       i.ip->v4.packet_length  = htons(wire_len - 
icmp_hdr_len);
+                       i.ip->v4.identification = htons(0xFFFF);
+                       i.ip->v4.flags          = 0x40; /* BIT 1 set - means 
don't fragment */
+                       i.ip->v4.fragment       = htons(0x0000);
+                       i.ip->v4.ttl            = 0xFF;
+                       i.ip->v4.protocol       = icmp_protocol;
+                       i.ip->v4.hdr_checksum   = htons(0x0000);
+                       i.ip->v4.src_addr       = dest_in->sin_addr.s_addr;
+                       i.ip->v4.dest_addr      = src_in->sin_addr.s_addr;
+
                        buf += SWRAP_PACKET_IP_V4_SIZE;
 
                        src_port = dest_in->sin_port;
@@ -2600,14 +2657,15 @@
                        buf += SWRAP_PACKET_PAYLOAD_ICMP6_SIZE;
 
                        /* set the ip header in the ICMP payload */
-                       ip = (union swrap_packet_ip *)(void *)buf;
-                       ip->v6.ver_prio         = 0x60; /* version 4 and 5 * 32 
bit words */
-                       ip->v6.flow_label_high  = 0x00;
-                       ip->v6.flow_label_low   = 0x0000;
-                       ip->v6.payload_length   = htons(wire_len - 
icmp_truncate_len); /* TODO */
-                       ip->v6.next_header      = protocol;
-                       memcpy(ip->v6.src_addr, dest_in6->sin6_addr.s6_addr, 
16);
-                       memcpy(ip->v6.dest_addr, src_in6->sin6_addr.s6_addr, 
16);
+                       i.ptr = buf;
+                       i.ip->v6.ver_prio               = 0x60; /* version 4 
and 5 * 32 bit words */
+                       i.ip->v6.flow_label_high        = 0x00;
+                       i.ip->v6.flow_label_low = 0x0000;
+                       i.ip->v6.payload_length = htons(wire_len - 
icmp_truncate_len); /* TODO */
+                       i.ip->v6.next_header    = protocol;
+                       memcpy(i.ip->v6.src_addr, dest_in6->sin6_addr.s6_addr, 
16);
+                       memcpy(i.ip->v6.dest_addr, src_in6->sin6_addr.s6_addr, 
16);
+
                        buf += SWRAP_PACKET_IP_V6_SIZE;
 
                        src_port = dest_in6->sin6_port;
@@ -3446,6 +3504,7 @@
        int ret;
        int port;
        struct stat st;
+       char *swrap_dir = NULL;
 
        swrap_mutex_lock(&autobind_start_mutex);
 
@@ -3531,11 +3590,18 @@
                autobind_start = 10000;
        }
 
+       swrap_dir = socket_wrapper_dir();
+       if (swrap_dir == NULL) {
+               errno = EINVAL;
+               ret = -1;
+               goto done;
+       }
+
        for (i = 0; i < SOCKET_MAX_SOCKETS; i++) {
                port = autobind_start + i;
                snprintf(un_addr.sa.un.sun_path, sizeof(un_addr.sa.un.sun_path),
-                        "%s/"SOCKET_FORMAT, socket_wrapper_dir(),
-                        type, socket_wrapper_default_iface(), port);
+                        "%s/"SOCKET_FORMAT, swrap_dir, type,
+                        socket_wrapper_default_iface(), port);
                if (stat(un_addr.sa.un.sun_path, &st) == 0) continue;
 
                ret = libc_bind(fd, &un_addr.sa.s, un_addr.sa_socklen);
@@ -3567,6 +3633,7 @@
        ret = 0;
 
 done:
+       SAFE_FREE(swrap_dir);
        swrap_mutex_unlock(&autobind_start_mutex);
        return ret;
 }
@@ -4752,6 +4819,11 @@
                for (i = 0; i < (size_t)msg->msg_iovlen; i++) {
                        size_t nlen;
                        nlen = len + msg->msg_iov[i].iov_len;
+                       if (nlen < len) {
+                               /* overflow */
+                               errno = EMSGSIZE;
+                               goto out;
+                       }
                        if (nlen > mtu) {
                                break;
                        }
@@ -5298,7 +5370,7 @@
        msg.msg_namelen = tolen;       /* size of address */
        msg.msg_iov = &tmp;            /* scatter/gather array */
        msg.msg_iovlen = 1;            /* # elements in msg_iov */
-#if HAVE_STRUCT_MSGHDR_MSG_CONTROL
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
        msg.msg_control = NULL;        /* ancillary data, see below */
        msg.msg_controllen = 0;        /* ancillary data buffer len */
        msg.msg_flags = 0;             /* flags on received message */
@@ -5324,14 +5396,19 @@
                unsigned int iface;
                unsigned int prt = ntohs(((const struct sockaddr_in *)(const 
void *)to)->sin_port);
                char type;
+               char *swrap_dir = NULL;
 
                type = SOCKET_TYPE_CHAR_UDP;
 
+               swrap_dir = socket_wrapper_dir();
+               if (swrap_dir == NULL) {
+                       return -1;
+               }
+
                for(iface=0; iface <= MAX_WRAPPED_INTERFACES; iface++) {
                        snprintf(un_addr.sa.un.sun_path,
                                 sizeof(un_addr.sa.un.sun_path),
-                                "%s/"SOCKET_FORMAT,
-                                socket_wrapper_dir(), type, iface, prt);
+                                "%s/"SOCKET_FORMAT, swrap_dir, type, iface, 
prt);
                        if (stat(un_addr.sa.un.sun_path, &st) != 0) continue;
 
                        /* ignore the any errors in broadcast sends */
@@ -5343,6 +5420,8 @@
                                    un_addr.sa_socklen);
                }
 
+               SAFE_FREE(swrap_dir);
+
                SWRAP_LOCK_SI(si);
 
                swrap_pcap_dump_packet(si, to, SWRAP_SENDTO, buf, len);
@@ -5529,7 +5608,7 @@
        msg.msg_namelen = 0;           /* size of address */
        msg.msg_iov = &tmp;            /* scatter/gather array */
        msg.msg_iovlen = 1;            /* # elements in msg_iov */
-#if HAVE_STRUCT_MSGHDR_MSG_CONTROL
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
        msg.msg_control = NULL;        /* ancillary data, see below */
        msg.msg_controllen = 0;        /* ancillary data buffer len */
        msg.msg_flags = 0;             /* flags on received message */
@@ -5580,7 +5659,7 @@
        msg.msg_namelen = 0;           /* size of address */
        msg.msg_iov = &tmp;            /* scatter/gather array */
        msg.msg_iovlen = 1;            /* # elements in msg_iov */
-#if HAVE_STRUCT_MSGHDR_MSG_CONTROL
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
        msg.msg_control = NULL;        /* ancillary data, see below */
        msg.msg_controllen = 0;        /* ancillary data buffer len */
        msg.msg_flags = 0;             /* flags on received message */
@@ -5803,6 +5882,7 @@
                off_t ofs = 0;
                size_t avail = 0;
                size_t remain;
+               char *swrap_dir = NULL;
 
                for (i = 0; i < (size_t)msg.msg_iovlen; i++) {
                        avail += msg.msg_iov[i].iov_len;
@@ -5828,9 +5908,15 @@
 
                type = SOCKET_TYPE_CHAR_UDP;
 
+               swrap_dir = socket_wrapper_dir();
+               if (swrap_dir == NULL) {
+                       free(buf);
+                       return -1;
+               }
+
                for(iface=0; iface <= MAX_WRAPPED_INTERFACES; iface++) {
                        snprintf(un_addr.sun_path, sizeof(un_addr.sun_path), 
"%s/"SOCKET_FORMAT,
-                                socket_wrapper_dir(), type, iface, prt);
+                                swrap_dir, type, iface, prt);
                        if (stat(un_addr.sun_path, &st) != 0) continue;
 
                        msg.msg_name = &un_addr;           /* optional address 
*/
@@ -5840,6 +5926,8 @@
                        libc_sendmsg(s, &msg, flags);
                }
 
+               SAFE_FREE(swrap_dir);
+
                SWRAP_LOCK_SI(si);
 
                swrap_pcap_dump_packet(si, to, SWRAP_SENDTO, buf, len);
@@ -5944,7 +6032,7 @@
        msg.msg_namelen = 0;           /* size of address */
        msg.msg_iov = discard_const_p(struct iovec, vector); /* scatter/gather 
array */
        msg.msg_iovlen = count;        /* # elements in msg_iov */
-#if HAVE_STRUCT_MSGHDR_MSG_CONTROL
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
        msg.msg_control = NULL;        /* ancillary data, see below */
        msg.msg_controllen = 0;        /* ancillary data buffer len */
        msg.msg_flags = 0;             /* flags on received message */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/tests/CMakeLists.txt 
new/socket_wrapper-1.2.3/tests/CMakeLists.txt
--- old/socket_wrapper-1.2.1/tests/CMakeLists.txt       2018-11-13 
17:47:01.000000000 +0100
+++ new/socket_wrapper-1.2.3/tests/CMakeLists.txt       2019-02-15 
12:08:40.000000000 +0100
@@ -127,7 +127,7 @@
                     TEST
                         ${_HELGRIND_TEST}
                     PROPERTY
-                        ENVIRONMENT LD_PRELOAD=${SOCKET_WRAPPER_LOCATION})
+                        ENVIRONMENT LD_PRELOAD=${SOCKET_WRAPPER_LOCATION} 
SOCKET_WRAPPER_DISABLE_DEEPBIND=1)
             endif()
         endforeach()
     endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.2.1/tests/echo_srv.c 
new/socket_wrapper-1.2.3/tests/echo_srv.c
--- old/socket_wrapper-1.2.1/tests/echo_srv.c   2018-11-13 17:47:01.000000000 
+0100
+++ new/socket_wrapper-1.2.3/tests/echo_srv.c   2019-03-21 08:43:11.000000000 
+0100
@@ -886,7 +886,7 @@
                                 "[-D] [--pid pidfile]\n"
                                 "-t makes the server listen on TCP\n"
                                 "-u makes the server listen on UDP\n"
-                                "-D tells the server to become a deamon and " \
+                                "-D tells the server to become a daemon and " \
                                 "write a PIDfile\n"
                                 "The default port is 7, the default PIDfile is 
" \
                                 "echo_srv.pid in the current directory\n",



Reply via email to