[SCM] Socket Wrapper Repository - branch master updated
Andreas Schneider
asn at samba.org
Mon May 5 02:20:57 MDT 2014
The branch, master has been updated
via 3d70059 Bump version to 1.0.2.
via eb6676b swrap: Fall back to RTLD_NEXT if we can't find libc.
via 7f4d72e Fix some typos.
from fb8afa1 swrap: Use the loaded libc open() directly.
http://gitweb.samba.org/?p=socket_wrapper.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3d70059d5465e8ae0a3149265ea7c04a78e480d2
Author: Andreas Schneider <asn at samba.org>
Date: Mon May 5 09:35:36 2014 +0200
Bump version to 1.0.2.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit eb6676b6ed0f25a45fb3a7c04633aa83f378c23d
Author: Andreas Schneider <asn at samba.org>
Date: Tue Apr 29 11:07:06 2014 +0200
swrap: Fall back to RTLD_NEXT if we can't find libc.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10572
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 7f4d72e11bcdfc47d4e4980349a0b0250352e6ca
Author: Jakub Wilk <jwilk at jwilk.net>
Date: Tue Apr 29 10:55:04 2014 +0200
Fix some typos.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10566
Reviewed-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 4 ++--
ChangeLog | 5 +++++
README | 2 +-
cmake/Modules/DefineCMakeDefaults.cmake | 2 +-
cmake/Modules/DefineInstallationPaths.cmake | 2 +-
src/socket_wrapper.c | 16 ++++++++--------
6 files changed, 18 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c50c2c..33c2245 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ set(APPLICATION_NAME ${PROJECT_NAME})
set(APPLICATION_VERSION_MAJOR "1")
set(APPLICATION_VERSION_MINOR "0")
-set(APPLICATION_VERSION_PATCH "1")
+set(APPLICATION_VERSION_PATCH "2")
set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
@@ -19,7 +19,7 @@ set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINO
# Increment AGE. Set REVISION to 0
# If the source code was changed, but there were no interface changes:
# Increment REVISION.
-set(LIBRARY_VERSION "0.0.1")
+set(LIBRARY_VERSION "0.0.2")
set(LIBRARY_SOVERSION "0")
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
diff --git a/ChangeLog b/ChangeLog
index b15ee88..2bb84e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
ChangeLog
==========
+version 1.0.2 (released 2014-05-05)
+ * Fixed memory leaks
+ * Fixed calling open from libc.
+ * Fixed loading libc functions on some platforms.
+
version 1.0.1 (released 2014-02-04)
* Added --libs to pkg-config.
* Added socket_wrapper-config.cmake
diff --git a/README b/README
index 45b1be6..58b5513 100644
--- a/README
+++ b/README
@@ -18,7 +18,7 @@ is analogous to use the IPv4 addresses "127.0.0.<ID>" or IPv6 addresses
should always set the default interface. If you listen on INADDR_ANY then it
will use the default interface to listen on.
-Exmaple:
+Example:
LD_PRELOAD=libsocket_wrapper.so \
SOCKET_WRAPPER_DIR=/path/to/socket_dir \
./mydaemon
diff --git a/cmake/Modules/DefineCMakeDefaults.cmake b/cmake/Modules/DefineCMakeDefaults.cmake
index 22eda6f..a6cd47e 100644
--- a/cmake/Modules/DefineCMakeDefaults.cmake
+++ b/cmake/Modules/DefineCMakeDefaults.cmake
@@ -6,7 +6,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Put the include dirs which are in the source or build tree
# before all other include dirs, so the headers in the sources
-# are prefered over the already installed ones
+# are preferred over the already installed ones
# since cmake 2.4.1
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
diff --git a/cmake/Modules/DefineInstallationPaths.cmake b/cmake/Modules/DefineInstallationPaths.cmake
index 88e08ca..a415f3d 100644
--- a/cmake/Modules/DefineInstallationPaths.cmake
+++ b/cmake/Modules/DefineInstallationPaths.cmake
@@ -104,6 +104,6 @@ else()
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 "soudns" CACHE PATH "-")
+ set(SOUND_INSTALL_DIR "sounds" CACHE PATH "-")
set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
endif ()
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 3b99814..95643aa 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -393,10 +393,6 @@ static void *swrap_load_lib_handle(enum swrap_lib lib)
void *handle = NULL;
int i;
-#ifdef HAVE_APPLE
- return RTLD_NEXT;
-#endif
-
#ifdef RTLD_DEEPBIND
flags |= RTLD_DEEPBIND;
#endif
@@ -436,10 +432,14 @@ static void *swrap_load_lib_handle(enum swrap_lib lib)
}
if (handle == NULL) {
+#ifdef RTLD_NEXT
+ handle = swrap.libc_handle = swrap.libsocket_handle = RTLD_NEXT;
+#else
SWRAP_LOG(SWRAP_LOG_ERROR,
"Failed to dlopen library: %s\n",
dlerror());
exit(-1);
+#endif
}
return handle;
@@ -476,7 +476,7 @@ static void *_swrap_load_lib_function(enum swrap_lib lib, const char *fn_name)
/*
* IMPORTANT
*
- * Functions expeciall from libc need to be loaded individually, you can't load
+ * Functions especially from libc need to be loaded individually, you can't load
* all at once or gdb will segfault at startup. The same applies to valgrind and
* has probably something todo with with the linker.
* So we need load each function at the point it is called the first time.
@@ -1601,7 +1601,7 @@ static uint8_t *swrap_packet_init(struct timeval *tval,
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 fraqment */
+ ip->v4.flags = 0x40; /* BIT 1 set - means don't fragment */
ip->v4.fragment = htons(0x0000);
ip->v4.ttl = 0xFF;
ip->v4.protocol = protocol;
@@ -1640,7 +1640,7 @@ static uint8_t *swrap_packet_init(struct timeval *tval,
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 fraqment */
+ 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;
@@ -2395,7 +2395,7 @@ static int autobind_start;
/* using sendto() or connect() on an unbound socket would give the
recipient no way to reply, as unlike UDP and TCP, a unix domain
- socket can't auto-assign emphemeral port numbers, so we need to
+ socket can't auto-assign ephemeral port numbers, so we need to
assign it here.
Note: this might change the family from ipv6 to ipv4
*/
--
Socket Wrapper Repository
More information about the samba-cvs
mailing list